Skip to content

Commit

Permalink
adding getters for pole masses and mixings in SLHA convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander authored and Expander committed Nov 20, 2014
1 parent 1c81853 commit 2049426
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
5 changes: 5 additions & 0 deletions meta/FlexibleSUSY.m
Expand Up @@ -510,6 +510,7 @@
files_List, diagonalizationPrecision_List] :=
Module[{massGetters = "", k,
mixingMatrixGetters = "",
slhaPoleMassGetters = "", slhaPoleMixingMatrixGetters = "",
tadpoleEqPrototypes = "", tadpoleEqFunctions = "",
numberOfEWSBEquations = Length[ewsbEquations], calculateTreeLevelTadpoles = "",
ewsbInitialGuess = "", physicalMassesDef = "", mixingMatricesDef = "",
Expand Down Expand Up @@ -547,6 +548,8 @@
For[k = 1, k <= Length[massMatrices], k++,
massGetters = massGetters <> TreeMasses`CreateMassGetter[massMatrices[[k]]];
mixingMatrixGetters = mixingMatrixGetters <> TreeMasses`CreateMixingMatrixGetter[massMatrices[[k]]];
slhaPoleMassGetters = slhaPoleMassGetters <> TreeMasses`CreateSLHAPoleMassGetter[massMatrices[[k]]];
slhaPoleMixingMatrixGetters = slhaPoleMixingMatrixGetters <> TreeMasses`CreateSLHAPoleMixingMatrixGetter[massMatrices[[k]]];
physicalMassesDef = physicalMassesDef <> TreeMasses`CreatePhysicalMassDefinition[massMatrices[[k]]];
mixingMatricesDef = mixingMatricesDef <> TreeMasses`CreateMixingMatrixDefinition[massMatrices[[k]]];
physicalMassesInit = physicalMassesInit <> TreeMasses`CreatePhysicalMassInitialization[massMatrices[[k]]];
Expand Down Expand Up @@ -637,6 +640,8 @@
"@lspFunctions@" -> lspFunctions,
"@massGetters@" -> IndentText[massGetters],
"@mixingMatrixGetters@" -> IndentText[mixingMatrixGetters],
"@slhaPoleMassGetters@" -> IndentText[slhaPoleMassGetters],
"@slhaPoleMixingMatrixGetters@" -> IndentText[slhaPoleMixingMatrixGetters],
"@tadpoleEqPrototypes@" -> IndentText[tadpoleEqPrototypes],
"@tadpoleEqFunctions@" -> tadpoleEqFunctions,
"@numberOfEWSBEquations@"-> ToString[numberOfEWSBEquations],
Expand Down
30 changes: 21 additions & 9 deletions meta/TreeMasses.m
Expand Up @@ -9,6 +9,9 @@
CreateMassGetter::usage="creates a C function for
the mass getter";

CreateSLHAPoleMassGetter::usage="creates a C function for the pole mass
getter";

CreateParticleLaTeXNames::usage="creates a list of the particle's
LaTeX names";

Expand All @@ -24,6 +27,9 @@
CreateMixingMatrixGetter::usage="creates a getter for the mixing
matrix";

CreateSLHAPoleMixingMatrixGetter::usage="creates a getter for the pole
mixing matrix";

CreateMassCalculationPrototype::usage="creates a C function prototype
from a mass matrix";

Expand Down Expand Up @@ -362,7 +368,7 @@
Return[CConversion`MatrixType[type, dim, dim]];
];

CreateMassGetter[massMatrix_TreeMasses`FSMassMatrix] :=
CreateMassGetter[massMatrix_TreeMasses`FSMassMatrix, postFix_String:"", struct_String:""] :=
Module[{massESSymbol, returnType, dim, dimStr, massESSymbolStr},
massESSymbol = GetMassEigenstate[massMatrix];
massESSymbolStr = ToValidCSymbolString[FlexibleSUSY`M[massESSymbol]];
Expand All @@ -372,9 +378,12 @@
returnType = CConversion`ScalarType[CConversion`realScalarCType];,
returnType = CConversion`ArrayType[CConversion`realScalarCType, dim];
];
CConversion`CreateInlineGetter[massESSymbolStr, returnType]
CConversion`CreateInlineGetter[massESSymbolStr, returnType, postFix, struct]
];

CreateSLHAPoleMassGetter[massMatrix_TreeMasses`FSMassMatrix] :=
CreateMassGetter[massMatrix, "_pole_slha", "physical_slha."];

CreateParticleEnum[particles_List] :=
Module[{i, par, name, result = ""},
For[i = 1, i <= Length[particles], i++,
Expand Down Expand Up @@ -444,23 +453,26 @@
Return[result];
];

CreateMixingMatrixGetter[massMatrix_TreeMasses`FSMassMatrix] :=
CreateMixingMatrixGetter[massMatrix_TreeMasses`FSMassMatrix, postFix_String:"", struct_String:""] :=
Module[{mixingMatrixSymbol, returnType},
mixingMatrixSymbol = GetMixingMatrixSymbol[massMatrix];
returnType = GetMixingMatrixType[massMatrix];
CreateMixingMatrixGetter[mixingMatrixSymbol, returnType]
CreateMixingMatrixGetter[mixingMatrixSymbol, returnType, postFix, struct]
];

CreateMixingMatrixGetter[mixingMatrixSymbol_List, returnType_] :=
CreateMixingMatrixGetter[mixingMatrixSymbol_List, returnType_, postFix_String:"", struct_String:""] :=
Module[{result = ""},
(result = result <> CreateMixingMatrixGetter[#,returnType])& /@ mixingMatrixSymbol;
(result = result <> CreateMixingMatrixGetter[#,returnType, postFix, struct])& /@ mixingMatrixSymbol;
Return[result];
];

CreateMixingMatrixGetter[Null, returnType_] := "";
CreateMixingMatrixGetter[Null, returnType_, postFix_String:"", struct_String:""] := "";

CreateMixingMatrixGetter[mixingMatrixSymbol_Symbol, returnType_, postFix_String:"", struct_String:""] :=
CConversion`CreateInlineGetter[ToValidCSymbolString[mixingMatrixSymbol], returnType, postFix, struct];

CreateMixingMatrixGetter[mixingMatrixSymbol_Symbol, returnType_] :=
CConversion`CreateInlineGetter[ToValidCSymbolString[mixingMatrixSymbol], returnType];
CreateSLHAPoleMixingMatrixGetter[massMatrix_TreeMasses`FSMassMatrix] :=
CreateMixingMatrixGetter[massMatrix, "_pole_slha", "physical_slha."];

CreateFSMassMatrixForUnmixedParticle[TreeMasses`FSMassMatrix[expr_, massESSymbol_, Null]] :=
Module[{matrix, dim},
Expand Down
3 changes: 3 additions & 0 deletions templates/two_scale_model_slha.hpp.in
Expand Up @@ -53,6 +53,9 @@ public:
virtual void calculate_spectrum();
virtual void print(std::ostream&) const;

@slhaPoleMassGetters@
@slhaPoleMixingMatrixGetters@

private:
@ModelName@_physical physical_slha; ///< contains the pole masses and mixings in slha convention
};
Expand Down

0 comments on commit 2049426

Please sign in to comment.