From 46711378592f3332ff39a8716cc82fdba40cc8ad Mon Sep 17 00:00:00 2001 From: Dylan Harries Date: Thu, 9 Feb 2017 11:31:01 +1030 Subject: [PATCH] Collect output parameters earlier since they need to be defined before the constraints can be checked for validity --- meta/FlexibleSUSY.m | 90 ++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/meta/FlexibleSUSY.m b/meta/FlexibleSUSY.m index c05a4a36d..041536ab1 100644 --- a/meta/FlexibleSUSY.m +++ b/meta/FlexibleSUSY.m @@ -1926,7 +1926,7 @@ corresponding tadpole is real or imaginary (only in models with CP gaugeCouplingNormalizationDefs = "", numberOfDRbarBlocks, drBarBlockNames }, - particles = DeleteDuplicates @ Flatten[GetMassEigenstate /@ massMatrices]; + particles = DeleteDuplicates @ Flatten[TreeMasses`GetMassEigenstate /@ massMatrices]; susyParticles = Select[particles, (!SARAH`SMQ[#])&]; smParticles = Complement[particles, susyParticles]; minpar = Cases[inputParameters, {p_, {"MINPAR", idx_}, ___} :> {idx, p}]; @@ -2625,7 +2625,7 @@ corresponding tadpole is real or imaginary (only in models with CP inputParameters (* list of 3-component lists of the form {name, block, type} *), massMatrices, phases, diagonalizationPrecision, - allIntermediateOutputParametes = {}, + allIntermediateOutputParameters = {}, allIntermediateOutputParameterIndexReplacementRules = {}, allInputParameterIndexReplacementRules = {}, allExtraParameterIndexReplacementRules = {}, @@ -2849,6 +2849,49 @@ corresponding tadpole is real or imaginary (only in models with CP DebugPrint["input parameters: ", Parameters`GetInputParameters[]]; DebugPrint["auxiliary parameters: ", Parameters`GetExtraParameters[]]; + allIndexReplacementRules = Join[ + Parameters`CreateIndexReplacementRules[allParameters], + {Global`upQuarksDRbar[i_,j_] :> Global`upQuarksDRbar[i-1,j-1], + Global`downQuarksDRbar[i_,j_] :> Global`downQuarksDRbar[i-1,j-1], + Global`downLeptonsDRbar[i_,j_] :> Global`downLeptonsDRbar[i-1,j-1]} + ]; + + allInputParameterIndexReplacementRules = Parameters`CreateIndexReplacementRules[ + (* {parameter, type} *) + {#[[1]], #[[3]]}& /@ FlexibleSUSY`FSExtraInputParameters + ]; + + allExtraParameterIndexReplacementRules = Parameters`CreateIndexReplacementRules[ + (* {parameter, type} *) + {#, Parameters`GetType[#]}& /@ Parameters`GetExtraParameters[] + ]; + + On[Assert]; + + Lat$massMatrices = TreeMasses`ConvertSarahMassMatrices[] /. + Parameters`ApplyGUTNormalization[] //. + { SARAH`sum[j_, start_, end_, expr_] :> (Sum[expr, {j,start,end}]) }; + massMatrices = Lat$massMatrices /. allIndexReplacementRules; + Lat$massMatrices = LatticeUtils`FixDiagonalization[Lat$massMatrices]; + + allIntermediateOutputParameters = + Parameters`GetIntermediateOutputParameterDependencies[TreeMasses`GetMassMatrix /@ massMatrices]; + DebugPrint["intermediate output parameters = ", allIntermediateOutputParameters]; + + (* decrease index literals of intermediate output parameters in mass matrices *) + allIntermediateOutputParameterIndexReplacementRules = + Parameters`CreateIndexReplacementRules[allIntermediateOutputParameters]; + + massMatrices = massMatrices /. allIntermediateOutputParameterIndexReplacementRules; + + allParticles = FlexibleSUSY`M[TreeMasses`GetMassEigenstate[#]]& /@ massMatrices; + allOutputParameters = DeleteCases[DeleteDuplicates[ + Join[allParticles, + Flatten[TreeMasses`GetMixingMatrixSymbol[#]& /@ massMatrices]]], Null]; + + Parameters`SetOutputParameters[allOutputParameters]; + DebugPrint["output parameters = ", allOutputParameters]; + (* backwards compatibility replacements in constraints *) backwardsCompatRules = { Global`topDRbar -> Global`upQuarksDRbar, @@ -2873,23 +2916,6 @@ corresponding tadpole is real or imaginary (only in models with CP {FlexibleSUSY`LowScaleInput, FlexibleSUSY`SUSYScaleInput, FlexibleSUSY`HighScaleInput}]; (* replace all indices in the user-defined model file variables *) - allIndexReplacementRules = Join[ - Parameters`CreateIndexReplacementRules[allParameters], - {Global`upQuarksDRbar[i_,j_] :> Global`upQuarksDRbar[i-1,j-1], - Global`downQuarksDRbar[i_,j_] :> Global`downQuarksDRbar[i-1,j-1], - Global`downLeptonsDRbar[i_,j_] :> Global`downLeptonsDRbar[i-1,j-1]} - ]; - - allInputParameterIndexReplacementRules = Parameters`CreateIndexReplacementRules[ - (* {parameter, type} *) - {#[[1]], #[[3]]}& /@ FlexibleSUSY`FSExtraInputParameters - ]; - - allExtraParameterIndexReplacementRules = Parameters`CreateIndexReplacementRules[ - (* {parameter, type} *) - {#, Parameters`GetType[#]}& /@ Parameters`GetExtraParameters[] - ]; - EvaluateUserInput[]; ReplaceIndicesInUserInput[allIndexReplacementRules]; ReplaceIndicesInUserInput[allInputParameterIndexReplacementRules]; @@ -3028,32 +3054,6 @@ corresponding tadpole is real or imaginary (only in models with CP } ]; - On[Assert]; - - Lat$massMatrices = ConvertSarahMassMatrices[] /. - Parameters`ApplyGUTNormalization[] //. - { SARAH`sum[j_, start_, end_, expr_] :> (Sum[expr, {j,start,end}]) }; - massMatrices = Lat$massMatrices /. allIndexReplacementRules; - Lat$massMatrices = LatticeUtils`FixDiagonalization[Lat$massMatrices]; - - allIntermediateOutputParametes = - Parameters`GetIntermediateOutputParameterDependencies[GetMassMatrix /@ massMatrices]; - DebugPrint["intermediate output parameters = ", allIntermediateOutputParametes]; - - (* decrease index literals of intermediate output parameters in mass matrices *) - allIntermediateOutputParameterIndexReplacementRules = - Parameters`CreateIndexReplacementRules[allIntermediateOutputParametes]; - - massMatrices = massMatrices /. allIntermediateOutputParameterIndexReplacementRules; - - allParticles = FlexibleSUSY`M[GetMassEigenstate[#]]& /@ massMatrices; - allOutputParameters = DeleteCases[DeleteDuplicates[ - Join[allParticles, - Flatten[TreeMasses`GetMixingMatrixSymbol[#]& /@ massMatrices]]], Null]; - - Parameters`SetOutputParameters[allOutputParameters]; - DebugPrint["output parameters = ", allOutputParameters]; - extraSLHAOutputBlocks = Parameters`DecreaseIndexLiterals[ FlexibleSUSY`ExtraSLHAOutputBlocks, Join[Parameters`GetOutputParameters[], Parameters`GetModelParameters[]]