Skip to content

Commit 11f5065

Browse files
t-hahnVladyslav Shtabovenko
authored andcommitted
FeynArts 3.9; Last update: 2 Dec 14;
Added a few functions and a manual section (7.4) for model-file debugging.
1 parent 0f615e5 commit 11f5065

File tree

9 files changed

+1304
-28
lines changed

9 files changed

+1304
-28
lines changed

FeynArts.m

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This is FeynArts, Version 3.9
44
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2014
5-
last modified 24 Oct 14 by Thomas Hahn
5+
last modified 2 Dec 14 by Thomas Hahn
66
77
Release notes:
88
@@ -46,7 +46,7 @@
4646
Print[""];
4747
Print["FeynArts 3.9"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 24 Oct 14"]
49+
Print["last revised 2 Dec 14"]
5050

5151

5252
BeginPackage["FeynArts`"]
@@ -544,6 +544,16 @@ symbols which must (or must not, if preceded by \"!\") appear in the
544544
"Reinitialize is an option of InitializeModel. InitializeModel will
545545
reinitialize the current model only if Reinitialize is set to True."
546546

547+
TagCouplings::usage =
548+
"TagCouplings is an option of InitializeModel. If True, all couplings
549+
will be tagged by Coupling[i], where i is the coupling's position in
550+
M$CouplingMatrices, such that parts of the amplitude can be traced back
551+
to specific couplings later."
552+
553+
Coupling::usage =
554+
"Coupling[i...] is the identifier used to tag the coupling at
555+
M$CouplingMatrices[[i]]."
556+
547557
GenericModelEdit::usage =
548558
"GenericModelEdit is an option of InitializeModel. It specifies code
549559
that will be executed directly after loading the generic model, i.e.
@@ -1054,8 +1064,12 @@ as arguments the quantum numbers of the involved fields (times -1 for
10541064
to add graph information to the amplitude."
10551065

10561066
VertexDebug::usage =
1057-
"VertexDebug[debuginfo] is a function invoked whenever a vertex cannot
1058-
be resolved. It is used for debugging FeynArts."
1067+
"VertexDebug[info] is a function invoked whenever a vertex cannot be
1068+
resolved. It is used for debugging FeynArts."
1069+
1070+
VertexMonitor::usage =
1071+
"VertexMonitor[info] is a function invoked whenever a vertex is resolved.
1072+
It is used for debugging FeynArts."
10591073

10601074
VertexFunction::usage =
10611075
"VertexFunction[o][f1, f2, ...] represents the 1PI vertex function of

FeynArts/Analytic.m

Lines changed: 4 additions & 1 deletion
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 10 Apr 14 th
5+
last modified 2 Dec 14 th
66
*)
77

88
Begin["`Analytic`"]
@@ -570,6 +570,9 @@ kinematical expression (for a G[-]). If neither method resolves TheC,
570570

571571
cv = SignResolve[sym, cvr = TheC[kin]@@ vert];
572572

573+
VertexMonitor[{"vert" -> vert, "kin" -> kin, "cv" -> cv,
574+
"fi" -> {fi}, "cto" -> cto}];
575+
573576
If[ !FreeQ[cv, TheC],
574577
Message[CreateFeynAmp::nocoupl, vert, kin];
575578
VertexDebug[{"vert" -> vert, "kin" -> kin, "cv" -> cvr,

FeynArts/Initialize.m

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(*
22
Initialize.m
33
Functions for the initialization of models
4-
last modified 19 Jul 13 th
4+
last modified 2 Dec 14 th
55
*)
66

77
Begin["`Initialize`"]
@@ -208,6 +208,7 @@
208208
Options[ InitializeModel ] = {
209209
GenericModel -> "Lorentz",
210210
Reinitialize -> True,
211+
TagCouplings -> False,
211212
GenericModelEdit :> Null,
212213
ModelEdit :> Null
213214
}
@@ -260,9 +261,10 @@ assigned values somewhere in your model file (most often \"i\" or \"j\"). \
260261
InitializeModel[ opt:P$Options ] := InitializeModel[{}, opt]
261262

262263
InitializeModel[ model_, options:P$Options ] :=
263-
Block[ {reini, genmod, mod,
264+
Block[ {reini, tagcoup, genmod, mod,
264265
opt = ActualOptions[InitializeModel, options]},
265266
reini = TrueQ[Reinitialize /. opt];
267+
tagcoup = TrueQ[TagCouplings /. opt];
266268

267269
genmod = ToModelName[GenericModel /. opt];
268270
If[ reini || genmod =!= $GenericModel,
@@ -525,6 +527,15 @@ assigned values somewhere in your model file (most often \"i\" or \"j\"). \
525527
Assign[ fi__, a_ -> b_ ] := a[fi] = b
526528

527529

530+
TagCoupling[ x_, {_, 1, __} ] := x
531+
532+
TagCoupling[ x_, {n__} ] := x Coupling[n]
533+
534+
535+
TagCoupling[ coup_ == expr_, {n_} ] := coup ==
536+
MapIndexed[#1 Coupling[n, #2[[1]] - 1]&, expr, {2}]
537+
538+
528539
(* Initialization of a classes model: *)
529540

530541
Attributes[ InitModel ] = {HoldAll}
@@ -584,7 +595,10 @@ assigned values somewhere in your model file (most often \"i\" or \"j\"). \
584595
InitCoupling@@@ Block[ {Coup},
585596
_Coup = 0;
586597
TheCoeff[ fi_ ] := Throw[Message[InitializeModel::unknown, fi]];
587-
Scan[SetCoupling, M$CouplingMatrices];
598+
Scan[SetCoupling, If[ tagcoup,
599+
MapIndexed[TagCoupling, M$CouplingMatrices, {4}],
600+
(* else *)
601+
M$CouplingMatrices ]];
588602
TheCoeff[ fi_ ] =.;
589603
_Coup =.;
590604
DownValues[Coup]

FeynArts39.m

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
This is FeynArts, Version 3.9
44
Copyright by Sepp Kueblbeck, Hagen Eck, and Thomas Hahn 1991-2014
5-
last modified 24 Oct 14 by Thomas Hahn
5+
last modified 2 Dec 14 by Thomas Hahn
66
77
Release notes:
88
@@ -46,7 +46,7 @@
4646
Print[""];
4747
Print["FeynArts 3.9"];
4848
Print["by Hagen Eck, Sepp Kueblbeck, and Thomas Hahn"];
49-
Print["last revised 24 Oct 14"]
49+
Print["last revised 2 Dec 14"]
5050

5151

5252
BeginPackage["FeynArts`"]
@@ -544,6 +544,16 @@ symbols which must (or must not, if preceded by \"!\") appear in the
544544
"Reinitialize is an option of InitializeModel. InitializeModel will
545545
reinitialize the current model only if Reinitialize is set to True."
546546

547+
TagCouplings::usage =
548+
"TagCouplings is an option of InitializeModel. If True, all couplings
549+
will be tagged by Coupling[i], where i is the coupling's position in
550+
M$CouplingMatrices, such that parts of the amplitude can be traced back
551+
to specific couplings later."
552+
553+
Coupling::usage =
554+
"Coupling[i...] is the identifier used to tag the coupling at
555+
M$CouplingMatrices[[i]]."
556+
547557
GenericModelEdit::usage =
548558
"GenericModelEdit is an option of InitializeModel. It specifies code
549559
that will be executed directly after loading the generic model, i.e.
@@ -1054,8 +1064,12 @@ as arguments the quantum numbers of the involved fields (times -1 for
10541064
to add graph information to the amplitude."
10551065

10561066
VertexDebug::usage =
1057-
"VertexDebug[debuginfo] is a function invoked whenever a vertex cannot
1058-
be resolved. It is used for debugging FeynArts."
1067+
"VertexDebug[info] is a function invoked whenever a vertex cannot be
1068+
resolved. It is used for debugging FeynArts."
1069+
1070+
VertexMonitor::usage =
1071+
"VertexMonitor[info] is a function invoked whenever a vertex is resolved.
1072+
It is used for debugging FeynArts."
10591073

10601074
VertexFunction::usage =
10611075
"VertexFunction[o][f1, f2, ...] represents the 1PI vertex function of

Models/ModelMaker.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
ModelMaker.m
33
derives the Feynman rules from the Lagrangian
44
and splices them into a template model file
5-
last modified 28 Sep 07 th
5+
last modified 2 Dec 14 th
66
*)
77

88

@@ -87,7 +87,7 @@
8787
FuncD[expr_, f_List] := ReduceDeltas[Fold[FuncD, expr, f]]
8888

8989
FuncD[expr_, f_Field] :=
90-
Block[ {NCSign, s, times, texpr},
90+
Block[ {NCSign, s, times, texpr},
9191
If[ !FreeQ[f, P$NonCommuting],
9292
s = -1;
9393
NCSign[P$NonCommuting] := s = -s ];

Models/SMc.mod

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)