Skip to content

Commit

Permalink
Update for Mathematica-8.0, FeynCalc-8.1.0 and FeynArts-3.7.
Browse files Browse the repository at this point in the history
FeynArts can now be located in a subdirectory of HighEnergyPhysics.
  • Loading branch information
deltafunction committed Jun 9, 2012
1 parent 92a2fd9 commit a61a1fe
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 12 deletions.
15 changes: 12 additions & 3 deletions Phi/Extras/Automatic.gen
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ KinematicIndices[$ScalarHeads] := {};
KinematicIndices[$FermionHeads] := {};
KinematicIndices[$VectorHeads] := {Lorentz};

Appearance[Index[Lorentz,i_]] :=
TheLabel[Index[Lorentz,i_]] :=
$CouplingLorentzIndicesString<>ToString[i];

(* ****************************************************************** *)
Expand Down Expand Up @@ -159,10 +159,14 @@ Do[
gloadfile[filenr] = XName[listrepl[
$VerticesSpecifications1[[repp]],filenr]]<>".Gen";

fpath = ToFileName[{$FeynCalcDirectory, "Phi", "CouplingVectors"}, gloadfile[filenr]];

VerbosePrint[1,repp," ",filenr,
" Loading generic coupling from ",gloadfile[filenr]];
" Loading generic coupling from ",fpath];

genericcouplingvector[repp,filenr] = Get[fpath];

genericcouplingvector[repp,filenr] = Get[gloadfile[filenr]],
VerbosePrint[2, genericcouplingvector[repp,filenr]],

{filenr,Length[PerturbationOrder/.
$VerticesSpecifications1[[repp]]]}];
Expand Down Expand Up @@ -238,6 +242,11 @@ M$FermionFlipRule[ 1->2, 2->1, ___ ] =
- NonCommutative[ DiracGamma[li], ChiralityProjector[ 1] ]
};

(* This was cleared in a release of FeynArts-3.7. Without it, Dirac traces are not taken *)
$FermionLines = True;
(* This should speed up a bit *)
$SparseCouplings = True;

(* ****************************************************************** *)

M$LastGenericRules = {
Expand Down
12 changes: 7 additions & 5 deletions Phi/Extras/Automatic.mod
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Do[

Evaluate[isorange[$CouplingIsoIndicesSpecifications[[reps,1]],indexnr]];

Appearance[
TheLabel[
isovarii[$CouplingIsoIndicesSpecifications[[reps,1]],indexnr,i5_]
] = ""
(*Uncomment the following and comment '' to have
Expand All @@ -128,9 +128,9 @@ Do[
(* The appearance for particles in $FAParticlesInUse is set.
FALabel gives the appearance, but is defined only for some particles *)

Appearance[iii_] := ToString[iii];
TheLabel[iii_] := ToString[iii];

(Appearance[#]=FALabel[Particle[#[0]][[1]],0])&/@$FAParticlesInUse;
(TheLabel[#]=FALabel[Particle[#[0]][[1]],0])&/@$FAParticlesInUse;

(* ************************************************************************* *)

Expand Down Expand Up @@ -254,10 +254,12 @@ Do[
cloadfile[filenr] = XName[listrepl[
$VerticesSpecifications1[[repp]],filenr]]<>".Mod";

fpath = ToFileName[{$FeynCalcDirectory, "Phi", "CouplingVectors"}, cloadfile[filenr]];

VerbosePrint[1,repp," ",filenr,
" Loading classes coupling from ",cloadfile[filenr]];
" Loading classes coupling from ",fpath];

classescouplingvector[repp,filenr] = (Get[cloadfile[filenr]]),
classescouplingvector[repp,filenr] = (Get[fpath]),

{filenr,Length[PerturbationOrder/.
$VerticesSpecifications1[[repp]]]}];
Expand Down
6 changes: 4 additions & 2 deletions Phi/Extras/FAPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,13 @@
>Please check that this is actually done. If not, do it manually."];
strm = OpenAppend[$FeynArtsDirectory <> $PathnameSeparator <> "Setup.m"];
WriteString[strm,
"\nP$Generic = Union[Flatten[P$Generic | $ParticleHeads]];\n
P$NonCommuting = Union[Flatten[P$NonCommuting | $FermionHeads]];\n
"\nP$Generic = Union[Flatten[P$Generic | HighEnergyPhysics`Phi`Objects`$ParticleHeads]];\n
P$NonCommuting = Union[Flatten[P$NonCommuting | HighEnergyPhysics`Phi`Objects`$FermionHeads]];\n
(*
SetOptions[FourVector, FeynCalcInternal -> False];\n
SetOptions[MetricTensor, FeynCalcInternal -> False];\n
SetOptions[DiracSlash, FeynCalcInternal -> False];\n
*)
(*Important. OneLoop is broken if FeynAmpDenominator is orderless*)
ClearAttributes[FeynAmpDenominator, Orderless];\n"];
Close[strm];
Expand Down
4 changes: 2 additions & 2 deletions Phi/Phi.m
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ directory of the directory HighEnergyPhysics (containing Phi). It should be set

If[$FAPatch && $LoadFeynArts,
str = "" ;$patch=True;
If[FileNames["FeynArts.m", $FeynCalcDirectory] =!= {},
strm = OpenRead[$FeynCalcDirectory <> $PathnameSeparator <> "FeynArts.m"];
If[(fafiles=FileNames["FeynArts.m", {$FeynCalcDirectory, $FeynCalcDirectory <> $PathnameSeparator <> "*"}]) =!= {},
strm = OpenRead[fafiles[[1]]];
While[ToString[str] != "EndOfFile", str = Read[strm, String];
If[StringMatchQ[ToString[str], "*Frederik Orellana*", IgnoreCase -> True],
$patch=False]];
Expand Down
6 changes: 6 additions & 0 deletions Phi/PhiStart.m
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ introduce several covariant derivatives (see CovariantNabla). \
NM[UMatrix[UIdentity, ___],
(PartialD | RightPartialD | LeftPartialD)[__]] :> 0}
]];

(* Not sure why this is necessary, but e.g. the calculation of the electron self energy in
QEDRadiativeCorrections.nb fails without. *)
SetOptions[FourVector, FeynCalcInternal -> False];
SetOptions[MetricTensor, FeynCalcInternal -> False];
SetOptions[DiracSlash, FeynCalcInternal -> False];

(* A static hack. Not very pretty. Just to have ExpandPartialD work for
a few PHI examples (will have to be reevaluated when changing
Expand Down

0 comments on commit a61a1fe

Please sign in to comment.