a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
LeftRightSymmetricModel.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 HEPfit Collaboration
3 *
4 *
5 * For the licensing terms see doc/COPYING.
6 */
7
9#include "LRSMquantities.h"
10
11const std::string LeftRightSymmetricModel::LeftRightSymmetricModelvars[NLeftRightSymmetricModelvars] =
12 {"mH1p_2", "mH2p_2", "mdeltappR_2", "xi_LRSM", "mWR",
13 "lambda1_LRSM", "lambda2_LRSM", "lambda3_LRSM", "lambda4_LRSM",
14 "rho1_LRSM", "rho4_LRSM", "alpha1_LRSM", "alpha2_LRSM",
15 "alpha_LRSM", "delta2_LRSM",
16 "thetaR12_LRSM","thetaR13_LRSM","thetaR23_LRSM",
17 "phiR1_LRSM","phiR2_LRSM","phiR3_LRSM","phiR4_LRSM","phiR5_LRSM","phiR6_LRSM",
18 "Q_LRSM"};
19
21U(5, 5, 0.), LRSMM(*this)
22{
23 SMM.setObj((StandardModelMatching&) LRSMM.getObj());
24 ModelParamMap.insert(std::make_pair("mH1p_2", std::cref(mH1p_2)));
25 ModelParamMap.insert(std::make_pair("mH2p_2", std::cref(mH2p_2)));
26 ModelParamMap.insert(std::make_pair("mdeltappR_2", std::cref(mdeltappR_2)));
27 ModelParamMap.insert(std::make_pair("xi_LRSM", std::cref(xi_LRSM)));
28 ModelParamMap.insert(std::make_pair("mWR", std::cref(mWR)));
29 ModelParamMap.insert(std::make_pair("lambda1_LRSM", std::cref(lambda1_LRSM)));
30 ModelParamMap.insert(std::make_pair("lambda2_LRSM", std::cref(lambda2_LRSM)));
31 ModelParamMap.insert(std::make_pair("lambda3_LRSM", std::cref(lambda3_LRSM)));
32 ModelParamMap.insert(std::make_pair("lambda4_LRSM", std::cref(lambda4_LRSM)));
33 ModelParamMap.insert(std::make_pair("rho1_LRSM", std::cref(rho1_LRSM)));
34 ModelParamMap.insert(std::make_pair("rho4_LRSM", std::cref(rho4_LRSM)));
35 ModelParamMap.insert(std::make_pair("alpha1_LRSM", std::cref(alpha1_LRSM)));
36 ModelParamMap.insert(std::make_pair("alpha2_LRSM", std::cref(alpha2_LRSM)));
37 ModelParamMap.insert(std::make_pair("alpha_LRSM", std::cref(alpha_LRSM)));
38 ModelParamMap.insert(std::make_pair("delta2_LRSM", std::cref(delta2_LRSM)));
39 ModelParamMap.insert(std::make_pair("thetaR12_LRSM", std::cref(thetaR12_LRSM)));
40 ModelParamMap.insert(std::make_pair("thetaR13_LRSM", std::cref(thetaR13_LRSM)));
41 ModelParamMap.insert(std::make_pair("thetaR23_LRSM", std::cref(thetaR23_LRSM)));
42 ModelParamMap.insert(std::make_pair("phiR1_LRSM", std::cref(phiR1_LRSM)));
43 ModelParamMap.insert(std::make_pair("phiR2_LRSM", std::cref(phiR2_LRSM)));
44 ModelParamMap.insert(std::make_pair("phiR3_LRSM", std::cref(phiR3_LRSM)));
45 ModelParamMap.insert(std::make_pair("phiR4_LRSM", std::cref(phiR4_LRSM)));
46 ModelParamMap.insert(std::make_pair("phiR5_LRSM", std::cref(phiR5_LRSM)));
47 ModelParamMap.insert(std::make_pair("phiR6_LRSM", std::cref(phiR6_LRSM)));
48 ModelParamMap.insert(std::make_pair("Q_LRSM", std::cref(Q_LRSM)));
50 flag_CPV = false;
51}
52
54 if (myLRSMquantities != NULL) delete(myLRSMquantities);
55// if (IsModelInitialized()) {
56// }
57}
58
59/*----------------------------------------------------------------------------*/
60// Initialization
61
63{
67 return(true);
68}
69
70bool LeftRightSymmetricModel::Init(const std::map<std::string, double>& DPars) {
72}
73
75{
76 if(!StandardModel::PreUpdate()) return (false);
77
78 return (true);
79}
80
81bool LeftRightSymmetricModel::Update(const std::map<std::string, double>& DPars) {
82
83 if(!PreUpdate()) return (false);
84 UpdateError = false;
85 for (std::map<std::string, double>::const_iterator it = DPars.begin(); it != DPars.end(); it++)
86 setParameter(it->first, it->second);
87 if (UpdateError) return (false);
88 if(!PostUpdate()) return (false);
89
90 return (true);
91}
92
94{
95 if(!StandardModel::PostUpdate()) return (false);
96 if(!myLRSMquantities->CalcNeutralMasses(U,mH0sq)) return (false);
98
99 LRSMM.getObj().updateLeftRightSymmetricModelParameters();
100
101 return (true);
102}
103
104void LeftRightSymmetricModel::setParameter(const std::string name, const double& value)
105{
106
107 if (name.compare("mH1p_2") == 0) {
108 if (mH1p_2 >= 0.) mH1p_2 = value;
109 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, mH1p_2 < 0!");
110 } else if (name.compare("mH2p_2") == 0) {
111 if (mH2p_2 >= 0.) mH2p_2 = value;
112 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, mH2p_2 < 0!");
113 } else if (name.compare("mdeltappR_2") == 0) {
114 if (mdeltappR_2 >= 0.) mdeltappR_2 = value;
115 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, mdeltappR_2 < 0!");
116 } else if (name.compare("xi_LRSM") == 0) {
117 if (xi_LRSM >= 0. && xi_LRSM < 1.) xi_LRSM = value;
118 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, xi_LRSM < 0!");
119 } else if (name.compare("mWR") == 0) {
120 if (mWR >= 0.) mWR = value;
121 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, mWR < 0!");
122 } else if (name.compare("lambda1_LRSM") == 0)
123 lambda1_LRSM = value;
124 else if (name.compare("lambda2_LRSM") == 0)
125 lambda2_LRSM = value;
126 else if (name.compare("lambda3_LRSM") == 0)
127 lambda3_LRSM = value;
128 else if (name.compare("lambda4_LRSM") == 0)
129 lambda4_LRSM = value;
130 else if (name.compare("rho1_LRSM") == 0)
131 rho1_LRSM = value;
132 else if (name.compare("rho4_LRSM") == 0)
133 rho4_LRSM = value;
134 else if (name.compare("alpha1_LRSM") == 0)
135 alpha1_LRSM = value;
136 else if (name.compare("alpha2_LRSM") == 0)
137 alpha2_LRSM = value;
138 else if (name.compare("alpha_LRSM") == 0)
139 alpha_LRSM = value;
140 else if (name.compare("delta2_LRSM") == 0)
141 delta2_LRSM = value;
142 else if (name.compare("thetaR12_LRSM") == 0)
143 thetaR12_LRSM = value;
144 else if (name.compare("thetaR13_LRSM") == 0)
145 thetaR13_LRSM = value;
146 else if (name.compare("thetaR23_LRSM") == 0)
147 thetaR23_LRSM = value;
148 else if (name.compare("phiR1_LRSM") == 0)
149 phiR1_LRSM = value;
150 else if (name.compare("phiR2_LRSM") == 0)
151 phiR2_LRSM = value;
152 else if (name.compare("phiR3_LRSM") == 0)
153 phiR3_LRSM = value;
154 else if (name.compare("phiR4_LRSM") == 0)
155 phiR4_LRSM = value;
156 else if (name.compare("phiR5_LRSM") == 0)
157 phiR5_LRSM = value;
158 else if (name.compare("phiR6_LRSM") == 0)
159 phiR6_LRSM = value;
160 else if (name.compare("Q_LRSM") == 0) {
161 if (Q_LRSM >= 0.) Q_LRSM = value;
162 else throw std::runtime_error("error in LeftRightSymmetricModel::SetParameter, Q_LRSM < 0!");
163 } else
165}
166
167bool LeftRightSymmetricModel::CheckParameters(const std::map<std::string, double>& DPars)
168{
169 for (int i = 0; i < NLeftRightSymmetricModelvars; i++) {
170 if (DPars.find(LeftRightSymmetricModelvars[i]) == DPars.end()) {
171 std::cout << "missing mandatory GeneralTHDM parameter " << LeftRightSymmetricModelvars[i] << std::endl;
174 }
175 }
177}
178
179/*----------------------------------------------------------------------------*/
180/* Flags */
181
182bool LeftRightSymmetricModel::setFlagStr(const std::string name, const std::string value)
183{
184 bool res = false;
185// if (name.compare("modelTypeflag") == 0) {
186// if (checkmodelType(value)) {
187// flag_model = value;
188// res = true;
189// } else {
190// throw std::runtime_error("LeftRightSymmetricModel::setFlagStr(): Invalid flag "
191// + name + "=" + value);
192// }
193// } else {
194 res = StandardModel::setFlagStr(name, value);
195// }
196
197 return (res);
198}
199
200bool LeftRightSymmetricModel::setFlag(const std::string name, const bool value)
201{
202 bool res = false;
203 if (name.compare("CPviolation") == 0) {
204 flag_CPV = value;
205 res = true;
206 } else
207 res = StandardModel::setFlag(name, value);
208
209 return (res);
210}
std::map< std::string, double > DPars
Definition: Minimal.cpp:11
bool CalcNeutralMasses(gslpp::matrix< gslpp::complex > &U_i, double mH0sq[5])
Computes the exact neutral spectrum at tree level.
bool CalcNeutralMasses_app(double mH0sq_app[4])
Computes the approximate neutral spectrum at tree level.
~LeftRightSymmetricModel()
LeftRightSymmetricModel destructor.
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
virtual bool Init(const std::map< std::string, double > &DPars)
virtual bool Update(const std::map< std::string, double > &DPars)
Matching< LeftRightSymmetricModelMatching, LeftRightSymmetricModel > LRSMM
An object of type Matching.
static const int NLeftRightSymmetricModelvars
virtual bool setFlag(const std::string, const bool)
gslpp::matrix< gslpp::complex > U
static const std::string LeftRightSymmetricModelvars[NLeftRightSymmetricModelvars]
virtual bool setFlagStr(const std::string name, const std::string value)
virtual void setParameter(const std::string, const double &)
LeftRightSymmetricModel()
LeftRightSymmetricModel constructor.
void addMissingModelParameter(const std::string &missingParameterName)
Definition: Model.h:250
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:280
void setModelInitialized(bool ModelInitialized)
A set method to fix the failure or success of the initialization of the model.
Definition: Model.h:145
std::string name
The name of the model.
Definition: Model.h:285
bool UpdateError
A boolean set to false if update is successful.
Definition: Model.h:272
void raiseMissingModelParameterCount()
Definition: Model.h:260
A model class for the Standard Model.
virtual bool PreUpdate()
The pre-update method for StandardModel.
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for StandardModel have been provided in model initi...
virtual bool Init(const std::map< std::string, double > &DPars)
A method to initialize the model parameters.
virtual bool setFlagStr(const std::string name, const std::string value)
A method to set a flag of StandardModel.
Matching< StandardModelMatching, StandardModel > SMM
An object of type Matching.
virtual bool setFlag(const std::string name, const bool value)
A method to set a flag of StandardModel.
virtual bool PostUpdate()
The post-update method for StandardModel.
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of StandardModel.
virtual bool InitializeModel()
A method to initialize the model.
A class for the matching in the Standard Model.