Skip to content

Commit

Permalink
add PMNS matrix to SLHA wrapper class and write it to SLHA output file
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Dec 10, 2014
1 parent 308c988 commit bdb054e
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 2 deletions.
5 changes: 5 additions & 0 deletions meta/Constraint.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
modelName_String] :=
"calculate_" <> CConversion`ToValidCSymbolString[parameter] <> "_DRbar();\n";

ApplyConstraint[{parameter_,
value_ /; !FreeQ[value, Global`neutrinoDRbar]}, modelName_String] :=
"calculate_MNeutrino_DRbar();\n" <>
Parameters`SetParameter[parameter, value, modelName];

ApplyConstraint[{parameter_ /; !MemberQ[{SARAH`UpYukawa, SARAH`DownYukawa, SARAH`ElectronYukawa}, parameter], value_ /; value === Automatic}, modelName_String] :=
Block[{},
Print["Error: cannot determine ", parameter, " automatically!"];
Expand Down
5 changes: 4 additions & 1 deletion meta/FlexibleSUSY.m
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@
slhaPoleMassGetters = "",
slhaPoleMixingMatrixGetters = "",
convertMixingsToSLHAConvention = "",
calculateCKMMatrix = ""
calculateCKMMatrix = "",
calculatePMNSMatrix = ""
},
slhaYukawaDef = WriteOut`CreateSLHAYukawaDefinition[];
slhaYukawaGetter = WriteOut`CreateSLHAYukawaGetters[];
Expand All @@ -546,6 +547,7 @@
slhaFerimonMixingMatricesGetters = WriteOut`CreateSLHAFermionMixingMatricesGetters[];
convertMixingsToSLHAConvention = WriteOut`ConvertMixingsToSLHAConvention[massMatrices];
calculateCKMMatrix = WriteOut`CalculateCKMMatrix[];
calculatePMNSMatrix = WriteOut`CalculatePMNSMatrix[];
For[k = 1, k <= Length[massMatrices], k++,
slhaPoleMassGetters = slhaPoleMassGetters <> TreeMasses`CreateSLHAPoleMassGetter[massMatrices[[k]]];
slhaPoleMixingMatrixGetters = slhaPoleMixingMatrixGetters <> TreeMasses`CreateSLHAPoleMixingMatrixGetter[massMatrices[[k]]];
Expand All @@ -566,6 +568,7 @@
"@slhaPoleMixingMatrixGetters@" -> IndentText[slhaPoleMixingMatrixGetters],
"@convertMixingsToSLHAConvention@" -> IndentText[convertMixingsToSLHAConvention],
"@calculateCKMMatrix@" -> IndentText[calculateCKMMatrix],
"@calculatePMNSMatrix@" -> IndentText[calculatePMNSMatrix],
Sequence @@ GeneralReplacementRules[]
} ];
];
Expand Down
19 changes: 18 additions & 1 deletion meta/WriteOut.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
ConvertSoftSquaredMassesToSLHA::usage="";

CalculateCKMMatrix::usage="";
CalculatePMNSMatrix::usage="";

Begin["`Private`"];

Expand Down Expand Up @@ -657,7 +658,8 @@
GetFermionMixingMatrices[] :=
Select[{SARAH`DownMatrixL, SARAH`UpMatrixL,
SARAH`DownMatrixR, SARAH`UpMatrixR,
SARAH`ElectronMatrixL, SARAH`ElectronMatrixR},
SARAH`ElectronMatrixL, SARAH`ElectronMatrixR,
SARAH`NeutrinoMM},
MemberQ[Parameters`GetOutputParameters[],#]&];

GetMixingMatricesFor[yuk_] :=
Expand Down Expand Up @@ -906,6 +908,21 @@
result
];

CalculatePMNSMatrix[] :=
Module[{result = ""},
If[MemberQ[Parameters`GetOutputParameters[], SARAH`ElectronMatrixL] &&
MemberQ[Parameters`GetOutputParameters[], SARAH`NeutrinoMM] &&
SARAH`getDimParameters[SARAH`ElectronMatrixL] === SARAH`getDimParameters[SARAH`NeutrinoMM]
,
result = "pmns = " <>
CreateSLHAFermionMixingMatrixName[SARAH`ElectronMatrixL] <> " * " <>
CreateSLHAFermionMixingMatrixName[SARAH`NeutrinoMM] <> ".adjoint();\n";
,
result = "pmns << 1, 0, 0, 0, 1, 0, 0, 0, 1;\n";
];
result
];

