Commit 3c9f9f27 authored by Grégoire Uhlrich's avatar Grégoire Uhlrich
Browse files

InitSanitizer in csl libraries, elementary masses

parent 2a1f8865
......@@ -13,7 +13,6 @@ all:
$(MAKE) csl
$(MAKE) jsonparser
$(MAKE) grafed
$(MAKE) sgl
$(MAKE) marty
@echo "$(GREEN)$(BOLD)Compilation finished, you may now type $(BLUE)\n $$ make install$(NC)$(NORMAL)"
dep:
......@@ -24,10 +23,7 @@ jsonparser:
cd jsonparser&& $(MAKE) all
grafed:
cd grafed&& $(MAKE) all
sgl:
cd marty/sgl&& $(MAKE) all
marty:
cd marty/models&& $(MAKE) all
cd marty&& $(MAKE) all
install:
......
......@@ -71,6 +71,7 @@
#include "timer.h"
#include "timeMonitor.h"
#include "linear_map.h"
#include "initSanitizer.h"
#include "librarygenerator.h"
#include "libraryfunction.h"
......
#pragma once
#include <iostream>
#include <cassert>
namespace csl {
/**
* @brief Encapsulates a value of a given to ensure that it initialized when
* used.
*
* @details An object of type InitSanitizer<T> can be used as a number for
* assignment and will be automatically converted to the encapsulated value
* when necessary. When assigned, the value becomes safe (initially not). When
* the encapsulated value is taken from the object, it checks that it is indeed
* initialized before returning it to ensure that there is no garbage result.
*
* @tparam T Type of the encapsulated object.
*/
template<typename T>
class InitSanitizer {
public:
constexpr InitSanitizer(char const t_name[])
:name(t_name)
{
}
InitSanitizer(T const &t) {
this->operator=(t);
}
InitSanitizer &operator=(T const &t) {
safe = true;
value = t;
return *this;
}
operator T () const {
return get();
}
T get() const {
if (!safe) {
std::cerr << "Error: param \"" << name << "\" is used ";
std::cerr << "uninitialized, please assign it a value using ";
std::cerr << "standard value assignement.\n";
assert(false);
}
return value;
}
friend
std::ostream &operator<<(
std::ostream &out,
InitSanitizer const &san
)
{
out << san.value;
return out;
}
private:
char const *name;
T value;
bool safe { false };
};
} // namespace csl
......@@ -202,7 +202,7 @@ namespace csl {
}
for (const auto &param : parameters) {
out << LibraryGenerator::indent(1)
<< "auto const &" << param.name << " = param."
<< "const " << param.type << ' ' << param.name << " = param."
<< param.name << ";\n";
}
// group->printParameterInitialization(out, 1);
......
......@@ -281,6 +281,7 @@ namespace csl {
paramFile << "#ifndef CSL_LIB_PARAM_H_INCLUDED\n",
paramFile << "#define CSL_LIB_PARAM_H_INCLUDED\n\n";
paramFile << "#include \"common.h\"\n";
paramFile << "#include \"csl/initSanitizer.h\"\n";
paramFile << '\n';
paramFile << "namespace " << regLibName() << " {\n\n";
dummy->print(paramFile, true);
......@@ -876,6 +877,7 @@ namespace csl {
header << "#include \"common.h\"\n";
header << "#include \"librarytensor.h\"\n";
header << "#include \"callable.h\"\n";
header << "#include \"csl/initSanitizer.h\"\n";
if (uniqueParamStruct)
header << "#include \"params.h\"\n";
for (const auto &f : g.getFunctions())
......
......@@ -80,7 +80,9 @@ namespace csl {
out << " {\n";
for (size_t i = 0; i != parameters.size(); ++i) {
out << LibraryGenerator::indent(nIndent + 1);
out << parameters[i].type << " " << parameters[i].name << ";\n";
out << "csl::InitSanitizer<" << parameters[i].type << "> "
<< parameters[i].name << " { \"" << parameters[i].name
<< "\" };\n";
}
out << LibraryGenerator::indent(nIndent) << "};\n";
}
......
......@@ -10,7 +10,8 @@ DYNAMICLIBRARY = libmarty.so
LTVERSION = 2.15
CXXDEBUG = $(CXX) -g
CXXFLAGS = $(MARTY_CXX_FLAGS) -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC
CXXFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC $(MARTY_CXX_FLAGS)
CXXNOOPTIFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -fPIC $(MARTY_CXX_FLAGS)
SRCDIR = src
HEADDIR = include
......@@ -112,7 +113,7 @@ sgl/$(OBJDIR)/%.o: sgl/$(SRCDIR)/%.cpp
# Création des différents *.o à partir des *.cpp
models/$(OBJDIR)/%.o: models/$(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
$(CXX) $(CXXNOOPTIFLAGS) -o $@ -c $< $(INCPATH)
# Création des différents *.o à partir des *.cpp
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
......@@ -131,8 +132,8 @@ sgl/$(OBJDIR)/%_debug.o: sgl/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
# Création des différents *.o à partir des *.cpp
models/$(OBJDIR)/_debug%.o: models/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
models/$(OBJDIR)/%_debug.o: models/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXNOOPTIFLAGS) -o $@ -c $< $(INCPATH)
# Version avec deboggage
$(OBJDIR)/%_debug.o: $(SRCDIR)/%.cpp
......
......@@ -5,7 +5,8 @@ DYNAMICLIBRARY = libmarty.so
LTVERSION = 2.15
CXXDEBUG = $(CXX) -g
CXXFLAGS = $(MARTY_CXX_FLAGS) -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC
CXXFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -O3 -fPIC $(MARTY_CXX_FLAGS)
CXXNOOPTIFLAGS = -Wall -Wextra -Wpedantic -std=c++17 -fPIC $(MARTY_CXX_FLAGS)
SRCDIR = src
HEADDIR = include
......@@ -107,7 +108,7 @@ sgl/$(OBJDIR)/%.o: sgl/$(SRCDIR)/%.cpp
# Création des différents *.o à partir des *.cpp
models/$(OBJDIR)/%.o: models/$(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
$(CXX) $(CXXNOOPTIFLAGS) -o $@ -c $< $(INCPATH)
# Création des différents *.o à partir des *.cpp
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
......@@ -126,8 +127,8 @@ sgl/$(OBJDIR)/%_debug.o: sgl/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
# Création des différents *.o à partir des *.cpp
models/$(OBJDIR)/_debug%.o: models/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXFLAGS) -o $@ -c $< $(INCPATH)
models/$(OBJDIR)/%_debug.o: models/$(SRCDIR)/%.cpp
$(CXXDEBUG) $(CXXNOOPTIFLAGS) -o $@ -c $< $(INCPATH)
# Version avec deboggage
$(OBJDIR)/%_debug.o: $(SRCDIR)/%.cpp
......
......@@ -114,6 +114,13 @@ public:
*/
ModelBuilder &operator=(ModelBuilder const &other) = delete;
/**
* @return #abbreviatedMassExpressions
*/
std::vector<csl::Expr> const &getAbbreviatedMassExpressions() const {
return abbreviatedMassExpressions;
}
///////////////////////////////////////////////////
// Replacements
///////////////////////////////////////////////////
......@@ -354,24 +361,24 @@ public:
void diagonalizeYukawa(
std::string const &nameYukawa,
std::vector<std::string> const &nameMass,
csl::Expr const &globalFactor = CSL_1
csl::Expr const &globalFactor = CSL_1
);
void diagonalizeYukawa(
std::string const &nameYukawa,
std::vector<std::string> const &nameMass,
csl::Expr const &globalFactor,
csl::Expr const &globalFactor,
csl::Tensor &mixing,
std::vector<mty::Particle> mixed
);
void diagonalizeYukawa(
std::string const &nameYukawa,
std::vector<csl::Expr> const &diagonal,
csl::Tensor mixing,
std::vector<mty::Particle> mixed
std::string const &nameYukawa,
std::vector<csl::Expr> const &diagonal,
csl::Tensor mixing,
std::vector<mty::Particle> mixed
);
void addSpectrum(
std::vector<mty::Particle> const &particles,
std::vector<mty::Particle> const &particles,
std::vector<std::vector<csl::Expr>> const &mass,
std::vector<std::vector<csl::Expr>> const &mix,
std::vector<std::vector<csl::Expr>> const &mix2
......@@ -388,7 +395,7 @@ public:
mty::Amplitude const &amplitudes
) const;
void applyDiagonalizationData(
csl::LibraryGenerator &lib,
csl::LibraryGenerator &lib,
std::function<bool(mty::Spectrum const &)> const &condition
) const;
void addMassAbbreviations(
......@@ -398,8 +405,8 @@ public:
void abbreviateBigTerms(size_t maxLeafs = 30);
void checksRotation(
std::vector<mty::Particle> const &fields,
std::vector<mty::Particle> const &newFields,
std::vector<mty::Particle> const &fields,
std::vector<mty::Particle> const &newFields,
std::vector<std::vector<csl::Expr>> const &rotation
);
......@@ -555,6 +562,13 @@ protected:
* terms.
*/
std::vector<Spectrum> spectra;
/**
* @brief Vector of abbreviated masses in the model, determined by the
* ModelBuilder::gatherMasses() function and written to libraries by the
* mty::Library::generateSpectrum() function.
*/
std::vector<csl::Expr> abbreviatedMassExpressions;
};
///////////////////////////////////////////////////
......
......@@ -58,8 +58,7 @@ namespace mty {
void generateSpectrum(Model &model) {
model.applyDiagonalizationData(*this);
for (const auto &p : model.getParticles()) {
csl::Expr m = p->getMass();
for (const auto &m : model.getAbbreviatedMassExpressions()) {
if (csl::Abbrev::find_opt(m))
addFunction(m->getName(), m, "G");
}
......
......@@ -99,6 +99,7 @@ class QuantumNumber {
* \param t_conserved Boolean that tells if the quantum number is conserved
* (default = true).
*/
explicit
QuantumNumber(std::string const& t_name,
bool t_conserved = true);
......
......@@ -75,28 +75,44 @@ void PMSSM_LEM::initContent()
theta_W = sm_input::theta_W;
beta = mssm_input::beta;
m_A0 = M_A;
m_Hp = csl::Abbrev::makeAbbreviation("m_Hp", csl::sqrt_s(M_A*M_A + M_W*M_W));
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_Hp", csl::sqrt_s(M_A*M_A + M_W*M_W)));
m_Hp = csl::constant_s("m_Hp");
alpha = mssm_input::alpha;
csl::Expr mh2_mean = M_A*M_A + M_Z*M_Z;
csl::Expr mh2_dev = csl::sqrt_s(
csl::pow_s(M_A*M_A - M_Z*M_Z, 2)
+ csl::pow_s(2*M_A*M_Z*csl::sin_s(2*beta), 2)
);
m_h0 = csl::Abbrev::makeAbbreviation("m_h0", CSL_HALF * (mh2_mean - mh2_dev));
m_H0 = csl::Abbrev::makeAbbreviation("m_H0", CSL_HALF * (mh2_mean + mh2_dev));
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation(
"m_h0", csl::sqrt_s(CSL_HALF * (mh2_mean - mh2_dev))));
m_h0 = csl::constant_s("m_h0");
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation(
"m_H0", csl::sqrt_s(CSL_HALF * (mh2_mean + mh2_dev))));
m_H0 = csl::constant_s("m_H0");
m_c = sm_input::m_c;
m_t = sm_input::m_t;
m_u = sm_input::m_u;
M_q1L = mssm_input::Mq1L;
csl::Expr m_sc_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(m_c, 2) , csl::pow_s(M_q1L, 2) , csl::prod_s({csl::intfraction_s(1, 12), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(-1, 6), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_sc_L = csl::Abbrev::makeAbbreviation("m_sc_L", m_sc_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_sc_L", m_sc_L_encaps));
m_sc_L = csl::constant_s("m_sc_L");
csl::Expr m_su_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(m_u, 2) , csl::pow_s(M_q1L, 2) , csl::prod_s({csl::intfraction_s(1, 12), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(-1, 6), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_su_L = csl::Abbrev::makeAbbreviation("m_su_L", m_su_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_su_L", m_su_L_encaps));
m_su_L = csl::constant_s("m_su_L");
M_quR = mssm_input::MquR;
csl::Expr m_sc_R_encaps = csl::pow_s(csl::sum_s({csl::pow_s(m_c, 2) , csl::pow_s(M_quR, 2) , csl::prod_s({csl::intfraction_s(1, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(-2, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_sc_R = csl::Abbrev::makeAbbreviation("m_sc_R", m_sc_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_sc_R", m_sc_R_encaps));
m_sc_R = csl::constant_s("m_sc_R");
csl::Expr m_su_R_encaps = csl::pow_s(csl::sum_s({csl::pow_s(m_u, 2) , csl::pow_s(M_quR, 2) , csl::prod_s({csl::intfraction_s(1, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(-2, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_su_R = csl::Abbrev::makeAbbreviation("m_su_R", m_su_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_su_R", m_su_R_encaps));
m_su_R = csl::constant_s("m_su_R");
m_b = sm_input::m_b;
m_d = sm_input::m_d;
m_s = sm_input::m_s;
......@@ -109,7 +125,9 @@ void PMSSM_LEM::initContent()
V_td->setComplexProperty(csl::ComplexProperty::Complex);
csl::Expr m_sd_R_encaps = csl::pow_s(csl::sum_s({csl::prod_s({V_td, csl::GetComplexConjugate(V_td), csl::pow_s(M_qbR, 2)}) , csl::prod_s({V_cd, csl::GetComplexConjugate(V_cd), csl::pow_s(M_qdR, 2)}) , csl::prod_s({csl::pow_s(V_ud, 2), csl::pow_s(M_qdR, 2)}) , csl::prod_s({csl::pow_s(m_d, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_d, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 6), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_sd_R = csl::Abbrev::makeAbbreviation("m_sd_R", m_sd_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_sd_R", m_sd_R_encaps));
m_sd_R = csl::constant_s("m_sd_R");
V_us = sm_input::V_us;
V_cs = sm_input::V_cs;
V_cs->setComplexProperty(csl::ComplexProperty::Complex);
......@@ -117,36 +135,54 @@ void PMSSM_LEM::initContent()
V_ts->setComplexProperty(csl::ComplexProperty::Complex);
csl::Expr m_ss_R_encaps = csl::pow_s(csl::sum_s({csl::prod_s({V_ts, csl::GetComplexConjugate(V_ts), csl::pow_s(M_qbR, 2)}) , csl::prod_s({V_cs, csl::GetComplexConjugate(V_cs), csl::pow_s(M_qdR, 2)}) , csl::prod_s({csl::pow_s(V_us, 2), csl::pow_s(M_qdR, 2)}) , csl::prod_s({csl::pow_s(m_s, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_s, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 6), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 3), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_ss_R = csl::Abbrev::makeAbbreviation("m_ss_R", m_ss_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_ss_R", m_ss_R_encaps));
m_ss_R = csl::constant_s("m_ss_R");
M_q3L = mssm_input::Mq3L;
csl::Expr m_sd_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({V_cd, csl::GetComplexConjugate(V_cd), csl::pow_s(M_q1L, 2)}) , csl::prod_s({csl::pow_s(V_ud, 2), csl::pow_s(M_q1L, 2)}) , csl::prod_s({V_td, csl::GetComplexConjugate(V_td), csl::pow_s(M_q3L, 2)}) , csl::prod_s({csl::pow_s(m_d, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({-1
, csl::pow_s(m_d, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 12), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_sd_L = csl::Abbrev::makeAbbreviation("m_sd_L", m_sd_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_sd_L", m_sd_L_encaps));
m_sd_L = csl::constant_s("m_sd_L");
csl::Expr m_ss_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({V_cs, csl::GetComplexConjugate(V_cs), csl::pow_s(M_q1L, 2)}) , csl::prod_s({csl::pow_s(V_us, 2), csl::pow_s(M_q1L, 2)}) , csl::prod_s({V_ts, csl::GetComplexConjugate(V_ts), csl::pow_s(M_q3L, 2)}) , csl::prod_s({csl::pow_s(m_s, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({-1
, csl::pow_s(m_s, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 12), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_ss_L = csl::Abbrev::makeAbbreviation("m_ss_L", m_ss_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_ss_L", m_ss_L_encaps));
m_ss_L = csl::constant_s("m_ss_L");
m_e = sm_input::m_e;
m_mu = sm_input::m_mu;
m_tau = sm_input::m_tau;
M_eR = mssm_input::MeR;
csl::Expr m_se_R_encaps = csl::pow_s(csl::sum_s({csl::pow_s(M_eR, 2) , csl::prod_s({csl::pow_s(m_e, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_e, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_se_R = csl::Abbrev::makeAbbreviation("m_se_R", m_se_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_se_R", m_se_R_encaps));
m_se_R = csl::constant_s("m_se_R");
csl::Expr m_smu_R_encaps = csl::pow_s(csl::sum_s({csl::pow_s(M_eR, 2) , csl::prod_s({csl::pow_s(m_mu, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_mu, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_smu_R = csl::Abbrev::makeAbbreviation("m_smu_R", m_smu_R_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_smu_R", m_smu_R_encaps));
m_smu_R = csl::constant_s("m_smu_R");
M_eL = mssm_input::MeL;
csl::Expr m_se_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(M_eL, 2) , csl::prod_s({csl::pow_s(m_e, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_e, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 4), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_se_L = csl::Abbrev::makeAbbreviation("m_se_L", m_se_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_se_L", m_se_L_encaps));
m_se_L = csl::constant_s("m_se_L");
csl::Expr m_smu_L_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(M_eL, 2) , csl::prod_s({csl::pow_s(m_mu, 2), csl::pow_s(csl::cos_s(beta), (-2))}) , csl::prod_s({-1
, csl::pow_s(m_mu, 2), csl::pow_s(csl::cos_s(beta), (-2)), csl::pow_s(csl::sin_s(beta), 2)}) , csl::prod_s({csl::intfraction_s(-1, 4), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_smu_L = csl::Abbrev::makeAbbreviation("m_smu_L", m_smu_L_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_smu_L", m_smu_L_encaps));
m_smu_L = csl::constant_s("m_smu_L");
csl::Expr m_snu_e_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(M_eL, 2) , csl::prod_s({csl::intfraction_s(-1, 4), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_snu_e = csl::Abbrev::makeAbbreviation("m_snu_e", m_snu_e_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_snu_e", m_snu_e_encaps));
m_snu_e = csl::constant_s("m_snu_e");
M_tauL = mssm_input::MtauL;
csl::Expr m_snu_tau_encaps = csl::pow_s(csl::sum_s({csl::prod_s({csl::intfraction_s(-1, 2), csl::pow_s(M_W, 2)}) , csl::pow_s(M_tauL, 2) , csl::prod_s({csl::intfraction_s(-1, 4), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(theta_W), 2)}) , csl::prod_s({csl::intfraction_s(1, 2), csl::pow_s(M_Z, 2), csl::pow_s(csl::sin_s(beta), 2), csl::pow_s(csl::sin_s(theta_W), 2)})}), csl::intfraction_s(1, 2));
m_snu_tau = csl::Abbrev::makeAbbreviation("m_snu_tau", m_snu_tau_encaps);
abbreviatedMassExpressions.push_back(
csl::Abbrev::makeAbbreviation("m_snu_tau", m_snu_tau_encaps));
m_snu_tau = csl::constant_s("m_snu_tau");
m_C1p = csl::constant_s("m_C1p");
m_C2p = csl::constant_s("m_C2p");
M_3 = mssm_input::M3;
......
......@@ -1311,9 +1311,11 @@ void ModelBuilder::gatherMasses()
part->setMass(mass);
else {
std::string name = "m_" + std::string(part->getName());
mass = csl::Abbrev::makeAbbreviation(
csl::Expr abbreviatedMass = csl::Abbrev::makeAbbreviation(
name,
mass);
mass = csl::constant_s(name);
abbreviatedMassExpressions.push_back(abbreviatedMass);
}
std::vector<mty::QuantumField> content
= L.mass[massTerms[0]]->getContent();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment