Skip to content

Commit d7338ec

Browse files
t-hahnVladyslav Shtabovenko
authored andcommitted
FeynArts 3.9
1 parent 95eda50 commit d7338ec

File tree

14 files changed

+9723
-110
lines changed

14 files changed

+9723
-110
lines changed

FeynArts.m

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(*
22
3-
This is FeynArts, Version 3.8
4-
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2012
5-
last modified 9 Jul 13 by Thomas Hahn
3+
This is FeynArts, Version 3.9
4+
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2014
5+
last modified 11 Sep 14 by Thomas Hahn
66
77
Release notes:
88
@@ -44,9 +44,9 @@
4444

4545

4646
Print[""];
47-
Print["FeynArts 3.8"];
47+
Print["FeynArts 3.9"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 9 Jul 13"]
49+
Print["last revised 11 Sep 14"]
5050

5151

5252
BeginPackage["FeynArts`"]
@@ -117,8 +117,8 @@
117117
inserted topology or amplitude list amp which is unique to the model
118118
and particle selection."
119119

120-
Pluralize::usage =
121-
"Pluralize is an internal function."
120+
NumberOf::usage =
121+
"NumberOf is an internal function."
122122

123123
Statistics::usage =
124124
"Statistics is an internal function."
@@ -1207,6 +1207,11 @@ integration momenta of the amplitude (empty for tree graphs)."
12071207
NonCommutative::usage =
12081208
"NonCommutative is the head of noncommuting objects in a Feynman rule."
12091209

1210+
LeviCivita::usage =
1211+
"LeviCivita[mu, nu, ro, si] represents -I times the antisymmetric
1212+
Levi-Civita tensor with Lorentz indices mu, nu, ro, si. The sign
1213+
convention is epsilon^{0123} = +1."
1214+
12101215
MatrixTrace::usage =
12111216
"MatrixTrace is the head of a trace of noncommuting objects (i.e. of
12121217
symbols with head NonCommutative in the Feynman rules) in closed fermion
@@ -1362,10 +1367,11 @@ topologies where it specifies whether the field numbers (the n in
13621367
P$Options = (_Rule | _RuleDelayed)...
13631368

13641369

1365-
$FeynArts = 3.8
1370+
$FeynArts = 3.9
13661371

1367-
$FeynArtsDir = DirectoryName[ File /.
1368-
FileInformation[System`Private`FindFile[$Input]] ]
1372+
$FeynArtsDir = DirectoryName[
1373+
$InputFileName /. HoldPattern[$InputFileName] :>
1374+
(File /. FileInformation[System`Private`FindFile[$Input]]) ]
13691375

13701376
$FeynArtsProgramDir = ToFileName[{$FeynArtsDir, "FeynArts"}]
13711377

FeynArts/Analytic.m

Lines changed: 6 additions & 2 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 19 Jul 13 th
5+
last modified 10 Apr 14 th
66
*)
77

88
Begin["`Analytic`"]
@@ -510,6 +510,10 @@ need another (-1)^(Length[ext]/2).
510510
FeynAmpDenominator[ ] = 1
511511

512512

513+
LeviCivita[ lor__ ] := Signature[{lor}] LeviCivita@@ Sort[{lor}] /;
514+
!OrderedQ[{lor}]
515+
516+
513517
SumOver[ i_, {}, ext___ ] := SumOver[i, 0, ext]
514518

515519
SumOver[ i_, NoUnfold[l_], ext___ ] := SumOver[i, l, ext]
@@ -814,7 +818,7 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
814818

815819

816820
FeynAmpExpr[ gr:FeynmanGraph[__, lev_ == _][__], top:P$Topology, h_ ] :=
817-
Block[ {$Verbose = 0},
821+
Block[ {FAPrint},
818822
CreateFeynAmp[ h[top -> toins[lev, gr]],
819823
AmplitudeLevel -> {lev} ]
820824
]

FeynArts/Graphics.m

Lines changed: 31 additions & 33 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 2 Jun 12 th
4+
last modified 11 Jul 14 th
55
*)
66

77
Begin["`Graphics`"]
@@ -190,7 +190,7 @@
190190
shapedata[[3]] }];
191191
vertexplot = VGraphics/@ Vertices[top] /. shapedata[[1]];
192192
++topnr;
193-
FAPrint[2, "> Top. ", topnr, ": ", Pluralize[{Length[gr]}, " diagram"]];
193+
FAPrint[2, "> Top. ", topnr, ": ", NumberOf[{Length[gr]}, " diagram"]];
194194
dhead[#]@@ Flatten[{
195195
PGraphics@@@ (gtop /. List@@ # /. Field[_] -> 0),
196196
vertexplot }]&/@ List@@ gr
@@ -514,7 +514,7 @@
514514
t = Flatten[{type}];
515515
h = Position[t, Straight | ScalarDash | GhostDash | Sine | Cycles, 1];
516516
dphi *= 2./Length[h];
517-
line = scope[MapAt[HalfLine[#, phi += dphi, dphi]&, t, h]];
517+
line = scope[MapAt[PropSegment[#, phi += dphi, dphi]&, t, h]];
518518

519519
If[ arrow =!= 0,
520520
h = .5 arrow ArrowLength {Cos[dir], Sin[dir]};
@@ -569,7 +569,7 @@
569569
]
570570

571571

572-
HalfLine[ Sine, phi_, dphi_ ] :=
572+
PropSegment[ Sine, phi_, dphi_ ] :=
573573
Block[ {arc, w, n},
574574
arc = rad Abs[dphi];
575575
w = 2. NPi (.5 + Max[1, Round[NCrestsSine arc]]);
@@ -585,7 +585,7 @@
585585

586586
sphadj = Sin[phadj]
587587

588-
HalfLine[ Cycles, phi_, dphi_ ] :=
588+
PropSegment[ Cycles, phi_, dphi_ ] :=
589589
Block[ {arc, w, n, phamp},
590590
arc = rad Abs[dphi];
591591
w = 2. (phadj + NPi Max[1, Round[NCrestsCycles arc]]);
@@ -598,17 +598,17 @@
598598
{n, 0, 1, 1./Floor[2 NPoints arc]} ] ]
599599
]
600600

601-
HalfLine[ Straight, phi_, dphi_ ] :=
601+
PropSegment[ Straight, phi_, dphi_ ] :=
602602
If[ rad < 20000,
603603
Circle[ctr, rad, Sort[{phi - dphi, phi}]],
604604
Line[{ ctr + rad {Cos[phi - dphi], Sin[phi - dphi]},
605605
ctr + rad {Cos[phi], Sin[phi]} }] ]
606606

607-
HalfLine[ ScalarDash, phi_, dphi_ ] :=
608-
scope[ ScalarDashing, HalfLine[Straight, phi, dphi] ]
607+
PropSegment[ ScalarDash, phi_, dphi_ ] :=
608+
scope[ ScalarDashing, PropSegment[Straight, phi, dphi] ]
609609

610-
HalfLine[ GhostDash, phi_, dphi_ ] :=
611-
scope[ GhostDashing, HalfLine[Straight, phi, dphi] ]
610+
PropSegment[ GhostDash, phi_, dphi_ ] :=
611+
scope[ GhostDashing, PropSegment[Straight, phi, dphi] ]
612612

613613

614614
PropLabel[ label_, labelpos_, arrow_, type_ ] :=
@@ -675,28 +675,26 @@
675675
tex
676676
]
677677

678-
If[ $Notebooks,
678+
If[ $VersionNumber >= 6 || $Notebooks,
679679

680-
MmaRender[ LabelText[t_, r__] ] :=
681-
NotebookChar[Flatten[{ToUnicode[t]}], r];
680+
MmaRender[ LabelText[t_, pos_, align_, size_, ___] ] := Text[
681+
StyleForm[DisplayForm[MmaChar@@ Flatten[{ToUnicode[t]}]],
682+
FontFamily -> LabelFont,
683+
FontSize -> size fsize],
684+
pos, align ];
682685

683-
NotebookChar[ {t_, sub_:" ", super_:" ", over_:" "},
684-
pos_, align_, size_, ___ ] :=
685-
Block[ {label = t},
686-
If[ over =!= " ", label = OverscriptBox[label, over] ];
687-
Which[
688-
sub =!= " " && super =!= " ",
689-
label = SubsuperscriptBox[label, sub, super],
690-
sub =!= " ",
691-
label = SubscriptBox[label, sub],
692-
super =!= " ",
693-
label = SuperscriptBox[label, super]
694-
];
695-
Text[
696-
StyleForm[DisplayForm[label], FontFamily -> LabelFont,
697-
FontSize -> size fsize],
698-
pos, align ]
699-
],
686+
MmaChar[t__, Null] := MmaChar[t];
687+
688+
MmaChar[t_, sub_, super_, over_] :=
689+
MmaChar[OverscriptBox[t, over], sub, super];
690+
691+
MmaChar[t_, Null, super_] := SuperscriptBox[t, super];
692+
693+
MmaChar[t_, sub_, super_] := SubsuperscriptBox[t, sub, super];
694+
695+
MmaChar[t_, sub_] := SubscriptBox[t, sub];
696+
697+
MmaChar[t_] := RowBox[{t}],
700698

701699
(* else $Notebooks *)
702700

@@ -1338,9 +1336,9 @@
13381336
ToUnicode[ "\\Rightarrow" ] = "\[DoubleRightArrow]";
13391337
ToUnicode[ "\\Uparrow" ] = "\[DoubleUpArrow]";
13401338
ToUnicode[ "\\Downarrow" ] = "\[DoubleDownArrow]";
1341-
ToUnicode[ "\\bar" ] = "-";
1339+
ToUnicode[ "\\bar" ] = "_";
13421340
ToUnicode[ "\\hat" ] = "^";
1343-
ToUnicode[ "\\tilde" ] = "\[Tilde]";
1341+
ToUnicode[ "\\tilde" ] = "~";
13441342
ToUnicode[ "\\dot" ] = "\[CenterDot]";
13451343
ToUnicode[ "\\ddot" ] = "\[CenterDot]\[CenterDot]";
13461344
ToUnicode[ "\\vec" ] = "\[RightVector]";
@@ -1350,7 +1348,7 @@
13501348
ToUnicode[ "\\$" ] = "$";
13511349
ToUnicode[ "\\%" ] = "%";
13521350
ToUnicode[ "\\_" ] = "_";
1353-
ToUnicode[ Null ] = " ";
1351+
ToUnicode[ Null ] = Null;
13541352
ToUnicode[ ComposedChar[t__] ] := ToUnicode/@ {t};
13551353
ToUnicode[ c_ ] := ToString[c]
13561354

FeynArts/Insert.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Insert.m
33
Insertion of fields into topologies created by
44
CreateTopologies.
5-
last modified 5 Jul 13 th
5+
last modified 10 Jul 14 th
66
77
The insertion is done in 3 levels: insertion of generic fields (Generic),
88
of classes of a certain model (Classes) or of the members of the classes
@@ -252,14 +252,14 @@ of classes of a certain model (Classes) or of the members of the classes
252252
ParticleLookup[ fp_, p_ ] := ParticleLookup[fp, p, p]
253253

254254
ParticleLookup[ fp_, mp_, p_ ] := Flatten[ Compatibles[mp, #]&/@
255-
Lookup[ fp[[0, 1]] ][p, FieldPoint@@ (fp /. _Field -> p)] ]
255+
FieldLookup[ fp[[0, 1]] ][p, FieldPoint@@ (fp /. _Field -> p)] ]
256256

257257

258-
Lookup[ cto_?NonNegative ] = PossibleFields[cto]
258+
FieldLookup[ cto_?NonNegative ] = PossibleFields[cto]
259259

260-
Lookup[ cto_ ][ 0, fp_ ] := PossibleFields[-cto][0, fp]
260+
FieldLookup[ cto_ ][ 0, fp_ ] := PossibleFields[-cto][0, fp]
261261

262-
Lookup[ _ ][ p_, fp_ ] :=
262+
FieldLookup[ _ ][ p_, fp_ ] :=
263263
Block[ {n = Position[fp, p, {1}, 1]},
264264
Select[
265265
Select[F$Classes, !FreeQ[#, p]&],

FeynArts/Utilities.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(*
22
Utilities.m
33
diverse utility functions for other parts of FA
4-
last modified 13 May 13 th
4+
last modified 11 Jul 14 th
55
*)
66

77
Begin["`Utilities`"]
@@ -193,11 +193,11 @@ the permutable vertices (those with negative indices), unionize it,
193193
s_Symbol /; Context[s] === "System`" ] /. -1 -> "-" )]
194194

195195

196-
Pluralize[ n_, what_ ] :=
196+
NumberOf[ n_, what_ ] :=
197197
ToString/@ n <> what <> If[Plus@@ Cases[n, _Integer] === 1, "", "s"]
198198

199199
Statistics[ expr_, levels_, what_ ] :=
200-
Pluralize[
200+
NumberOf[
201201
Rest[Flatten[ {
202202
", ",
203203
Plus@@

FeynArts38.m renamed to FeynArts39.m

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(*
22
3-
This is FeynArts, Version 3.8
4-
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2012
5-
last modified 9 Jul 13 by Thomas Hahn
3+
This is FeynArts, Version 3.9
4+
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2014
5+
last modified 11 Sep 14 by Thomas Hahn
66
77
Release notes:
88
@@ -44,9 +44,9 @@
4444

4545

4646
Print[""];
47-
Print["FeynArts 3.8"];
47+
Print["FeynArts 3.9"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 9 Jul 13"]
49+
Print["last revised 11 Sep 14"]
5050

5151

5252
BeginPackage["FeynArts`"]
@@ -117,8 +117,8 @@
117117
inserted topology or amplitude list amp which is unique to the model
118118
and particle selection."
119119

120-
Pluralize::usage =
121-
"Pluralize is an internal function."
120+
NumberOf::usage =
121+
"NumberOf is an internal function."
122122

123123
Statistics::usage =
124124
"Statistics is an internal function."
@@ -1207,6 +1207,11 @@ integration momenta of the amplitude (empty for tree graphs)."
12071207
NonCommutative::usage =
12081208
"NonCommutative is the head of noncommuting objects in a Feynman rule."
12091209

1210+
LeviCivita::usage =
1211+
"LeviCivita[mu, nu, ro, si] represents -I times the antisymmetric
1212+
Levi-Civita tensor with Lorentz indices mu, nu, ro, si. The sign
1213+
convention is epsilon^{0123} = +1."
1214+
12101215
MatrixTrace::usage =
12111216
"MatrixTrace is the head of a trace of noncommuting objects (i.e. of
12121217
symbols with head NonCommutative in the Feynman rules) in closed fermion
@@ -1362,10 +1367,11 @@ topologies where it specifies whether the field numbers (the n in
13621367
P$Options = (_Rule | _RuleDelayed)...
13631368

13641369

1365-
$FeynArts = 3.8
1370+
$FeynArts = 3.9
13661371

1367-
$FeynArtsDir = DirectoryName[ File /.
1368-
FileInformation[System`Private`FindFile[$Input]] ]
1372+
$FeynArtsDir = DirectoryName[
1373+
$InputFileName /. HoldPattern[$InputFileName] :>
1374+
(File /. FileInformation[System`Private`FindFile[$Input]]) ]
13691375

13701376
$FeynArtsProgramDir = ToFileName[{$FeynArtsDir, "FeynArts"}]
13711377

0 commit comments

Comments
 (0)