|
2 | 2 | Analytic.m
|
3 | 3 | Translation of InsertFields output into
|
4 | 4 | analytic expressions
|
5 |
| - last modified 2 Dec 14 th |
| 5 | + last modified 4 Apr 15 th |
6 | 6 | *)
|
7 | 7 |
|
8 | 8 | Begin["`Analytic`"]
|
|
56 | 56 |
|
57 | 57 | CreateFeynAmp[ tops:TopologyList[info___][___], options___Rule ] :=
|
58 | 58 | Block[ {alevel, pref, next, gaugeru, truncru, momcons, graphinfo, toplist,
|
59 |
| -amps, head, topnr = 1, opt = ActualOptions[CreateFeynAmp, options]}, |
| 59 | +amps, head, topnr = 1, p$nc = Level[P$NonCommuting, {-1}, Alternatives], |
| 60 | +opt = ActualOptions[CreateFeynAmp, options]}, |
60 | 61 |
|
61 | 62 | If[ (alevel = ResolveLevel[AmplitudeLevel /. opt /. {info} /.
|
62 | 63 | Options[InsertFields]]) === $Failed,
|
@@ -329,20 +330,31 @@ explicit spinor index with which it is possible (outside of FeynArts)
|
329 | 330 | e.g. when computing counter terms from the self energies *)
|
330 | 331 | Fixgmc[ c1:_[__, _?SelfConjugate], r___, c2:_[__, _?SelfConjugate] ] :=
|
331 | 332 | dot[c1, r, c2] /;
|
332 |
| - OrderedQ[{c2[[0, 1]][ c2[[2, 1]] ], c1[[0, 1]][ c1[[1, 1]] ]}] |
| 333 | + OrderedQ[{c2[[0, 1]] @ c2[[2, 1]], c1[[0, 1]] @ c1[[1, 1]]}] |
333 | 334 |
|
334 | 335 | Fixgmc[ c__ ] := Reverse[ ReverseProp/@ dot[c] ]
|
335 | 336 |
|
336 | 337 |
|
337 |
| -MakeFermionChains[ top_ ] := top /; FreeQ[top, P$NonCommuting] |
| 338 | +Chkgmc[ c_ ] := Chkgmc[Level[c, {2}][[{1, -2}]], c] |
| 339 | + |
| 340 | +Chkgmc[ {v_, v_}, c_tr ] := c |
| 341 | + |
| 342 | +Chkgmc[ {Vertex[1][_], Vertex[1][_]}, c_dot ] := c |
| 343 | + |
| 344 | +Chkgmc[ _, c_ ] := List@@ c |
| 345 | + |
| 346 | + |
| 347 | +NCSelect[ top_, nc_ ] := ( |
| 348 | + ch = {ch, BuildChain@@ gmc/@ Select[top, !FreeQ[#[[3]], nc]&]}; |
| 349 | + Select[top, FreeQ[#[[3]], nc]&] ) |
| 350 | + |
| 351 | + |
| 352 | +MakeFermionChains[ top_ ] := top /; FreeQ[top, p$nc] |
338 | 353 |
|
339 | 354 | MakeFermionChains[ top_ ] :=
|
340 |
| -Block[ {res, ext}, |
341 |
| - res = Append[ |
342 |
| - Select[top, FreeQ[#[[3]], P$NonCommuting]&], |
343 |
| - BuildChain@@ gmc/@ Select[top, !FreeQ[#[[3]], P$NonCommuting]&] /. |
344 |
| - gmc -> Fixgmc |
345 |
| - ] /. BuildChain -> Sequence; |
| 355 | +Block[ {ch = {}, res, ext}, |
| 356 | + res = Fold[NCSelect, top, Flatten[{P$NonCommuting}]]; |
| 357 | + res = Flatten[{res, Cases[ch, gmc[c__] :> Chkgmc[Fixgmc[c]], Infinity]}]; |
346 | 358 |
|
347 | 359 | (* Since fermion chains are always traversed opposite to the
|
348 | 360 | fermion flow, we need the sign of the permutation that gets
|
@@ -403,7 +415,7 @@ need another (-1)^(Length[ext]/2).
|
403 | 415 | If[ perm === $Failed, Return[{}] ];
|
404 | 416 | v = v[[perm]];
|
405 | 417 | If[ cto < 0,
|
406 |
| - I PV[ If[FreeQ[v, P$NonCommuting], Identity, NonCommutative][ |
| 418 | + I PV[ If[FreeQ[v, p$nc], Identity, NonCommutative][ |
407 | 419 | VertexFunction[-cto]@@ v ] ],
|
408 | 420 | (* else *)
|
409 | 421 | AnalyticalCoupling[cto]@@ v ]
|
@@ -802,8 +814,7 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
|
802 | 814 |
|
803 | 815 | FermionRouting[ gr_:{}, top:P$Topology, ___ ] := Level[
|
804 | 816 | merge@@ Apply[ prop[ #1[[1]], #2[[1]] ]&,
|
805 |
| - Select[AddFieldNo[top] /. List@@ gr, !FreeQ[#, P$NonCommuting]&], |
806 |
| - 1 ], |
| 817 | + Select[AddFieldNo[top] /. List@@ gr, !FreeQ[#, p$nc]&], 1 ], |
807 | 818 | {-1} ]
|
808 | 819 |
|
809 | 820 |
|
|
0 commit comments