Skip to content

Commit

Permalink
do not import @ModelName@_info namespace
Browse files Browse the repository at this point in the history
because it contains C-style enums.  These enums would be imported as
well, which might lead to ambiguities.
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jan 17, 2017
1 parent 4bf64fa commit c902728
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
10 changes: 5 additions & 5 deletions meta/LoopMasses.m
Expand Up @@ -144,7 +144,7 @@
"const double self_energy = Re(" <> selfEnergyFunction <> "(p));\n" <>
"const double mass_sqr = " <> massMatrixName <> " - self_energy;\n\n" <>
"if (mass_sqr < 0.)\n" <>
IndentText["problems.flag_tachyon(" <> particleName <> ");"] <> "\n\n" <>
IndentText[TreeMasses`FlagTachyon[particleName]] <> "\n" <>
"PHYSICAL(" <> massName <> ") = AbsSqrt(mass_sqr);\n";


Expand Down Expand Up @@ -697,7 +697,7 @@ be set to the (positive) tree-level mass. M_tree
Module[{result, body = ""},
If[!IsFermion[particle] &&
!(IsUnmixed[particle] && GetMassOfUnmixedParticle[particle] === 0),
body = "if (!force_output && problems.is_tachyon(" <> ToValidCSymbolString[particle] <> "))\n" <>
body = "if (!force_output && problems.is_tachyon(" <> FlexibleSUSY`FSModelName <> "_info::" <> ToValidCSymbolString[particle] <> "))\n" <>
IndentText["return;"] <> "\n\n";
];
body = body <> DoDiagonalization[particle, precision, tadpole];
Expand Down Expand Up @@ -726,7 +726,7 @@ be set to the (positive) tree-level mass. M_tree
Return[""];
];
If[!(IsUnmixed[particle] && GetMassOfUnmixedParticle[particle] === 0),
body = "if (!force_output && problems.is_tachyon(" <> ToValidCSymbolString[particle] <> "))\n" <>
body = "if (!force_output && problems.is_tachyon(" <> FlexibleSUSY`FSModelName <> "_info::" <> ToValidCSymbolString[particle] <> "))\n" <>
IndentText["return 0.;"] <> "\n\n";
];
If[!IsMassless[particle],
Expand All @@ -745,7 +745,7 @@ be set to the (positive) tree-level mass. M_tree
"const double self_energy = Re(" <> selfEnergyFunction <> "(p));\n" <>
"const double mass_sqr = " <> mTree <> " - self_energy;\n\n" <>
"if (mass_sqr < 0.)\n" <>
IndentText["problems.flag_tachyon(" <> particleName <> ");"] <> "\n\n" <>
IndentText[TreeMasses`FlagTachyon[particleName]] <> "\n" <>
"return AbsSqrt(mass_sqr);\n";
,
body = "return 0.;\n";
Expand Down Expand Up @@ -1110,7 +1110,7 @@ be set to the (positive) tree-level mass. M_tree
"const double self_energy = Re(" <> selfEnergyFunction <> "(p));\n" <>
"const double mass_sqr = Sqr(m_pole) + self_energy;\n\n" <>
"if (mass_sqr < 0.) {\n" <>
IndentText["problems.flag_tachyon(" <> particleName <> ");\n" <>
IndentText[TreeMasses`FlagTachyon[particleName] <>
"return m_pole;"] <> "\n}\n\n" <>
"return AbsSqrt(mass_sqr);\n";
];
Expand Down
3 changes: 1 addition & 2 deletions meta/ThresholdCorrections.m
Expand Up @@ -601,8 +601,7 @@
const double mw_pole_sqr = Sqr(mw_drbar) - self_energy_w_at_mw;
if (mw_pole_sqr < 0.)
MODEL->get_problems().flag_tachyon(" <> FlexibleSUSY`FSModelName <> "_info::" <> wStr <> ");
" <> TreeMasses`FlagTachyon[wStr, "MODEL->get_problems()."] <> "
return AbsSqrt(mw_pole_sqr);"
];

Expand Down
8 changes: 5 additions & 3 deletions meta/TreeMasses.m
Expand Up @@ -201,6 +201,8 @@
CallDiagonalizeSymmetricFunction::usage="";
CallDiagonalizeHermitianFunction::usage="";

FlagTachyon::usage = "";

Begin["`Private`"];

unrotatedParticles = {};
Expand Down Expand Up @@ -1286,7 +1288,7 @@ the fundamental representation of SU(3) in SARAH.
WrapMacro[CConversion`ToValidCSymbolString[FlexibleSUSY`M[particle]],macro] <>
If[dimEnd > 1, ".tail<" <> ToString[dimEnd - dimStart + 1] <> ">().minCoeff()", ""]<>
" < 0.) " <>
"problems.flag_tachyon(" <> particleName <> ");\n"
FlagTachyon[particleName]
];

CheckPoleMassesForTachyons[macro_String] :=
Expand Down Expand Up @@ -1374,8 +1376,8 @@ the fundamental representation of SU(3) in SARAH.
{prototype, def}
];

FlagTachyon[particle_String] :=
"problems.flag_tachyon(" <>
FlagTachyon[particle_String, problems_String:"problems."] :=
problems <> "flag_tachyon(" <>
FlexibleSUSY`FSModelName <> "_info::" <> particle <>
");\n";

Expand Down
2 changes: 0 additions & 2 deletions templates/mass_eigenstates.cpp.in
Expand Up @@ -57,8 +57,6 @@

namespace flexiblesusy {

using namespace @ModelName@_info;

#define CLASSNAME @ModelName@_mass_eigenstates

#define PHYSICAL(parameter) physical.parameter
Expand Down
2 changes: 0 additions & 2 deletions templates/two_scale_model.cpp.in
Expand Up @@ -34,8 +34,6 @@

namespace flexiblesusy {

using namespace @ModelName@_info;

#define CLASSNAME @ModelName@<Two_scale>

CLASSNAME::@ModelName@(const @ModelName@_input_parameters& input_)
Expand Down

0 comments on commit c902728

Please sign in to comment.