Skip to content

Commit

Permalink
allow user to replace symbols in beta functions, self-energies and ve…
Browse files Browse the repository at this point in the history
…rtices
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Oct 23, 2017
1 parent f3b91fc commit 5ed6eff
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -70,6 +70,7 @@ model_files/SMHighScale export-ignore
model_files/SMHighPrecision export-ignore
model_files/SMnoGUT export-ignore
model_files/SMNoRGEs export-ignore
model_files/SMRules export-ignore
model_files/SMSemiAnalytic export-ignore
model_files/SSMSemiAnalytic export-ignore
model_files/SMThrow export-ignore
Expand Down
37 changes: 37 additions & 0 deletions doc/model_file.dox
Expand Up @@ -1164,6 +1164,43 @@ Example: In the MSSM the lightest supersymmetric particles might be
PotentialLSPParticles = { Chi, Sv, Su, Sd, Se, Cha, Glu };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

\section custon_repl_rules User-defined replacement rules

User-defined replacement rules can be applied to the beta functions,
self-energies/ tadpoles and vertices. The rules are specified by the
`FSBetaFunctionRules`, `FSSelfEnergyRules` and `FSVertexRules`
variables, respectively.

Example: Set the gauge couplings `g1` and `g2` to zero in all 1-loop,
2-loop and 3-loop beta functions:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.m}
FSBetaFunctionRules = {
{g1 -> 0, g2 -> 0}, (* applied to 1L beta functions *)
{g1 -> 0, g2 -> 0}, (* applied to 2L beta functions *)
{g1 -> 0, g2 -> 0} (* applied to 3L beta functions *)
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example: Set the mass of the Z boson and the corresponding ghost field
to zero in the 1-loop self-energies/ tadpoles:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.m}
FSSelfEnergyRules = {
{ (Mass|Mass2)[VZ|gZ] -> 0 } (* applied to 1L self-energies/tadpoles *)
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example: Set the gauge couplings `g1` and `g2` to zero in all
vertices:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.m}
FSVertexRules = {
g1 -> 0,
g2 -> 0
};
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

\section calc_obervables Observables

FlexibleSUSY can calculate various observables. To enable the
Expand Down
33 changes: 15 additions & 18 deletions meta/BetaFunction.m
Expand Up @@ -338,25 +338,22 @@
*
* @param betaFunctions list of SARAH-like formated beta functions
*)
ConvertSarahRGEs[betaFunctions_List] :=
Module[{lst = {}, beta, i, k, name, type, expr},
For[i = 1, i <= Length[betaFunctions], i++,
beta = betaFunctions[[i]];
(* extract all beta functions and guess type *)
For[k = 1, k <= Length[beta], k++,
If[Length[beta[[k]] < 2], Continue[];];
(* beta[[k,1]] == name, beta[[k,2]] == 1 loop beta function *)
name = beta[[k,1]];
type = GuessType[name];
expr = Drop[beta[[k]], 1];
(* protect tensor products *)
expr = CConversion`ProtectTensorProducts[#, name]& /@ expr;
(* simplify expressions *)
expr = TimeConstrainedSimplify /@ expr;
AppendTo[lst, BetaFunction[name, type, expr]];
];
ConvertSarahRGEs[beta_List] :=
Module[{lst = {}, k, name, type, expr},
(* extract all beta functions and guess type *)
For[k = 1, k <= Length[beta], k++,
If[Length[beta[[k]] < 2], Continue[];];
(* beta[[k,1]] == name, beta[[k,2]] == 1 loop beta function *)
name = beta[[k,1]];
type = GuessType[name];
expr = Drop[beta[[k]], 1];
(* protect tensor products *)
expr = CConversion`ProtectTensorProducts[#, name]& /@ expr;
(* simplify expressions *)
expr = TimeConstrainedSimplify /@ expr;
AppendTo[lst, BetaFunction[name, type, expr]];
];
Return[lst];
lst
];

(* count number of parameters in beta functions list *)
Expand Down
5 changes: 5 additions & 0 deletions meta/CConversion.m
Expand Up @@ -887,6 +887,11 @@
FlexibleSUSY`M[a_[idx_]] :> ToValidCSymbol[FlexibleSUSY`M[a]][idx] /.
FlexibleSUSY`M[a_] :> ToValidCSymbol[FlexibleSUSY`M[a]] /.
FlexibleSUSY`BETA[l_,p_] :> FlexibleSUSY`BETA1[l,p] /.
SARAH`Adj[0] -> 0 /.
SARAH`Conj[0] -> 0 /.
SARAH`Tp[0] -> 0 /.
SARAH`trace[a__] /; MemberQ[{a}, 0] -> 0 /.
SARAH`MatMul[a__] /; MemberQ[{a}, 0] -> 0 /.
Susyno`LieGroups`conj -> SARAH`Conj //.
conjSimplification /.
Times[fac__] :> FactorElementwiseProd[fac] /.
Expand Down
49 changes: 41 additions & 8 deletions meta/FlexibleSUSY.m
Expand Up @@ -275,6 +275,11 @@ FlexibleSUSY model file (FlexibleSUSY.m).
(* methods for the calculation of the weak mixing angle *)
{ FSFermiConstant, FSMassW };

