Skip to content

Commit 1b509ab

Browse files
t-hahnVladyslav Shtabovenko
authored andcommitted
FeynArts 3.3
1 parent 2351e0c commit 1b509ab

27 files changed

+2677
-1033
lines changed

FeynArts.m

Lines changed: 896 additions & 673 deletions
Large diffs are not rendered by default.

FeynArts/Analytic.m

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Analytic.m
33
Translation of InsertFields output into
44
analytic expressions
5-
last modified 22 Mar 06 th
5+
last modified 10 Jan 08 th
66
*)
77

88
Begin["`Analytic`"]
@@ -507,7 +507,7 @@ need another (-1)^(Length[ext]/2).
507507
ins = ReplacePart[gm, sgen/s, -1] /. {ru} /.
508508
anti -> AntiParticle /.
509509
app[ x_. (fi:P$Generic)[n__], k__ ] :> x fi[n, k];
510-
deltas = DeleteCases[ Union@@ Diagonal/@
510+
deltas = DeleteCases[ Union@@ CouplingDeltas/@
511511
Union[ Cases[ins, G[_][cto_][fi__][__] :> FieldPoint[cto][fi]] ],
512512
_Integer ];
513513
ins = ins /. G -> GtoC /. Mass -> TheMass /. gaugeru /.
@@ -708,6 +708,7 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
708708
Range@@ Sort[Floor[{b, a}]] ]] ]
709709

710710

711+
(*
711712
DiagramSelect[ tops:TopologyList[info__][__], crit_ ] :=
712713
Block[ {lev, Rule},
713714
lev = ResolveLevel[InsertionLevel /. {info}][[-1]];
@@ -717,10 +718,33 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
717718
(Graph[__][__] -> _[]) :> Seq[] /.
718719
(Topology[__][__] -> _[]) :> Seq[]
719720
]
721+
*)
722+
723+
DiagramSelect[ tops:TopologyList[info__][__], crit_ ] :=
724+
Block[ {lev, Rule},
725+
lev = ResolveLevel[InsertionLevel /. {info}][[-1]];
726+
Rule[_] := Sequence[];
727+
Apply[ #1 -> (#2 /. Graph[__, lev == _][fi__] :> Seq[] /;
728+
crit[{fi}, #1] =!= True)&, tops, 1 ] /.
729+
(Graph[__][__] -> _[]) :> Seq[] /.
730+
(Topology[__][__] -> _[]) :> Seq[]
731+
]
720732

721733
DiagramSelect[ amp_, crit_ ] := Select[amp, crit]
722734

723735

736+
Attributes[prop] = {Orderless}
737+
738+
Attributes[merge] = {Flat, Orderless}
739+
740+
merge[ prop[i_, j_], prop[j_, k_] ] := prop[i, k]
741+
742+
FermionRouting[ fields_:{}, top:P$Topology ] := Level[
743+
merge@@ Apply[ prop[ #1[[1]], #2[[1]] ]&,
744+
Select[AddFieldNo[top] /. fields, !FreeQ[#, P$NonCommuting]&], 1 ],
745+
{-1} ]
746+
747+
724748
DiagramComplement[ tops:TopologyList[info__][___],
725749
more:TopologyList[__][___].. ] :=
726750
Block[ {lev = ResolveLevel[InsertionLevel /. {info}][[-1]]},
@@ -769,7 +793,7 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
769793
Global`PolarizationVector[ _, mom_, li_ ] =
770794
Global`PolarizationVector[mom, li];
771795

772-
Global`DiracSpinor[ mom_, mass_, ___ ] := FeynArts`Spinor[mom, mass];
796+
(* Global`DiracSpinor[ mom_, mass_, ___ ] := FeynArts`Spinor[mom, mass]; *)
773797

774798
Index[ Global`Lorentz, n_ ] := Index[Global`Lorentz, n] =
775799
ToExpression["li" <> ToString[n]];

FeynArts/Graphics.m

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(*
22
Graphics.m
33
Graphics routines for FeynArts
4-
last modified 10 Jan 05 th
4+
last modified 4 Sep 07 th
55
*)
66

77
Begin["`Graphics`"]
@@ -73,7 +73,9 @@
7373
SheetHeader -> Automatic,
7474
Numbering -> Full,
7575
FieldNumbers -> False,
76-
DisplayFunction :> $DisplayFunction
76+
If[ $VersionNumber < 6,
77+
DisplayFunction :> $DisplayFunction,
78+
DisplayFunction :> (Print/@ Render[#]&) ]
7779
}
7880

7981
Paint::nolevel =
@@ -227,7 +229,8 @@
227229
opt___?OptionQ ] :=
228230
Block[ {rg},
229231
rg = Render[g, InferFormat[chan, format],
230-
ImageSize -> (ImageSize /. {opt} /. Options[Display])];
232+
ImageSize -> (ImageSize /. {opt} /. Options[Display] /.
233+
ImageSize -> Automatic)];
231234
MapThread[Display[##, format, opt]&,
232235
{FilePerSheet[chan, Length[rg]], rg}]
233236
]
@@ -238,7 +241,8 @@
238241
opt___?OptionQ ] :=
239242
Block[ {rg},
240243
rg = Render[g, InferFormat[chan, format],
241-
ImageSize -> (ImageSize /. {opt} /. Options[Export])];
244+
ImageSize -> (ImageSize /. {opt} /. Options[Export] /.
245+
ImageSize -> Automatic)];
242246
MapThread[Export[##, format, opt]&,
243247
{FilePerSheet[chan, Length[rg]], rg}]
244248
]
@@ -388,11 +392,16 @@
388392
AspectRatio -> rows/cols]
389393
]
390394

395+
391396
DiagramBox[ Null, _ ] = {}
392397

393-
DiagramBox[ g_, {yoff_, xoff_} ] :=
394-
Rectangle[ {xoff - 1, rows - yoff} DiagramSize,
395-
{xoff, rows - yoff + 1} DiagramSize, MmaRender[g] ]
398+
DiagramBox[ g_, {yoff_, xoff_} ] := Inset[ MmaRender[g],
399+
{xoff - 1, rows - yoff} DiagramSize, {0, 0}, {1, 1} DiagramSize ]
400+
401+
If[ $VersionNumber < 6,
402+
Inset[obj_, pos_, _, size_] := Rectangle[pos, pos + size, obj]
403+
]
404+
396405

397406
Title[ ] = {}
398407

0 commit comments

Comments
 (0)