Skip to content

Commit

Permalink
replace problematic SARAHsum by CConversionFSIndexSum
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Bach committed May 23, 2017
1 parent 102d847 commit 62d314b
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions meta/WeinbergAngle.m
Expand Up @@ -357,11 +357,12 @@
SARAH`B1[0, SARAH`Mass2[intfermion], SARAH`Mass2[intscalar]];
(*add sums over internal particles*)
intpartwithindex = Reverse[Cases[intparticles, _[{_}]]];
Do[result = SARAH`sum[intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 1,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]]],
TreeMasses`GetDimension[intpartwithindex[[i]]],
result],
Do[result = CConversion`FSIndexSum[
intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 0,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]] - 1],
TreeMasses`GetDimension[intpartwithindex[[i]]] - 1,
result],
{i, Length[intpartwithindex]}];
result
];
Expand Down Expand Up @@ -479,11 +480,12 @@
SARAH`Mass2[intscalars[[2]]]]);
(*add sums over internal particles*)
intpartwithindex = Reverse[Cases[intparticles, _[{_}]]];
Do[result = SARAH`sum[intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 1,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]]],
TreeMasses`GetDimension[intpartwithindex[[i]]],
result],
Do[result = CConversion`FSIndexSum[
intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 0,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]] - 1],
TreeMasses`GetDimension[intpartwithindex[[i]]] - 1,
result],
{i, Length[intpartwithindex]}];
result
];
Expand Down Expand Up @@ -536,11 +538,12 @@
SARAH`Mass2[intfermions[[2]]]]));
(*add sums over internal particles*)
intpartwithindex = Reverse[Cases[intparticles, _[{_}]]];
Do[result = SARAH`sum[intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 1,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]]],
TreeMasses`GetDimension[intpartwithindex[[i]]],
result],
Do[result = CConversion`FSIndexSum[
intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 0,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]] - 1],
TreeMasses`GetDimension[intpartwithindex[[i]]] - 1,
result],
{i, Length[intpartwithindex]}];
result
];
Expand Down Expand Up @@ -701,11 +704,12 @@
result = result * (-1) * SARAH`D27[Sequence @@ SARAH`Mass2 /@ intparticles]];
(*add sums over internal particles*)
intpartwithindex = Reverse[Cases[intparticles, _[{_}]]];
Do[result = SARAH`sum[intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 1,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]]],
TreeMasses`GetDimension[intpartwithindex[[i]]],
result],
Do[result = CConversion`FSIndexSum[
intpartwithindex[[i, 1, 1]],
If[includeGoldstones, 0,
TreeMasses`GetDimensionStartSkippingGoldstones[intpartwithindex[[i]]] - 1],
TreeMasses`GetDimension[intpartwithindex[[i]]] - 1,
result],
{i, Length[intpartwithindex]}];
result
];
Expand Down Expand Up @@ -807,10 +811,7 @@
decl = "\n" <> type <> " CLASSNAME::" <> functionName <> "\n{\n";
body = Parameters`CreateLocalConstRefs[expr] <> "\n";
body = body <> type <> " result;\n\n";
body = body <> CConversion`ExpandSums[
Parameters`DecreaseIndexLiterals[Parameters`DecreaseSumIndices[expr],
TreeMasses`GetParticles[]] /.
vertexRules /. a_[List[i__]] :> a[i], "result"];
body = body <> CConversion`ExpandSums[expr /. vertexRules /. a_[List[i__]] :> a[i], "result"];
body = body <> "\nreturn result;";
body = TextFormatting`IndentText[TextFormatting`WrapLines[body]];
decl = decl <> body <> "}\n";
Expand Down

0 comments on commit 62d314b

Please sign in to comment.