(* rules to apply on expressions *)
FSSelfEnergyRules = {{}, {}}; (* 1L, 2L *)
FSVertexRules = {};
FSBetaFunctionRules = {{}, {}, {}}; (* 1L, 2L, 3L *)

FSWeakMixingAngleInput = Automatic;
FSWeakMixingAngleInput::usage = "Method to determine the weak mixing
angle. Possible values = { Automatic, FSFermiConstant, FSMassW }.
Expand Down Expand Up @@ -2379,6 +2384,30 @@ corresponding tadpole is real or imaginary (only in models with CP
NeedToUpdateTarget[name_String, target_] :=
NeedToUpdateTarget[name, {target}];

PrepareFSRules[] :=
Block[{},
If[Head[FlexibleSUSY`FSSelfEnergyRules] =!= List, FlexibleSUSY`FSSelfEnergyRules = {}];
If[Head[FlexibleSUSY`FSVertexRules] =!= List, FlexibleSUSY`FSVertexRules = {}];
If[Head[FlexibleSUSY`FSBetaFunctionRules] =!= List, FlexibleSUSY`FSBetaFunctionRules = {}];
];

ApplyRulesAtParts[orig_List, rules_List] :=
(#1 /. #2)& @@@ Utils`Zip[orig, PadRight[rules, Length[orig], {{}}]];

ApplyFSBetaFunctionRules[betas_List] :=
({ First[#],
Sequence @@ ApplyRulesAtParts[Drop[#,1], FlexibleSUSY`FSBetaFunctionRules] }& /@ betas) //.
{
SARAH`Adj[0] -> 0,
SARAH`Conj[0] -> 0,
SARAH`Tp[0] -> 0,
SARAH`trace[a__] /; MemberQ[{a}, 0] -> 0,
SARAH`MatMul[a__] /; MemberQ[{a}, 0] -> 0
};

ApplyFSSelfEnergyRules[se_List] :=
{ First[#], Sequence @@ ApplyRulesAtParts[Drop[#,1], FlexibleSUSY`FSSelfEnergyRules] }& /@ se;

FSPrepareRGEs[loopOrder_] :=
Module[{needToCalculateRGEs, betas},
If[loopOrder > 0,
Expand Down Expand Up @@ -2546,7 +2575,7 @@ corresponding tadpole is real or imaginary (only in models with CP
Quit[1];
];
Print["Converting self-energies ..."];
ConvertSarahSelfEnergies[selfEnergies]
ConvertSarahSelfEnergies[ApplyFSSelfEnergyRules @ selfEnergies]
];

PrepareTadpoles[eigenstates_] :=
Expand All @@ -2563,7 +2592,7 @@ corresponding tadpole is real or imaginary (only in models with CP
Quit[1];
];
Print["Converting tadpoles ..."];
ConvertSarahTadpoles[tadpoles]
ConvertSarahTadpoles[ApplyFSSelfEnergyRules @ tadpoles]
];

PrepareUnrotatedParticles[eigenstates_] :=
Expand Down Expand Up @@ -3045,7 +3074,7 @@ corresponding tadpole is real or imaginary (only in models with CP
Print[" Model output directory: ", FSOutputDir];

PrintHeadline["Reading SARAH output files"];
(* get RGEs *)
PrepareFSRules[];
FSPrepareRGEs[FlexibleSUSY`FSRGELoopOrder];
FSCheckLoopCorrections[FSEigenstates];
nPointFunctions = EnforceCpColorStructures @ SortCps @
Expand Down Expand Up @@ -3110,25 +3139,26 @@ corresponding tadpole is real or imaginary (only in models with CP
(* filter out buggy and duplicate beta functions *)
DeleteBuggyBetaFunctions[beta_List] :=
DeleteDuplicates[Select[beta, (!NumericQ[#[[1]]])&], (#1[[1]] === #2[[1]])&];
susyBetaFunctions = DeleteBuggyBetaFunctions /@ susyBetaFunctions;
susyBreakingBetaFunctions = DeleteBuggyBetaFunctions /@ susyBreakingBetaFunctions;

susyBetaFunctions = DeleteBuggyBetaFunctions @ (Join @@ susyBetaFunctions);
susyBreakingBetaFunctions = DeleteBuggyBetaFunctions @ (Join @@ susyBreakingBetaFunctions);

(* identify real parameters *)
If[Head[SARAH`RealParameters] === List,
Parameters`AddRealParameter[SARAH`RealParameters];
];

(* store all model parameters *)
allParameters = StripSARAHIndices[((#[[1]])& /@ Join[Join @@ susyBetaFunctions, Join @@ susyBreakingBetaFunctions])];
allParameters = StripSARAHIndices[((#[[1]])& /@ Join[susyBetaFunctions, susyBreakingBetaFunctions])];
Parameters`SetModelParameters[allParameters];
DebugPrint["model parameters: ", allParameters];

anomDim = AnomalousDimension`ConvertSarahAnomDim[SARAH`Gij];

susyBetaFunctions = BetaFunction`ConvertSarahRGEs[susyBetaFunctions];
susyBetaFunctions = BetaFunction`ConvertSarahRGEs[ApplyFSBetaFunctionRules @ susyBetaFunctions];
susyBetaFunctions = Select[susyBetaFunctions, (BetaFunction`GetAllBetaFunctions[#]!={})&];

susyBreakingBetaFunctions = ConvertSarahRGEs[susyBreakingBetaFunctions];
susyBreakingBetaFunctions = ConvertSarahRGEs[ApplyFSBetaFunctionRules @ susyBreakingBetaFunctions];
susyBreakingBetaFunctions = Select[susyBreakingBetaFunctions, (BetaFunction`GetAllBetaFunctions[#]!={})&];

allBetaFunctions = Join[susyBetaFunctions, susyBreakingBetaFunctions];
Expand Down Expand Up @@ -3461,6 +3491,9 @@ corresponding tadpole is real or imaginary (only in models with CP
effectiveCouplings = Get[effectiveCouplingsFileName];
];

(* apply user-defined rules *)
vertexRules = vertexRules /. FlexibleSUSY`FSVertexRules;

PrintHeadline["Creating model"];
Print["Creating class for model ..."];
WriteModelClass[massMatrices, ewsbEquations, FlexibleSUSY`EWSBOutputParameters,
Expand Down
92 changes: 92 additions & 0 deletions model_files/SMRules/FlexibleSUSY.m.in
@@ -0,0 +1,92 @@

FSModelName = "@CLASSNAME@";
FSEigenstates = SARAH`EWSB;
FSDefaultSARAHModel = SM;

(* SM input parameters *)

MINPAR = { {1, LambdaIN} };

EXTPAR = {
{0, Qin},
{1, QEWSB}
};

EWSBOutputParameters = { mu2 };

HighScale = Qin;

HighScaleFirstGuess = Qin;

HighScaleInput = {
{\[Lambda], LambdaIN}
};

SUSYScale = QEWSB;

SUSYScaleFirstGuess = QEWSB;

SUSYScaleInput = {};

LowScale = LowEnergyConstant[MZ];

LowScaleFirstGuess = LowEnergyConstant[MZ];

LowScaleInput = {
{v, 2 MZMSbar / Sqrt[GUTNormalization[g1]^2 g1^2 + g2^2]},
{Yu, Automatic},
{Yd, Automatic},
{Ye, Automatic}
};

InitialGuessAtLowScale = {
{v, LowEnergyConstant[vev]},
{Yu, Automatic},
{Yd, Automatic},
{Ye, Automatic}
};

UseSM3LoopRGEs = True;
UseHiggs2LoopSM = True;
UseHiggs3LoopSM = True;
UseSMAlphaS3Loop = True;

DefaultPoleMassPrecision = MediumPrecision;
HighPoleMassPrecision = {hh};
MediumPoleMassPrecision = {};
LowPoleMassPrecision = {};

ExtraSLHAOutputBlocks = {
{FlexibleSUSYLowEnergy,
{{21, FlexibleSUSYObservable`aMuon} } },
{EFFHIGGSCOUPLINGS, NoScale,
{{1, FlexibleSUSYObservable`CpHiggsPhotonPhoton},
{2, FlexibleSUSYObservable`CpHiggsGluonGluon} } }
};

SARAH`ParameterDefinitions = Append[
Cases[SARAH`ParameterDefinitions, {p_ /; p =!= SARAH`\[Lambda], ___}],
{SARAH`\[Lambda], { Description -> "SM Higgs Selfcouplings" } }
];

FSBetaFunctionRules = {
{g1 -> 0, g2 -> 0, \[Lambda] -> 0, Ye[__] -> 0, Yd[__] -> 0, Ye -> 0, Yd -> 0}, (* 1L *)
{g1 -> 0, g2 -> 0, \[Lambda] -> 0, Ye[__] -> 0, Yd[__] -> 0, Yu[__] -> 0, Ye -> 0, Yd -> 0, Yu -> 0}, (* 2L *)
{g1 -> 0, g2 -> 0, \[Lambda] -> 0, Ye[__] -> 0, Yd[__] -> 0, Yu[__] -> 0, Ye -> 0, Yd -> 0, Yu -> 0} (* 3L *)
};

FSSelfEnergyRules = {
(* 1L *)
{
(Mass|Mass2)[VZ|gZ] -> 0,
(Mass|Mass2)[(Fd|Fu|Fe)[_]] -> 0
}
};

FSVertexRules = {
g1 -> 0,
g2 -> 0,
\[Lambda] -> 0,
Ye[__] -> 0,
Yd[__] -> 0
};
1 change: 1 addition & 0 deletions test/test_run_all_spectrum_generators.sh
Expand Up @@ -98,6 +98,7 @@ SMHighPrecision,${DEFAULT_SM_INPUT},0
SMEFTHiggs,_DEFAULT_,0
SMSSM,_DEFAULT_,0
SplitMSSM,_DEFAULT_,0
SMRules,${DEFAULT_SM_INPUT},0
SSM,_DEFAULT_,0
SMThrow,${DEFAULT_SM_INPUT},0
SMThrow,${HOMEDIR}/model_files/SMThrow/LesHouches.in.SMThrow_large_lambda,1
Expand Down

0 comments on commit 5ed6eff

Please sign in to comment.