Skip to content

Commit 59b9c30

Browse files
t-hahnVladyslav Shtabovenko
authored andcommitted
FeynArts 3.5
1 parent 08b032d commit 59b9c30

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1444
-646
lines changed

FeynArts.m

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(*
22
3-
This is FeynArts, Version 3.4
4-
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2009
5-
last modified 29 Jun 09 by Thomas Hahn
3+
This is FeynArts, Version 3.5
4+
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2010
5+
last modified 16 Apr 10 by Thomas Hahn
66
77
Release notes:
88
@@ -44,9 +44,9 @@
4444

4545

4646
Print[""];
47-
Print["FeynArts 3.4"];
47+
Print["FeynArts 3.5"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 19 Jun 09"]
49+
Print["last revised 16 Apr 10"]
5050

5151

5252
BeginPackage["FeynArts`"]
@@ -85,15 +85,25 @@
8585
"Seq is almost identical to Sequence except that it is not expanded
8686
automatically."
8787

88-
Vertices::usage =
89-
"Vertices[top] returns a list of all vertices of topology top."
88+
TakeGraph::usage =
89+
"TakeGraph[ins -> graph] returns graph."
90+
91+
TakeIns::usage =
92+
"TakeIns[ins -> graph] returns ins."
93+
94+
Subst::usage =
95+
"Subst[expr, i, j] substitutes the elements of i by the corresponding
96+
elements of j, where j may be shorter than i."
9097

9198
PSort::usage =
9299
"PSort[p] sorts the first two elements of a propagator p."
93100

94101
VSort::usage =
95102
"VSort[v] sorts vertex v into canonical order."
96103

104+
Vertices::usage =
105+
"Vertices[top] returns a list of all vertices of topology top."
106+
97107
AddFieldNo::usage =
98108
"AddFieldNo[top] adds numbers of the form Field[n] to the propagators in
99109
topology top."
@@ -831,6 +841,11 @@ on a propagator of type t (External, Internal, Loop)."
831841
field fi carries. For example, KinematicIndices[V] = {Lorentz} in
832842
Lorentz.gen."
833843

844+
FieldNumber::usage =
845+
"FieldNumber[f] can be used in the AnalyticalPropagator and
846+
AnalyticalCoupling definitions of the Generic model file to find out
847+
the ordinal number of a field in the diagram being inserted."
848+
834849
MatrixTraceFactor::usage =
835850
"MatrixTraceFactor -> n is an optional entry for fermions in the
836851
M$ClassesDescription list. A MatrixTrace (a closed loop of fermions) is
@@ -845,6 +860,11 @@ on a propagator of type t (External, Internal, Loop)."
845860
SelfConjugate[p] is True if field p is self-conjugate and False
846861
otherwise."
847862

863+
Mixture::usage =
864+
"Mixture -> lc is an optional entry in the M$ClassesDescription list
865+
which specifies that the field is the linear combination lc of other
866+
fields."
867+
848868
InsertOnly::usage =
849869
"InsertOnly is an entry in the M$ClassesDescription list. It specifies
850870
the types of progators the particle may be inserted into. If not
@@ -937,6 +957,11 @@ as arguments the quantum numbers of the involved fields (times -1 for
937957
example, IndexStyle[Index[Lorentz, i_]] := Greek[i + 11] makes Lorentz
938958
indices appear as \"\\mu\", \"\\nu\", etc."
939959

960+
TheCoeff::usage =
961+
"TheCoeff[f] gives the list of component fields of which f is a
962+
linear combination together with the respective coefficients.
963+
For a non-composite field, TheCoeff returns the field itself."
964+
940965
TheC::usage =
941966
"TheC is an internal symbol for storing the coupling matrices."
942967

@@ -1006,12 +1031,6 @@ as arguments the quantum numbers of the involved fields (times -1 for
10061031
"VertexFunction[o][f1, f2, ...] represents the 1PI vertex function of
10071032
loop-order o with external fields f1, f2, ..."
10081033

1009-
TakeGraph::usage =
1010-
"TakeGraph[ins -> graph] returns graph."
1011-
1012-
TakeIns::usage =
1013-
"TakeIns[ins -> graph] returns ins."
1014-
10151034
FindVertex::usage =
10161035
"FindVertex[vert, lev] looks up vertex vert in the currently initialized
10171036
model where lev = Generic or Classes. If a match is found, the
@@ -1238,6 +1257,8 @@ topologies where it specifies whether the field numbers (the n in
12381257
topology. This code is unique as far painting the topology is
12391258
concerned."
12401259

1260+
{TopBottom, LeftRight} (* visible for printing *)
1261+
12411262

12421263
(* FeynArts system constants *)
12431264

@@ -1263,6 +1284,9 @@ topologies where it specifies whether the field numbers (the n in
12631284
"$ShapeDataDir points to the directory which contains the data for
12641285
drawing Feynman diagrams."
12651286

1287+
P$Options::usage =
1288+
"P$Options is a pattern for options."
1289+
12661290
P$Topology::usage =
12671291
"P$Topology is the pattern for a topology."
12681292

@@ -1286,7 +1310,10 @@ topologies where it specifies whether the field numbers (the n in
12861310
P$InsertionObjects = G[_][_][__][__] | _Mass | _GaugeXi |
12871311
VertexFunction[_][__]
12881312

1289-
$FeynArts = 3.4
1313+
P$Options = (_Rule | _RuleDelayed)...
1314+
1315+
1316+
$FeynArts = 3.5
12901317

12911318
$FeynArtsDir = DirectoryName[ File /.
12921319
FileInformation[System`Private`FindFile[$Input]] ]

FeynArts/Analytic.m

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
Analytic.m
33
Translation of InsertFields output into
44
analytic expressions
5-
last modified 19 Jun 09 th
5+
last modified 16 Apr 10 th
66
*)
77

88
Begin["`Analytic`"]
99

1010
Options[ CreateFeynAmp ] = {
1111
AmplitudeLevel -> InsertionLevel, (* i.e. taken from InsertFields *)
12-
GaugeRules -> {_GaugeXi -> 1,
13-
Global`MG0 -> Global`MZ, Global`MGp -> Global`MW},
12+
GaugeRules -> {_GaugeXi -> 1},
1413
PreFactor -> -I (2 Pi)^(-4 LoopNumber),
1514
Truncated -> False,
1615
MomentumConservation -> True
@@ -231,6 +230,10 @@ Since momenta on tree propagators (Propagator[Internal])
231230
orig[__] :> Seq[]
232231
]
233232

233+
FieldNumber[ fi_ ] := Sequence@@ Cases[fi, Field[n_] -> n, Infinity, 1] /;
234+
!FreeQ[fi, orig]
235+
236+
234237
(* Create the basic amplitude *)
235238

236239
CreateAmpGraph[ top_, Graph[s_, ___][ru__] ] :=
@@ -287,7 +290,7 @@ Since momenta on tree propagators (Propagator[Internal])
287290
This works unambiguously (i.e. correctly) only if fermion chains
288291
never "touch", i.e. if there are at most two fermions at each vertex.
289292
This is always the case in renormalizable theories. Effective theories
290-
may however contain 4- or more fermion vertices, typically as a result
293+
may however contain 4- or more-fermion vertices, typically as a result
291294
of integrating out heavy bosons, such as in the Fermi model. In such a
292295
case one must set $FermionLines = False and give the fermion fields an
293296
explicit spinor index with which it is possible (outside of FeynArts)
@@ -296,7 +299,7 @@ explicit spinor index with which it is possible (outside of FeynArts)
296299
ReverseProp[ pr_[from_, to_, part_] ] :=
297300
pr[to, from, AntiParticle[part]]
298301

299-
Attributes[BuildChain] = {Flat, Orderless}
302+
Attributes[ BuildChain ] = {Flat, Orderless}
300303

301304
BuildChain[ c1:_[___, _[_, v_, _]], c2:_[_[v_, __], ___] ] :=
302305
Join[c1, c2]
@@ -520,7 +523,7 @@ need another (-1)^(Length[ext]/2).
520523
anti -> AntiParticle /.
521524
app[ x_. (fi:P$Generic)[n__], k__ ] :> x fi[n, k];
522525
deltas = DeleteCases[ Union@@ CouplingDeltas/@
523-
Union[ Cases[ins, G[_][cto_][fi__][__] :> FieldPoint[cto][fi]] ],
526+
Union[ Cases[ins, G[_][cto_][fi__][_] :> FieldPoint[cto][fi]] ],
524527
_Integer ];
525528
ins = ins /. G -> GtoC /. Mass -> TheMass /. gaugeru /.
526529
_MTF -> 1 /. Thread[deltas -> 1];
@@ -541,36 +544,40 @@ need another (-1)^(Length[ext]/2).
541544
kinematical expression (for a G[-]). If neither method resolves TheC,
542545
it will issue a warning and return C[cto][fields][kinpart]. *)
543546

544-
GtoC[ sym_ ][ cto_ ][ fi__ ][ kin__ ] :=
545-
Block[ {vert, cv, perm, kinpart, nc},
546-
vert = MixingPartners[#][[-1]]&/@ {fi};
547+
GtoC[ sym_ ][ cto_ ][ fi__ ][ k_ ] :=
548+
Block[ {vert, perm, ferm, kin, cv},
549+
vert = Last/@ MixingPartners/@ {fi};
550+
547551
perm = FindVertex[ToClasses[vert], Classes];
548-
If[ perm === $Failed, Return[(C[cto]@@ vert)@@ kin] ];
549-
cv = vert[[perm]];
550-
kinpart = {kin} /. MapIndexed[KinRule, perm];
552+
If[ perm === $Failed, Return[C[cto][fi][k]] ];
551553

552-
nc = Cases[vert, _. P$NonCommuting[__]];
553-
If[ nc =!= Cases[cv, _. P$NonCommuting[__]],
554-
If[ Length[nc] > 2, Message[CreateFeynAmp::ambig, vert] ];
555-
kinpart = kinpart /. M$FlippingRules ];
554+
ferm = Cases[vert, _. _F];
555+
vert = vert[[perm]];
556+
kin = k /. MapIndexed[KinRule, perm];
557+
If[ ferm =!= Cases[vert, _. _F],
558+
If[ Length[ferm] > 2, Message[CreateFeynAmp::ambig, vert] ];
559+
kin = kin /. M$FlippingRules ];
556560

557-
(* try to resolve coupling *)
558-
If[ Head[cv = (TheC@@ kinpart)@@ cv] =!= List && sym === -1,
559-
cv = -MapAt[-#&, cv, {0, 1}] ];
561+
cv = SignResolve[sym, TheC[kin]@@ vert];
560562

561563
If[ !FreeQ[cv, TheC],
562-
Message[CreateFeynAmp::nocoupl, vert, kinpart];
563-
Return[ (C[cto]@@ vert)@@ kinpart ] ];
564+
Message[CreateFeynAmp::nocoupl, vert, kin];
565+
Return[C[cto][fi][k]] ];
564566

565567
(* check requested counter-term order *)
566568
If[ Length[cv] <= cto,
567569
Message[CreateFeynAmp::counter, vert, cto];
568-
Return[ (C[cto]@@ vert)@@ kinpart ] ];
570+
Return[C[cto][fi][k]] ];
569571

570572
cv[[cto + 1]]
571573
]
572574

573575

576+
SignResolve[ -1, TheC[kin_][cv__] ] := -TheC[-kin][cv]
577+
578+
SignResolve[ _, c_ ] = c
579+
580+
574581
KinRule[i_, {i_}] = Sequence[]
575582

576583
KinRule[i_, {j_}] = (obj:Alternatives@@ Prepend[KIs, Mom])[i] -> obj[j]
@@ -593,9 +600,8 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
593600
Message[FindVertex::novert, v];
594601
Return[$Failed] ];
595602
fp = ReferenceOrder[lev][[ pos[[1, 1]] ]];
596-
pos = Ordering[v];
597-
MapThread[(pos[[#1]] = #2)&, {Ordering[fp], pos}];
598-
pos
603+
fp[[ Ordering[fp] ]] = Ordering[v];
604+
fp
599605
]
600606

601607

@@ -755,9 +761,9 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
755761
]
756762

757763

758-
Attributes[prop] = {Orderless}
764+
Attributes[ prop ] = {Orderless}
759765

760-
Attributes[merge] = {Flat, Orderless}
766+
Attributes[ merge ] = {Flat, Orderless}
761767

762768
merge[ prop[i_, j_], prop[j_, k_] ] := prop[i, k]
763769

FeynArts/FeynArts.pro

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -56,64 +56,65 @@ cosommc mul midx add /midx exch def sinommc mul midy add /midy exch def h
5656
dup cosommc mul ctrx add /ctrx exch def sinommc mul ctry add /ctry exch
5757
def } ifelse /arrow exch def arrow 0 eq { /damping { pop 1 } def } {
5858
/damping { ommc sub abs //Degree mul rad mul dup mul dup mul dup
59-
//DampingConst add div } bind def } ifelse /phi ommc dphi sub def /dphi
60-
dphi dup add 2 index length div def //PropagatorThickness setlinewidth 1
61-
setlinecap fromx fromy moveto { cvx exec /phi phi dphi add def } forall
62-
stroke arrow 0 ne { newpath rad 20000 ge { //ArrowLength arrow mul dup
63-
dir cos mul /x exch def dir sin mul /y exch def x .5 mul midx add y .5
64-
mul midy add moveto x /x cosommc //ArrowHeight mul def x add neg y /y
65-
sinommc //ArrowHeight mul def y add neg rlineto x dup add y dup add
66-
rlineto } { ommc dir sub sin 0 le { /arrow arrow neg def } if /rad rad
67-
dup add def /ctrx ctrx dup add midx sub def /ctry ctry dup add midy sub
68-
def /dphi //ArrowLength .5 mul rad atan arrow mul def ommc dphi sub dup
69-
cos rad mul ctrx add /tipx exch def sin rad mul ctry add /tipy exch def
70-
ommc dphi add dup /sinommc exch sin def /cosommc exch cos def rad
71-
//ArrowHeight sub arrowarc arrow 1 eq { arc } { arcn } ifelse rad
72-
//ArrowHeight add arrowarc exch arrow 1 eq { arcn } { arc } ifelse }
73-
ifelse closepath fill } if } bind def /arrowarc { dup cosommc mul ctrx
74-
add /tailx exch def sinommc mul ctry add /taily exch def tailx tipx sub
75-
tipy taily sub dup dup mul 2 index dup mul add dup .25 mul rad dup mul
76-
exch sub exch div sqrt arrow mul dup 3 -1 roll mul tailx tipx add .5 mul
77-
add /midx exch def mul taily tipy add .5 mul add /midy exch def midx midy
78-
rad tipy midy sub tipx midx sub atan taily midy sub tailx midx sub atan }
79-
bind def /Straight { rad 20000 lt { ctrx ctry rad phi phi dphi add dphi 0
80-
ge { arc } { arcn } ifelse } { phi dphi add dup cos rad mul ctrx add exch
81-
sin rad mul ctry add lineto } ifelse } bind def /Dash { currentpoint
82-
stroke moveto 0 setdash Straight currentpoint stroke moveto [ ] 0 setdash
83-
} bind def /ScalarDash { //ScalarDashing Dash } bind def /GhostDash {
59+
//DampingConst add div } bind def } ifelse /pcs 0 def dup {
60+
//FeynArtsDict exch known { /pcs pcs 1 add def } if } forall /phi ommc
61+
dphi sub def /dphi dphi dup add pcs div def //PropagatorThickness
62+
setlinewidth 1 setlinecap gsave fromx fromy moveto exec stroke arrow 0 ne
63+
{ newpath rad 20000 ge { //ArrowLength arrow mul dup dir cos mul /x exch
64+
def dir sin mul /y exch def x .5 mul midx add y .5 mul midy add moveto x
65+
/x cosommc //ArrowHeight mul def x add neg y /y sinommc //ArrowHeight mul
66+
def y add neg rlineto x dup add y dup add rlineto } { ommc dir sub sin 0
67+
le { /arrow arrow neg def } if /rad rad dup add def /ctrx ctrx dup add
68+
midx sub def /ctry ctry dup add midy sub def /dphi //ArrowLength .5 mul
69+
rad atan arrow mul def ommc dphi sub dup cos rad mul ctrx add /tipx exch
70+
def sin rad mul ctry add /tipy exch def ommc dphi add dup /sinommc exch
71+
sin def /cosommc exch cos def rad //ArrowHeight sub arrowarc arrow 1 eq {
72+
arc } { arcn } ifelse rad //ArrowHeight add arrowarc exch arrow 1 eq {
73+
arcn } { arc } ifelse } ifelse closepath fill } if grestore } bind def
74+
/arrowarc { dup cosommc mul ctrx add /tailx exch def sinommc mul ctry add
75+
/taily exch def tailx tipx sub tipy taily sub dup dup mul 2 index dup mul
76+
add dup .25 mul rad dup mul exch sub exch div sqrt arrow mul dup 3 -1
77+
roll mul tailx tipx add .5 mul add /midx exch def mul taily tipy add .5
78+
mul add /midy exch def midx midy rad tipy midy sub tipx midx sub atan
79+
taily midy sub tailx midx sub atan } bind def /Straight { rad 20000 lt {
80+
ctrx ctry rad phi phi dphi add dphi 0 ge { arc } { arcn } ifelse } { phi
81+
dphi add dup cos rad mul ctrx add exch sin rad mul ctry add lineto }
82+
ifelse /phi phi dphi add def } bind def /Dash { currentpoint stroke
83+
moveto 0 setdash Straight currentpoint stroke moveto [ ] 0 setdash } bind
84+
def /ScalarDash { //ScalarDashing Dash } bind def /GhostDash {
8485
//GhostDashing Dash } bind def /Sine { /a dphi abs //Degree mul rad mul
8586
def /omega //NCrestsSine a mul round dup 1 lt { pop 1 } if .5 add dup add
8687
180 mul def 0 1 //NPoints a mul floor div 1 { /n exch def /a phi n dphi
8788
mul add def rad a damping //SineAmp mul n omega mul sin mul sub dup a cos
88-
mul ctrx add exch a sin mul ctry add lineto } for } bind def /rshift
89-
CyclesAmp SineAmp sub def /phadj rshift CyclesAmp div acos def /sinphadj
90-
phadj sin def /Cycles { /a dphi abs //Degree mul rad mul def /omega
91-
//NCrestsCycles a mul round dup 1 lt { pop 1 } if 180 mul //phadj add dup
92-
add def /phamp //CyclesBreadth 180 mul rad div dphi 0 lt { neg } if def 0
93-
1 //NPoints a mul dup add floor div 1 { /n exch def n omega mul //phadj
94-
sub dup cos //CyclesAmp mul //rshift sub rad add /a exch def sin n dup
95-
add 1 sub //sinphadj mul sub phamp mul phi add n dphi mul add dup cos a
96-
mul ctrx add exch sin a mul ctry add lineto } for } bind def /lfont
97-
//LabelFont findfont def /sfont /Symbol findfont def /slant //lfont dup
98-
/FontInfo known { /FontInfo get dup /ItalicAngle known { /ItalicAngle get
99-
sin -.5 mul } { pop 0 } ifelse } { pop 0 } ifelse def /Label { /fsize
100-
exch //LabelFontSize mul def /super .38 def /putchar { false charpath }
101-
bind def /chardim { flattenpath pathbbox /height exch def 3 -1 roll sub
102-
/width exch def pop /icorr font //sfont eq { 0 } { //slant height mul }
103-
ifelse def } bind def /font //lfont def newpath 0 0 moveto 4 index exec
104-
flattenpath pathbbox newpath 2 index sub 5 -1 roll 1 add mul -.5 mul 6 -1
105-
roll add 3 -1 roll sub exch 2 index sub 4 -1 roll 1 add mul -.5 mul 4 -1
106-
roll add 3 -1 roll sub exch moveto /putchar { show } bind def /chardim {
107-
} def /font //lfont def exec newpath } bind def /$ { /font //sfont def }
108-
bind def /# { font fsize scalefont setfont putchar currentpoint /y exch
109-
def /x exch def chardim /font //lfont def } bind def /_ { font fsize .66
110-
mul scalefont setfont /super .5 def x .042 fsize mul add y .133 fsize mul
111-
sub moveto putchar /font //lfont def } bind def /^ { font fsize .66 mul
112-
scalefont setfont x .083 fsize mul add y super fsize mul add moveto
113-
putchar /font //lfont def } bind def /~ { font fsize scalefont setfont
114-
dup stringwidth height add .44 fsize mul sub y add exch -.8 mul width .45
115-
mul sub icorr add x add exch moveto putchar /font //lfont def } bind def
116-
end
89+
mul ctrx add exch a sin mul ctry add lineto } for /phi phi dphi add def }
90+
bind def /rshift CyclesAmp SineAmp sub def /phadj rshift CyclesAmp div
91+
acos def /sinphadj phadj sin def /Cycles { /a dphi abs //Degree mul rad
92+
mul def /omega //NCrestsCycles a mul round dup 1 lt { pop 1 } if 180 mul
93+
//phadj add dup add def /phamp //CyclesBreadth 180 mul rad div dphi 0 lt
94+
{ neg } if def 0 1 //NPoints a mul dup add floor div 1 { /n exch def n
95+
omega mul //phadj sub dup cos //CyclesAmp mul //rshift sub rad add /a
96+
exch def sin n dup add 1 sub //sinphadj mul sub phamp mul phi add n dphi
97+
mul add dup cos a mul ctrx add exch sin a mul ctry add lineto } for /phi
98+
phi dphi add def } bind def /lfont //LabelFont findfont def /sfont
99+
/Symbol findfont def /slant //lfont dup /FontInfo known { /FontInfo get
100+
dup /ItalicAngle known { /ItalicAngle get sin -.5 mul } { pop 0 } ifelse
101+
} { pop 0 } ifelse def /Label { /fsize exch //LabelFontSize mul def
102+
/super .38 def /putchar { false charpath } bind def /chardim {
103+
flattenpath pathbbox /height exch def 3 -1 roll sub /width exch def pop
104+
/icorr font //sfont eq { 0 } { //slant height mul } ifelse def } bind def
105+
/font //lfont def newpath 0 0 moveto 4 index exec flattenpath pathbbox
106+
newpath 2 index sub 5 -1 roll 1 add mul -.5 mul 6 -1 roll add 3 -1 roll
107+
sub exch 2 index sub 4 -1 roll 1 add mul -.5 mul 4 -1 roll add 3 -1 roll
108+
sub exch moveto /putchar { show } bind def /chardim { } def /font //lfont
109+
def exec newpath } bind def /$ { /font //sfont def } bind def /# { font
110+
fsize scalefont setfont putchar currentpoint /y exch def /x exch def
111+
chardim /font //lfont def } bind def /_ { font fsize .66 mul scalefont
112+
setfont /super .5 def x .042 fsize mul add y .133 fsize mul sub moveto
113+
putchar /font //lfont def } bind def /^ { font fsize .66 mul scalefont
114+
setfont x .083 fsize mul add y super fsize mul add moveto putchar /font
115+
//lfont def } bind def /~ { font fsize scalefont setfont dup stringwidth
116+
height add .44 fsize mul sub y add exch -.8 mul width .45 mul sub icorr
117+
add x add exch moveto putchar /font //lfont def } bind def end
117118
%%EndResource
118119
%%EndProlog
119120

0 commit comments

Comments
 (0)