Skip to content

Commit 2351e0c

Browse files
t-hahnVladyslav Shtabovenko
authored andcommitted
FeynArts 3.2
1 parent f4d1efc commit 2351e0c

File tree

1,289 files changed

+6804
-8587
lines changed

Some content is hidden

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

1,289 files changed

+6804
-8587
lines changed

Convert31to32.m

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
(*
2+
Convert31to32.m
3+
renames the ShapeData files of FeynArts 3.1
4+
for the new naming scheme of FeynArts 3.2
5+
last modified 1 Jul 03 th
6+
*)
7+
8+
9+
Needs["FeynArts`"]
10+
11+
shapeDir = ToFileName[Directory[], "ShapeData"]
12+
13+
If[ FileType[shapeDir] =!= Directory,
14+
Print["No directory ", shapeDir, " found"];
15+
Abort[]
16+
]
17+
18+
backupDir = ToFileName[Directory[], "ShapeData-3.1"]
19+
20+
If[ FileType[backupDir] === Directory,
21+
Print["Conversion already performed (", backupDir, " exists)."];
22+
Abort[]
23+
]
24+
25+
26+
RenameFile[shapeDir, backupDir]
27+
28+
29+
MkDir[dir_String] := dir /; FileType[dir] === Directory
30+
31+
MkDir[dir_String] := Check[CreateDirectory[dir], Abort[]]
32+
33+
MkDir[dirs__String] := Fold[MkDir[ToFileName[##]]&, {}, {dirs}]
34+
35+
36+
newName[s_String] :=
37+
Block[ {c, p, int = "0", out = "0", in = "0"},
38+
c = Characters[StringReplace[s, ".m" -> ""]];
39+
p = Position[c, "+"];
40+
If[ p =!= {},
41+
p = p[[1, 1]];
42+
in = str[Drop[c, p]];
43+
c = Take[c, p - 1];
44+
];
45+
p = Position[c, "-"];
46+
If[ p =!= {},
47+
p = p[[1, 1]];
48+
out = str[Drop[c, p]];
49+
c = Take[c, p - 1];
50+
];
51+
int = str[c] <> ".m";
52+
CopyFile[s, ToFileName[MkDir[shapeDir, in, out], int]]
53+
]
54+
55+
str[c_] := StringJoin[Partition[c, 2]//Reverse] /. "" -> "0"
56+
57+
58+
59+
SetDirectory[backupDir]
60+
61+
newName/@ FileNames[]
62+

FA3Guide.ps.gz

-285 KB
Binary file not shown.

FeynArts.m

Lines changed: 51 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(*
22
3-
This is FeynArts, Version 3.1
4-
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2003
5-
last modified 7 Apr 03 by Thomas Hahn
3+
This is FeynArts, Version 3.2
4+
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2007
5+
last modified 6 Mar 07 by Thomas Hahn
66
77
Release notes:
88
@@ -44,17 +44,13 @@
4444

4545

4646
Print[""];
47-
Print["FeynArts 3.1"];
47+
Print["FeynArts 3.2"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 7 Apr 03"]
49+
Print["last revised 5 Feb 07"]
5050

5151

5252
BeginPackage["FeynArts`"]
5353

54-
FullFileName::usage = "FullFileName[name, path] returns the name of the
55-
file with its full path appended."
56-
57-
5854
(* definitions for Utilities.m *)
5955

6056
FAPrint::usage = "FAPrint[l, s] prints the string s if l <= $Verbose."
@@ -283,8 +279,16 @@ that looks (sort of) like a bicycle."
283279
CreateVFTopologies::usage = "CreateVFTopologies[l, i -> o] generates all
284280
topologies with 1PI vertex functions whose total loop order is l."
285281

286-
CanonicalOrder::usage = "CanonicalOrder[top] orders the topology top into
287-
a (more or less) canonical order."
282+
TopologySort::usage = "TopologySort[top] sorts the topology top into a
283+
(more or less) canonical order."
284+
285+
TopologyOrdering::usage = "TopologyOrdering[top] returns the topology
286+
top sorted into a (more or less) canonical order, together with the
287+
permutation that brings it into this order, i.e. a list of the positions
288+
at which the propagators in the sorted version appeared in the unsorted
289+
version. A negative integer in the permutation indicates that also the
290+
vertices in the respective propagator were exchanged with respect to the
291+
original."
288292

289293
SymmetryFactor::usage = "SymmetryFactor[top] returns the symmetry factor
290294
for the topology top. This value is needed if you want to enter new
@@ -343,12 +347,18 @@ is given as a list of symbols which must (or must not, if preceded by
343347
outparticles\"."
344348

345349
IndexDelta::usage = "IndexDelta[i1, i2] is a symbol in the definition of a
346-
classes coupling that indicates that the coupling is diagonal in the
347-
indices i1 and i2."
350+
classes coupling indicating that the coupling is diagonal in the indices
351+
i1 and i2."
352+
353+
IndexEps::usage = "IndexEps[i1, i2, i3] is the totally antisymmetric
354+
symbol in the indices i1, i2, i3."
348355

349356

350357
(* definitions for Initialize.m *)
351358

359+
ReadModelFile::usage = "ReadModelFile[modfile, text] reads the model
360+
file modfile and prints the message text."
361+
352362
InitializeModel::usage = "InitializeModel[MOD] initializes the classes
353363
model for the model MOD and the generic model given by the GenericModel
354364
option. The model information is taken from the file MOD.mod.
@@ -406,6 +416,12 @@ is given as a list of symbols which must (or must not, if preceded by
406416
sum of expr in the index i over range. To execute the sum, replace
407417
IndexSum by Sum."
408418

419+
AddHC::usage = "AddHC[mat] extends mat by its Hermitian conjugate part,
420+
e.g. AndHC[A[1, i, j]] returns (A[1, i, j] + Conjugate[A[1, j, i]])/2.
421+
AddHC[mat, w] forms the weighted sum with weight function w, e.g.
422+
AndHC[A[1, i, j], w] returns (w[i, j] A[1, i, j]/2 + Conjugate[w[j, i]]
423+
Conjugate[A[1, j, i]]/2)."
424+
409425
ReferenceOrder::usage = "ReferenceOrder[x] gives a list of all field
410426
points of the current model in (unsorted) list form. x can be Generic or
411427
Classes."
@@ -630,9 +646,9 @@ as arguments the quantum numbers of the involved fields (times -1 for
630646

631647
TheLabel::usage = "TheLabel[p] returns the PropagatorLabel of particle p."
632648

633-
Appearance::usage = "Appearance[i] gives the rendering information for the
634-
index i. For example, Appearance[Index[Lorentz, i_]] := Greek[i + 11]
635-
makes Lorentz indices appear as \"\\mu\", \"\\nu\", etc."
649+
IndexStyle::usage = "IndexStyle[i] gives the rendering information for
650+
the index i. For example, IndexStyle[Index[Lorentz, i_]] := Greek[i +
651+
11] makes Lorentz indices appear as \"\\mu\", \"\\nu\", etc."
636652

637653
TheC::usage = "TheC is an internal symbol for storing the coupling
638654
matrices."
@@ -652,9 +668,9 @@ as arguments the quantum numbers of the involved fields (times -1 for
652668
ConjugateCoupling::usage = "ConjugateCoupling[coupl] defines how the
653669
charge-conjugated coupling is derived from coupl. Typically, one I
654670
multiplying the coupling constant must not be conjugated because it
655-
derives from the exponent of the path integral, e.g. I \int d^4x {\cal L}.
656-
If no definition is made for ConjugateCoupling, the final amplitudes will
657-
contain this symbol."
671+
derives from the exponent of the path integral. If no definition is
672+
made for ConjugateCoupling, the final amplitudes will contain this
673+
symbol."
658674

659675
G::usage = "G[sym][cto][fields][kinpart] is a generic coupling matrix of
660676
counter-term order cto for fields corresponding to the kinematical object
@@ -717,6 +733,9 @@ as arguments the quantum numbers of the involved fields (times -1 for
717733
where field #5 is not a S[1], one could use DiagramSelect[diags, FreeQ[#,
718734
Field[5] -> S[1]]&]."
719735

736+
DiagramComplement::usage = "DiagramComplement[diagall, diag1, diag2,
737+
...] gives all diagrams in diagall which are not in any of the diagi."
738+
720739
ToFA1Conventions::usage = "ToFA1Conventions[expr] converts expr back to
721740
FeynArts 1 conventions. Note that this conversion only renames some
722741
symbols. The output may thus not be 100% FeynArts 1 compatible since
@@ -847,12 +866,12 @@ C8 N15 (= topology 1, classes insertion 8, running number 15)."
847866

848867
Shape::usage = "Shape[tops] edits the shapes of the topologies tops."
849868

850-
ShapeData::usage = "ShapeData[topcode] returns the shape data for the
851-
topology characterized by topcode."
869+
ShapeData::usage = "ShapeData[topcode] is the database of shapes currently
870+
in memory. It is indexed by the three strings given by TopologyCode."
852871

853-
TopologyCode::usage = "TopologyCode[top] returns a string identifying the
854-
topology. This string is unique as far painting the topology is
855-
concerned."
872+
TopologyCode::usage = "TopologyCode[top] returns a list of three strings
873+
identifying the topology. This code is unique as far painting the
874+
topology is concerned."
856875

857876

858877
(* FeynArts system constants *)
@@ -879,26 +898,23 @@ C8 N15 (= topology 1, classes insertion 8, running number 15)."
879898
P$NonCommuting::usage = "P$NonCommuting is the pattern for the
880899
non-commuting generic fields."
881900

901+
P$InsertionObjects::usage = "P$InsertionObjects matches the objects
902+
in the generic amplitude that will be taken for insertions."
903+
882904

883905
P$Topology = Topology[__] | Topology[_][__]
884906

885907
P$Generic = F | S | V | U | SV
886908

887909
P$NonCommuting = F | U
888910

911+
P$InsertionObjects = G[_][_][__][__] | Mass[_] | GaugeXi[_] |
912+
VertexFunction[_][__]
889913

890-
FullFileName[ file_, path_ ] :=
891-
Block[ {full},
892-
Catch[
893-
Scan[
894-
If[ FileType[full = ToFileName[#, file]] === File, Throw[full] ] &,
895-
path ];
896-
file ]
897-
]
898-
899-
$FeynArts = 3.1
914+
$FeynArts = 3.2
900915

901-
$FeynArtsDir = SetDirectory[DirectoryName[ FullFileName[$Input, $Path] ]]
916+
$FeynArtsDir =
917+
SetDirectory[DirectoryName[System`Private`FindFile[$Input]]]
902918

903919
ResetDirectory[]
904920

FeynArts/Analytic.m

Lines changed: 32 additions & 23 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 7 Apr 03 th
5+
last modified 22 Mar 06 th
66
*)
77

88
Begin["`Analytic`"]
@@ -221,9 +221,7 @@ Since momenta on tree propagators (Propagator[Internal])
221221
amp = CreateAmpGraph[ top,
222222
gr /. (n_ -> x_. fi_[i__]) :> (n -> x fi[i, orig[x, n]]) ];
223223
gm = Append[
224-
Union[ Cases[amp[[3]],
225-
G[_][_][__][__] | Mass[_] | GaugeXi[_] | VertexFunction[_][__],
226-
Infinity] ],
224+
Union[ Cases[amp[[3]], P$InsertionObjects, Infinity] ],
227225
RelativeCF ];
228226
rawgm = gm /.
229227
s1_. _[__, orig[s2_, fi_], k___] :>
@@ -265,7 +263,7 @@ Since momenta on tree propagators (Propagator[Internal])
265263
Times@@ DeleteCases[Flatten[scalars], 1] *
266264
LoopPD[Expand[Times@@ Flatten[prden], PropagatorDenominator]] *
267265
Times@@ res /.
268-
truncru //. M$LastGenericRules /. Mass -> TheMass ]
266+
truncru /. Mass -> TheMass ] //. M$LastGenericRules
269267
]
270268

271269

@@ -690,25 +688,17 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
690688
]
691689

692690

693-
DefWeedOut[ lev_ ] := (
694-
WeedOut[ g:Graph[_, lev == _][__] -> _[] ] = g;
695-
WeedOut[ _ -> _[] ] = Sequence[];
696-
WeedOut[ a_ ] = a;
697-
Rule[_] := Sequence[]
698-
)
699-
700-
701691
Discard[ tops:TopologyList[info__][__], diags__ ] :=
702-
Block[ {p, lev, WeedOut, Rule},
703-
p = Position[tops, Graph[__][__]];
704-
lev = ResolveLevel[InsertionLevel /. {info}];
705-
If[ FreeQ[lev, Generic], p = Select[p, Length[#] =!= 4 &] ];
692+
Block[ {p, lev, Rule},
693+
lev = Alternatives@@ ResolveLevel[InsertionLevel /. {info}];
694+
p = Position[tops, Graph[_, lev == _][__]];
706695
p = p[[ Union[ Flatten[
707696
{diags} /. a_Integer (Repeated | RepeatedNull)[b_] :>
708697
Range@@ Sort[Floor[{b, a}]] ] ] ]];
709698
If[ Head[p] === Part, Return[$Failed] ];
710-
DefWeedOut[ lev[[-1]] ];
711-
Delete[tops, p] /. ins:Insertions[_][__] :> WeedOut/@ ins /.
699+
Rule[_] := Sequence[];
700+
Delete[tops, p] /.
701+
(Graph[__][__] -> _[]) :> Seq[] /.
712702
(Topology[__][__] -> _[]) :> Seq[]
713703
]
714704

@@ -719,18 +709,37 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
719709

720710

721711
DiagramSelect[ tops:TopologyList[info__][__], crit_ ] :=
722-
Block[ {lev, WeedOut, Rule},
712+
Block[ {lev, Rule},
723713
lev = ResolveLevel[InsertionLevel /. {info}][[-1]];
724-
DefWeedOut[lev];
714+
Rule[_] := Sequence[];
725715
tops /.
726-
Graph[_, lev == _][fi__] :> Seq[] /; crit[{fi}] =!= True /.
727-
ins:Insertions[_][__] :> WeedOut/@ ins /.
716+
Graph[__, lev == _][fi__] :> Seq[] /; crit[{fi}] =!= True /.
717+
(Graph[__][__] -> _[]) :> Seq[] /.
728718
(Topology[__][__] -> _[]) :> Seq[]
729719
]
730720

731721
DiagramSelect[ amp_, crit_ ] := Select[amp, crit]
732722

733723

724+
DiagramComplement[ tops:TopologyList[info__][___],
725+
more:TopologyList[__][___].. ] :=
726+
Block[ {lev = ResolveLevel[InsertionLevel /. {info}][[-1]]},
727+
Fold[DiagramRemove[#2]/@ #1 &, tops, Level[{more}, {2}]]
728+
]
729+
730+
DiagramRemove[ top_ -> rem_ ][ top_ -> ins_ ] := top -> (
731+
Block[ {Rule, Graph},
732+
Rule[_] := Sequence[];
733+
Cases[rem,
734+
Graph[_, lev == _][gr__] :> (Graph[_, lev == _][gr] = Sequence[]),
735+
Infinity];
736+
ins
737+
] /. (Graph[__][__] -> _[]) :> Seq[] ) /.
738+
(Topology[__][__] -> _[]) :> Seq[]
739+
740+
DiagramRemove[ _ ][ t_ ] = t
741+
742+
734743
ToJoin[ h:Topology == _, r__ ] := {h, ToJoin[r]}
735744

736745
ToJoin[ r__, h:Number == _ ] := {ToJoin[r], h}

0 commit comments

Comments
 (0)