End[];

EndPackage[];
8 changes: 8 additions & 0 deletions templates/slha_io.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ void @ModelName@_slha_io::set_ckm(
slha_io.set_block("IMVCKM", ckm_matrix.imag(), "Im(CKM)", scale);
}

void @ModelName@_slha_io::set_pmns(
const Eigen::Matrix<std::complex<double>,3,3>& pmns_matrix,
double scale)
{
slha_io.set_block("VPMNS" , pmns_matrix.real(), "Re(PMNS)", scale);
slha_io.set_block("IMVPMNS", pmns_matrix.imag(), "Im(PMNS)", scale);
}

/**
* Write SLHA object to file.
*
Expand Down
4 changes: 4 additions & 0 deletions templates/slha_io.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private:
void set_mixing_matrices(const @ModelName@_physical&, bool);
template <class T> void set_model_parameters(const @ModelName@_slha<T>&);
void set_ckm(const Eigen::Matrix<std::complex<double>,3,3>&, double);
void set_pmns(const Eigen::Matrix<std::complex<double>,3,3>&, double);
double read_scale() const;
template <class T> void fill_drbar_parameters(@ModelName@_slha<T>&) const;
template <class T> void fill_physical(@ModelName@_slha<T>&) const;
Expand Down Expand Up @@ -212,6 +213,9 @@ void @ModelName@_slha_io::set_spectrum(const @ModelName@_slha<T>& model)

if (slha_io.get_modsel().quark_flavour_violated)
set_ckm(model.get_ckm_matrix(), model.get_scale());

if (slha_io.get_modsel().lepton_flavour_violated)
set_pmns(model.get_pmns_matrix(), model.get_scale());
}

} // namespace flexiblesusy
Expand Down
8 changes: 8 additions & 0 deletions templates/two_scale_model_slha.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "@ModelName@_two_scale_model_slha.hpp"
#include "slha_io.hpp"
#include "ckm.hpp"
#include "pmns.hpp"

namespace flexiblesusy {

Expand All @@ -36,6 +37,7 @@ CLASSNAME::@ModelName@_slha(const @ModelName@_input_parameters& input_)
: @ModelName@<Two_scale>(input_)
, physical_slha()
, ckm(Eigen::Matrix<std::complex<double>,3,3>::Identity())
, pmns(Eigen::Matrix<std::complex<double>,3,3>::Identity())
{
}

Expand Down Expand Up @@ -75,6 +77,7 @@ void CLASSNAME::convert_to_slha()

convert_yukawa_couplings_to_slha();
calculate_ckm_matrix();
calculate_pmns_matrix();
convert_trilinear_couplings_to_slha();
convert_soft_squared_masses_to_slha();
}
Expand All @@ -96,6 +99,11 @@ void CLASSNAME::calculate_ckm_matrix()
@calculateCKMMatrix@
}

void CLASSNAME::calculate_pmns_matrix()
{
@calculatePMNSMatrix@
}

/**
* Convert Yukawa couplings to SLHA convention
*/
Expand Down
3 changes: 3 additions & 0 deletions templates/two_scale_model_slha.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public:
void convert_to_slha(); ///< converts pole masses and couplings to SLHA convention
static void convert_to_slha(@ModelName@_physical&); ///< converts pole masses to SLHA convention
const Eigen::Matrix<std::complex<double>,3,3>& get_ckm_matrix() const { return ckm; }
const Eigen::Matrix<std::complex<double>,3,3>& get_pmns_matrix() const { return pmns; }
const @ModelName@_physical& get_physical_slha() const; ///< returns pole masses to SLHA convention
@ModelName@_physical& get_physical_slha(); ///< returns pole masses to SLHA convention

Expand All @@ -67,12 +68,14 @@ public:
private:
@ModelName@_physical physical_slha; ///< contains the pole masses and mixings in slha convention
Eigen::Matrix<std::complex<double>,3,3> ckm;
Eigen::Matrix<std::complex<double>,3,3> pmns;
@slhaYukawaDef@
@slhaFerimonMixingMatricesDef@
@slhaTrilinearCouplingsDef@
@slhaSoftSquaredMassesDef@

void calculate_ckm_matrix();
void calculate_pmns_matrix();
void convert_yukawa_couplings_to_slha();
void convert_trilinear_couplings_to_slha();
void convert_soft_squared_masses_to_slha();
Expand Down

0 comments on commit bdb054e

Please sign in to comment.