a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
FlavourWilsonCoefficient.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 HEPfit Collaboration
3 *
4 *
5 * For the licensing terms see doc/COPYING.
6 */
7
9
10const std::string FlavourWilsonCoefficient::FlavourWilsonCoefficientvars[NFlavourWilsonCoefficientvars] = {"reDC1","reDC2","reDC3","reDC4","reDC5","reDC6","reDC7","reDC8","reDC9","reDC10","reDC7g","reDC8g",
11 "imDC1","imDC2","imDC3","imDC4","imDC5","imDC6","imDC7","imDC8","imDC9","imDC10","imDC7g","imDC8g",
12 "reDC7p","reDC8p","reDC9p","reDC10p","reDC7gp","reDC8gp",
13 "imDC7p","imDC8p","imDC9p","imDC10p","imDC7gp","imDC8gp",
14 "WCscale"};
15
17
18 SMM.setObj((StandardModelMatching&) FWCM.getObj());
19 ModelParamMap.insert(std::make_pair("reDC1", std::cref(reDC1)));
20 ModelParamMap.insert(std::make_pair("reDC2", std::cref(reDC2)));
21 ModelParamMap.insert(std::make_pair("reDC3", std::cref(reDC3)));
22 ModelParamMap.insert(std::make_pair("reDC4", std::cref(reDC4)));
23 ModelParamMap.insert(std::make_pair("reDC5", std::cref(reDC5)));
24 ModelParamMap.insert(std::make_pair("reDC6", std::cref(reDC6)));
25 ModelParamMap.insert(std::make_pair("reDC7", std::cref(reDC7)));
26 ModelParamMap.insert(std::make_pair("reDC8", std::cref(reDC8)));
27 ModelParamMap.insert(std::make_pair("reDC9", std::cref(reDC9)));
28 ModelParamMap.insert(std::make_pair("reDC10", std::cref(reDC10)));
29 ModelParamMap.insert(std::make_pair("reDC7g", std::cref(reDC7g)));
30 ModelParamMap.insert(std::make_pair("reDC8g", std::cref(reDC8g)));
31
32 ModelParamMap.insert(std::make_pair("imDC1", std::cref(imDC1)));
33 ModelParamMap.insert(std::make_pair("imDC2", std::cref(imDC2)));
34 ModelParamMap.insert(std::make_pair("imDC3", std::cref(imDC3)));
35 ModelParamMap.insert(std::make_pair("imDC4", std::cref(imDC4)));
36 ModelParamMap.insert(std::make_pair("imDC5", std::cref(imDC5)));
37 ModelParamMap.insert(std::make_pair("imDC6", std::cref(imDC6)));
38 ModelParamMap.insert(std::make_pair("imDC7", std::cref(imDC7)));
39 ModelParamMap.insert(std::make_pair("imDC8", std::cref(imDC8)));
40 ModelParamMap.insert(std::make_pair("imDC9", std::cref(imDC9)));
41 ModelParamMap.insert(std::make_pair("imDC10", std::cref(imDC10)));
42 ModelParamMap.insert(std::make_pair("imDC7g", std::cref(imDC7g)));
43 ModelParamMap.insert(std::make_pair("imDC8g", std::cref(imDC8g)));
44
45 ModelParamMap.insert(std::make_pair("reDC7p", std::cref(reDC7p)));
46 ModelParamMap.insert(std::make_pair("reDC8p", std::cref(reDC8p)));
47 ModelParamMap.insert(std::make_pair("reDC9p", std::cref(reDC9p)));
48 ModelParamMap.insert(std::make_pair("reDC10p", std::cref(reDC10p)));
49 ModelParamMap.insert(std::make_pair("reDC7gp", std::cref(reDC7gp)));
50 ModelParamMap.insert(std::make_pair("reDC8gp", std::cref(reDC8gp)));
51
52 ModelParamMap.insert(std::make_pair("imDC7p", std::cref(imDC7p)));
53 ModelParamMap.insert(std::make_pair("imDC8p", std::cref(imDC8p)));
54 ModelParamMap.insert(std::make_pair("imDC9p", std::cref(imDC9p)));
55 ModelParamMap.insert(std::make_pair("imDC10p", std::cref(imDC10p)));
56 ModelParamMap.insert(std::make_pair("imDC7gp", std::cref(imDC7gp)));
57 ModelParamMap.insert(std::make_pair("imDC8gp", std::cref(imDC8gp)));
58
59 ModelParamMap.insert(std::make_pair("WCscale", std::cref(WCscale)));
60}
61
63 if (IsModelInitialized()) {
64 }
65}
66
68// Initialization
69
71{
73 return(true);
74}
75
76bool FlavourWilsonCoefficient::Init(const std::map<std::string, double>& DPars) {
78}
79
81{
82 if(!StandardModel::PreUpdate()) return (false);
83
84 return (true);
85}
86
87bool FlavourWilsonCoefficient::Update(const std::map<std::string, double>& DPars) {
88
89 if(!PreUpdate()) return (false);
90
91 UpdateError = false;
92
93 for (std::map<std::string, double>::const_iterator it = DPars.begin(); it != DPars.end(); it++)
94 setParameter(it->first, it->second);
95
96 if (UpdateError) return (false);
97
98 if(!PostUpdate()) return (false);
99
100 return (true);
101}
102
104{
105 if(!StandardModel::PostUpdate()) return (false);
106
107 DC1 = gslpp::complex(reDC1, imDC1, false);
108 DC2 = gslpp::complex(reDC2, imDC2, false);
109 DC3 = gslpp::complex(reDC3, imDC3, false);
110 DC4 = gslpp::complex(reDC4, imDC4, false);
111 DC5 = gslpp::complex(reDC5, imDC5, false);
112 DC6 = gslpp::complex(reDC6, imDC6, false);
113 DC7 = gslpp::complex(reDC7, imDC7, false);
114 DC8 = gslpp::complex(reDC8, imDC8, false);
115 DC9 = gslpp::complex(reDC9, imDC9, false);
116 DC10 = gslpp::complex(reDC10, imDC10, false);
117 DC7g = gslpp::complex(reDC7g, imDC7g, false);
118 DC8g = gslpp::complex(reDC8g, imDC8g, false);
119
120 DC7p = gslpp::complex(reDC7p, imDC7p, false);
121 DC8p = gslpp::complex(reDC8p, imDC8p, false);
122 DC9p = gslpp::complex(reDC9p, imDC9p, false);
123 DC10p = gslpp::complex(reDC10p, imDC10p, false);
124 DC7gp = gslpp::complex(reDC7gp, imDC7gp, false);
125 DC8gp = gslpp::complex(reDC8gp, imDC8gp, false);
126
127 /* Necessary for updating StandardModel parameters in StandardModelMatching,
128 * and FlavourWC and FlavourWC-derived parameters in FlavourWCMatching */
129 FWCM.getObj().updateFlavourWilsonCoefficientParameters();
130
131 return (true);
132}
133
134void FlavourWilsonCoefficient::setParameter(const std::string name, const double& value){
135 if(name.compare("reDC1") == 0)
136 reDC1 = value;
137 else if(name.compare("reDC2") == 0)
138 reDC2 = value;
139 else if(name.compare("reDC3") == 0)
140 reDC3 = value;
141 else if(name.compare("reDC4") == 0)
142 reDC4 = value;
143 else if(name.compare("reDC5") == 0)
144 reDC5 = value;
145 else if(name.compare("reDC6") == 0)
146 reDC6 = value;
147 else if(name.compare("reDC7") == 0)
148 reDC7 = value;
149 else if(name.compare("reDC8") == 0)
150 reDC8 = value;
151 else if(name.compare("reDC9") == 0)
152 reDC9 = value;
153 else if(name.compare("reDC10") == 0)
154 reDC10 = value;
155 else if(name.compare("reDC7g") == 0)
156 reDC7g = value;
157 else if(name.compare("reDC8g") == 0)
158 reDC8g = value;
159 else if(name.compare("imDC1") == 0)
160 imDC1 = value;
161 else if(name.compare("imDC2") == 0)
162 imDC2 = value;
163 else if(name.compare("imDC3") == 0)
164 imDC3 = value;
165 else if(name.compare("imDC4") == 0)
166 imDC4 = value;
167 else if(name.compare("imDC5") == 0)
168 imDC5 = value;
169 else if(name.compare("imDC6") == 0)
170 imDC6 = value;
171 else if(name.compare("imDC7") == 0)
172 imDC7 = value;
173 else if(name.compare("imDC8") == 0)
174 imDC8 = value;
175 else if(name.compare("imDC9") == 0)
176 imDC9 = value;
177 else if(name.compare("imDC10") == 0)
178 imDC10 = value;
179 else if(name.compare("imDC7g") == 0)
180 imDC7g = value;
181 else if(name.compare("imDC8g") == 0)
182 imDC8g = value;
183 else if(name.compare("reDC7p") == 0)
184 reDC7p = value;
185 else if(name.compare("reDC8p") == 0)
186 reDC8p = value;
187 else if(name.compare("reDC9p") == 0)
188 reDC9p = value;
189 else if(name.compare("reDC10p") == 0)
190 reDC10p = value;
191 else if(name.compare("reDC7gp") == 0)
192 reDC7gp = value;
193 else if(name.compare("reDC8gp") == 0)
194 reDC8gp = value;
195 else if(name.compare("imDC7p") == 0)
196 imDC7p = value;
197 else if(name.compare("imDC8p") == 0)
198 imDC8p = value;
199 else if(name.compare("imDC9p") == 0)
200 imDC9p = value;
201 else if(name.compare("imDC10p") == 0)
202 imDC10p = value;
203 else if(name.compare("imDC7gp") == 0)
204 imDC7gp = value;
205 else if(name.compare("imDC8gp") == 0)
206 imDC8gp = value;
207 else if(name.compare("WCscale") == 0)
208 WCscale = value;
209 else
211}
212
213bool FlavourWilsonCoefficient::CheckParameters(const std::map<std::string, double>& DPars) {
214 for (int i = 0; i < NFlavourWilsonCoefficientvars; i++) {
215 if (DPars.find(FlavourWilsonCoefficientvars[i]) == DPars.end()) {
216 std::cout << "ERROR: missing mandatory FlavourWilsonCoefficient parameter " << FlavourWilsonCoefficientvars[i] << std::endl;
219 }
220 }
222}
223
225// Flags
226
227bool FlavourWilsonCoefficient::setFlag(const std::string name, const bool value)
228{
229 bool res = false;
230
231 res = StandardModel::setFlag(name,value);
232
233 return(res);
234}
std::map< std::string, double > DPars
Definition: Minimal.cpp:11
static const std::string FlavourWilsonCoefficientvars[NFlavourWilsonCoefficientvars]
virtual bool PostUpdate()
The post-update method for FlavourWilsonCoefficient.
FlavourWilsonCoefficient()
FlavourWilsonCoefficient constructor
double reDC8g
The real parts of the Wilson Coefficients.
double imDC8gp
The imaginary parts of the Wilson Coefficients.
double imDC8g
The imaginary parts of the Wilson Coefficients.
double WCscale
The scale of the Wilson Coefficients.
~FlavourWilsonCoefficient()
FlavourWilsonCoefficient destructor
virtual bool InitializeModel()
A method to initialize the model.
virtual bool PreUpdate()
The pre-update method for FlavourWilsonCoefficient.
virtual void setParameter(const std::string, const double &)
A method to set the value of a parameter of FlavourWilsonCoefficient.
virtual bool Init(const std::map< std::string, double > &DPars)
Initializes the FlavourWilsonCoefficient parameters found in the argument.
double reDC8gp
The real parts of the Wilson Coefficients.
virtual bool Update(const std::map< std::string, double > &DPars)
The update method for FlavourWilsonCoefficient.
virtual bool setFlag(const std::string name, const bool value)
A method to set a flag of FlavourWilsonCoefficient.
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for FlavourWilsonCoefficient have been provided in ...
gslpp::complex DC8g
The complex Wilson Coefficients.
gslpp::complex DC8gp
The complex Wilson Coefficients.
Matching< FlavourWilsonCoefficientMatching, FlavourWilsonCoefficient > FWCM
The FlavourWilsonCoefficientMatching object.
static const int NFlavourWilsonCoefficientvars
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
bool IsModelInitialized() const
A method to check if the model is initialized.
Definition: Model.h:136
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.
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.