FCMakeIndex[str1, str2, head]
generates an index with the given head out of the string str1
and str2
. For example, FCMakeIndex["Lor","1",LorentzIndex]
yields LorentzIndex[Lor1]
. The second argument can also be an integer. FCMakeIndex
is useful for converting the output of different diagram generators such as FeynArts or QGAF into the FeynCalc notation. It uses memoization to improve the performance.
["Lor", "1"] FCMakeIndex
\text{Lor1}
["Lor", "1"] // StandardForm
FCMakeIndex
(*Lor1*)
["Lor", {3, 1, 4}, LorentzIndex] FCMakeIndex
\{\text{Lor3},\text{Lor1},\text{Lor4}\}
["Lor", {3, 1, 4}, LorentzIndex] // StandardForm
FCMakeIndex
(*{LorentzIndex[Lor3], LorentzIndex[Lor1], LorentzIndex[Lor4]}*)
["Sun", {"a", 1, -4}] FCMakeIndex
\{\text{Suna},\text{Sun1},\text{SunMinus4}\}
["Sun", {"a", 1, -4}] // StandardForm
FCMakeIndex
(*{Suna, Sun1, SunMinus4}*)