a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
Meson.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2012 HEPfit Collaboration
3 *
4 *
5 * For the licensing terms see doc/COPYING.
6 */
7
8#include "Meson.h"
9#include "std_make_vector.h"
10
11Meson::Meson(double mass, double lifetime = 5.e29, double decayconst = 0.,
12 double lambdaM = 0., double gegenalpha1 = 0., double gegenalpha2 = 0.)
13{
14 this->mass = mass;
15 this->lifetime = lifetime;
16 this->decayconst = decayconst;
17 this->lambdaM = lambdaM;
18 gegenalpha[0] = gegenalpha1;
19 gegenalpha[1] = gegenalpha2;
20}
21
23{
24 mass = 0.;
25 lifetime = 5.e29;
26 decayconst = 0.;
27 lambdaM = 0.;
28 gegenalpha[0] = 0.;
29 gegenalpha[1] = 0.;
30 name = "";
31}
32
34{}
35
36void Meson::ModelParameterMapInsert(std::map< std::string, std::reference_wrapper<const double> >& ModelParamMap)
37{
38 if (name.compare("P_0") == 0) {
39 ModelParamMap.insert(std::make_pair("MP0", std::cref(mass)));
40 ModelParamMap.insert(std::make_pair("tP0", std::cref(lifetime)));
41 ModelParamMap.insert(std::make_pair("FP0", std::cref(decayconst)));
42 return;
43 }
44 if (name.compare("P_P") == 0) {
45 ModelParamMap.insert(std::make_pair("MPp", std::cref(mass)));
46 ModelParamMap.insert(std::make_pair("tPp", std::cref(lifetime)));
47 ModelParamMap.insert(std::make_pair("FPp", std::cref(decayconst)));
48 return;
49 }
50 if (name.compare("K_0") == 0) {
51 ModelParamMap.insert(std::make_pair("MK0", std::cref(mass)));
52 ModelParamMap.insert(std::make_pair("tKl", std::cref(lifetime)));
53 ModelParamMap.insert(std::make_pair("FK", std::cref(decayconst)));
54 return;
55 }
56 if (name.compare("K_S") == 0) {
57 ModelParamMap.insert(std::make_pair("MK0", std::cref(mass)));
58 ModelParamMap.insert(std::make_pair("tKs", std::cref(lifetime)));
59 ModelParamMap.insert(std::make_pair("FK", std::cref(decayconst)));
60 return;
61 }
62 if (name.compare("K_P") == 0) {
63 ModelParamMap.insert(std::make_pair("MKp", std::cref(mass)));
64 ModelParamMap.insert(std::make_pair("tKp", std::cref(lifetime)));
65 ModelParamMap.insert(std::make_pair("FK", std::cref(decayconst)));
66 ModelParamMap.insert(std::make_pair("alpha1kp", std::cref(gegenalpha[0])));
67 ModelParamMap.insert(std::make_pair("alpha2kp", std::cref(gegenalpha[1])));
68 return;
69 }
70 if (name.compare("D_0") == 0) {
71 ModelParamMap.insert(std::make_pair("MD0", std::cref(mass)));
72 ModelParamMap.insert(std::make_pair("tD0", std::cref(lifetime)));
73 ModelParamMap.insert(std::make_pair("FD", std::cref(decayconst)));
74 return;
75 }
76 if (name.compare("D_P") == 0) {
77 ModelParamMap.insert(std::make_pair("MDP", std::cref(mass)));
78 ModelParamMap.insert(std::make_pair("tDP", std::cref(lifetime)));
79 ModelParamMap.insert(std::make_pair("FDP", std::cref(decayconst)));
80 return;
81 }
82 if (name.compare("D_S") == 0) {
83 ModelParamMap.insert(std::make_pair("MDs", std::cref(mass)));
84 ModelParamMap.insert(std::make_pair("tDs", std::cref(lifetime)));
85 ModelParamMap.insert(std::make_pair("FDs", std::cref(decayconst)));
86 return;
87 }
88 if (name.compare("B_D") == 0) {
89 ModelParamMap.insert(std::make_pair("MBd", std::cref(mass)));
90 ModelParamMap.insert(std::make_pair("tBd", std::cref(lifetime)));
91 ModelParamMap.insert(std::make_pair("FBd", std::cref(decayconst)));
92 ModelParamMap.insert(std::make_pair("FBsoFBd", std::cref(FBsoFBd)));
93 ModelParamMap.insert(std::make_pair("lambdaB", std::cref(lambdaM)));
94 return;
95 }
96 if (name.compare("B_P") == 0) {
97 ModelParamMap.insert(std::make_pair("MBp", std::cref(mass)));
98 ModelParamMap.insert(std::make_pair("tBp", std::cref(lifetime)));
99 ModelParamMap.insert(std::make_pair("FBp", std::cref(decayconst)));
100 ModelParamMap.insert(std::make_pair("FBsoFBd", std::cref(FBsoFBd)));
101 ModelParamMap.insert(std::make_pair("lambdaB", std::cref(lambdaM)));
102 return;
103 }
104 if (name.compare("B_S") == 0) {
105 ModelParamMap.insert(std::make_pair("MBs", std::cref(mass)));
106 ModelParamMap.insert(std::make_pair("tBs", std::cref(lifetime)));
107 ModelParamMap.insert(std::make_pair("FBs", std::cref(decayconst)));
108 ModelParamMap.insert(std::make_pair("lambdaB", std::cref(lambdaM)));
109 ModelParamMap.insert(std::make_pair("DGs_Gs", std::cref(Dgamma_gamma)));
110 return;
111 }
112 if (name.compare("B_C") == 0) {
113 ModelParamMap.insert(std::make_pair("MBc", std::cref(mass)));
114 ModelParamMap.insert(std::make_pair("tBc", std::cref(lifetime)));
115 ModelParamMap.insert(std::make_pair("FBc", std::cref(decayconst)));
116 return;
117 }
118 if (name.compare("PHI") == 0) {
119 ModelParamMap.insert(std::make_pair("Mphi", std::cref(mass)));
120 ModelParamMap.insert(std::make_pair("tphi", std::cref(lifetime)));
121 ModelParamMap.insert(std::make_pair("Fphi", std::cref(decayconst)));
122 ModelParamMap.insert(std::make_pair("Fphip", std::cref(decayconst_p)));
123 ModelParamMap.insert(std::make_pair("alpha2phi", std::cref(gegenalpha[1])));
124 return;
125 }
126 if (name.compare("K_star") == 0) {
127 ModelParamMap.insert(std::make_pair("MKstar", std::cref(mass)));
128 ModelParamMap.insert(std::make_pair("tKstar", std::cref(lifetime)));
129 ModelParamMap.insert(std::make_pair("FKstar", std::cref(decayconst)));
130 ModelParamMap.insert(std::make_pair("FKstarp", std::cref(decayconst_p)));
131 ModelParamMap.insert(std::make_pair("alpha1kst", std::cref(gegenalpha[0])));
132 ModelParamMap.insert(std::make_pair("alpha2kst", std::cref(gegenalpha[1])));
133 return;
134 }
135 if (name.compare("K_star_P") == 0) {
136 ModelParamMap.insert(std::make_pair("MKstarP", std::cref(mass)));
137 ModelParamMap.insert(std::make_pair("tKstarP", std::cref(lifetime)));
138 ModelParamMap.insert(std::make_pair("FKstar", std::cref(decayconst)));
139 ModelParamMap.insert(std::make_pair("FKstarp", std::cref(decayconst_p)));
140 ModelParamMap.insert(std::make_pair("alpha1kst", std::cref(gegenalpha[0])));
141 ModelParamMap.insert(std::make_pair("alpha2kst", std::cref(gegenalpha[1])));
142 return;
143 }
144 if (name.compare("D_star_P") == 0) {
145 ModelParamMap.insert(std::make_pair("MDstarP", std::cref(mass)));
146 ModelParamMap.insert(std::make_pair("tDstarP", std::cref(lifetime)));
147 ModelParamMap.insert(std::make_pair("FDstarP", std::cref(decayconst)));
148 return;
149 }
150 if (name.compare("RHO") == 0) {
151 ModelParamMap.insert(std::make_pair("Mrho", std::cref(mass)));
152 ModelParamMap.insert(std::make_pair("trho", std::cref(lifetime)));
153 ModelParamMap.insert(std::make_pair("Frho", std::cref(decayconst)));
154 return;
155 }
156 if (name.compare("RHO_P") == 0) {
157 ModelParamMap.insert(std::make_pair("MrhoP", std::cref(mass)));
158 ModelParamMap.insert(std::make_pair("trho", std::cref(lifetime)));
159 ModelParamMap.insert(std::make_pair("Frho", std::cref(decayconst)));
160 return;
161 }
162 if (name.compare("OMEGA") == 0) {
163 ModelParamMap.insert(std::make_pair("Momega", std::cref(mass)));
164 ModelParamMap.insert(std::make_pair("tomega", std::cref(lifetime)));
165 ModelParamMap.insert(std::make_pair("Fomega", std::cref(decayconst)));
166 return;
167 } else throw std::runtime_error(name + " is not implemented in Meson class");
168}
169
170std::vector<std::string> Meson::parameterList(std::string name_i)
171{
172 if (name_i.compare("P_0") == 0) return make_vector<std::string>() << "MP0" << "tP0" << "FP0";
173 if (name_i.compare("P_P") == 0) return make_vector<std::string>() << "MPp" << "tPp" << "FPp";
174 if (name_i.compare("K_0") == 0) return make_vector<std::string>() << "MK0" << "tKl" << "FK";
175 if (name_i.compare("K_P") == 0) return make_vector<std::string>() << "MKp" << "tKp" << "FK" << "alpha1kp" << "alpha2kp";
176 if (name_i.compare("K_S") == 0) return make_vector<std::string>() << "MK0" << "tKs" << "FK";
177 if (name_i.compare("D_0") == 0) return make_vector<std::string>() << "MD" << "tD" << "FD";
178 if (name_i.compare("D_P") == 0) return make_vector<std::string>() << "MDP" << "tDP" << "FDP";
179 if (name_i.compare("D_S") == 0) return make_vector<std::string>() << "MDs" << "tDs" << "FDs";
180 if (name_i.compare("B_D") == 0) return make_vector<std::string>() << "MBd" << "tBd" << "FBsoFBd" << "lambdaB";
181 if (name_i.compare("B_P") == 0) return make_vector<std::string>() << "MBp" << "tBp" << "FBsoFBd" << "lambdaB";
182 if (name_i.compare("B_S") == 0) return make_vector<std::string>() << "MBs" << "tBs" << "FBs" << "lambdaB" << "DGs_Gs";
183 if (name_i.compare("B_C") == 0) return make_vector<std::string>() << "MBc" << "tBc" << "FBc";
184 if (name_i.compare("PHI") == 0) return make_vector<std::string>() << "Mphi" << "tphi" << "Fphi" << "Fphip" << "alpha2phi";
185 if (name_i.compare("K_star") == 0) return make_vector<std::string>() << "MKstar" << "tKstar" << "FKstar" << "FKstarp" << "alpha1kst" << "alpha2kst";
186 if (name_i.compare("K_star_P") == 0) return make_vector<std::string>() << "MKstarP" << "tKstar" << "FKstar" << "FKstarp" << "alpha1kst" << "alpha2kst";
187 if (name_i.compare("D_star_P") == 0) return make_vector<std::string>() << "MDstarP" << "tDstarP" << "FDstarP";
188 if (name_i.compare("RHO") == 0) return make_vector<std::string>() << "Mrho" << "trho" << "Frho";
189 if (name_i.compare("RHO_P") == 0) return make_vector<std::string>() << "MrhoP" << "trho" << "Frho";
190 if (name_i.compare("OMEGA") == 0) return make_vector<std::string>() << "Momega" << "tomega" << "Fomega";
191 else throw std::runtime_error(name_i + " is not implemented in Meson class");
192}
193
194bool Meson::setParameter(std::string name_i, double value)
195{
196 if (name.compare("P_0") == 0) {
197 if (name_i.compare("MP0") == 0) {
198 mass = value;
199 return true;
200 }
201 if (name_i.compare("tP0") == 0) {
202 lifetime = value;
203 return true;
204 }
205 if (name_i.compare("FP0") == 0) {
206 decayconst = value;
207 return true;
208 }
209 }
210 if (name.compare("P_P") == 0) {
211 if (name_i.compare("MPp") == 0) {
212 mass = value;
213 return true;
214 }
215 if (name_i.compare("tPp") == 0) {
216 lifetime = value;
217 return true;
218 }
219 if (name_i.compare("FPp") == 0) {
220 decayconst = value;
221 return true;
222 }
223 }
224 if (name.compare("K_0") == 0) {
225 if (name_i.compare("MK0") == 0) {
226 mass = value;
227 return true;
228 }
229 if (name_i.compare("tKl") == 0) {
230 lifetime = value;
231 return true;
232 }
233 if (name_i.compare("FK") == 0) {
234 decayconst = value;
235 return true;
236 }
237 }
238 if (name.compare("K_S") == 0) {
239 if (name_i.compare("MK0") == 0) {
240 mass = value;
241 return true;
242 }
243 if (name_i.compare("tKs") == 0) {
244 lifetime = value;
245 return true;
246 }
247 if (name_i.compare("FK") == 0) {
248 decayconst = value;
249 return true;
250 }
251 }
252 if (name.compare("K_P") == 0) {
253 if (name_i.compare("MKp") == 0) {
254 mass = value;
255 return true;
256 }
257 if (name_i.compare("tKp") == 0) {
258 lifetime = value;
259 return true;
260 }
261 if (name_i.compare("FK") == 0) {
262 decayconst = value;
263 return true;
264 }
265 if (name_i.compare("alpha1kp") == 0) {
266 gegenalpha[0] = value;
267 return true;
268 }
269 if (name_i.compare("alpha2kp") == 0) {
270 gegenalpha[1] = value;
271 return true;
272 }
273 }
274 if (name.compare("D_0") == 0) {
275 if (name_i.compare("MD") == 0) {
276 mass = value;
277 return true;
278 }
279 if (name_i.compare("tD") == 0) {
280 lifetime = value;
281 return true;
282 }
283 if (name_i.compare("FD") == 0) {
284 decayconst = value;
285 return true;
286 }
287 }
288 if (name.compare("D_P") == 0) {
289 if (name_i.compare("MDP") == 0) {
290 mass = value;
291 return true;
292 }
293 if (name_i.compare("tDP") == 0) {
294 lifetime = value;
295 return true;
296 }
297 if (name_i.compare("FDP") == 0) {
298 decayconst = value;
299 return true;
300 }
301 }
302 if (name.compare("D_S") == 0) {
303 if (name_i.compare("MDs") == 0) {
304 mass = value;
305 return true;
306 }
307 if (name_i.compare("tDs") == 0) {
308 lifetime = value;
309 return true;
310 }
311 if (name_i.compare("FDs") == 0) {
312 decayconst = value;
313 return true;
314 }
315 }
316 if (name.compare("B_D") == 0) {
317 if (name_i.compare("MBd") == 0) {
318 mass = value;
319 return true;
320 }
321 if (name_i.compare("tBd") == 0) {
322 lifetime = value;
323 return true;
324 }
325 if (name_i.compare("FBsoFBd") == 0) {
326 FBsoFBd = value;
327 return true;
328 }
329 if (name_i.compare("lambdaB") == 0) {
330 lambdaM = value;
331 return true;
332 }
333 }
334 if (name.compare("B_P") == 0) {
335 if (name_i.compare("MBp") == 0) {
336 mass = value;
337 return true;
338 }
339 if (name_i.compare("tBp") == 0) {
340 lifetime = value;
341 return true;
342 }
343 if (name_i.compare("FBsoFBd") == 0) {
344 FBsoFBd = value;
345 return true;
346 }
347 if (name_i.compare("lambdaB") == 0) {
348 lambdaM = value;
349 return true;
350 }
351 }
352 if (name.compare("B_S") == 0) {
353 if (name_i.compare("MBs") == 0) {
354 mass = value;
355 return true;
356 }
357 if (name_i.compare("tBs") == 0) {
358 lifetime = value;
359 return true;
360 }
361 if (name_i.compare("FBs") == 0) {
362 decayconst = value;
363 return true;
364 }
365 if (name_i.compare("lambdaB") == 0) {
366 lambdaM = value;
367 return true;
368 }
369 if (name_i.compare("DGs_Gs") == 0) {
370 Dgamma_gamma = value;
371 return true;
372 }
373 }
374 if (name.compare("B_C") == 0) {
375 if (name_i.compare("MBc") == 0) {
376 mass = value;
377 return true;
378 }
379 if (name_i.compare("tBc") == 0) {
380 lifetime = value;
381 return true;
382 }
383 if (name_i.compare("FBc") == 0) {
384 decayconst = value;
385 return true;
386 }
387 }
388 if (name.compare("PHI") == 0) {
389 if (name_i.compare("Mphi") == 0) {
390 mass = value;
391 return true;
392 }
393 if (name_i.compare("tphi") == 0) {
394 lifetime = value;
395 return true;
396 }
397 if (name_i.compare("Fphi") == 0) {
398 decayconst = value;
399 return true;
400 }
401 if (name_i.compare("Fphip") == 0) {
402 decayconst_p = value;
403 return true;
404 }
405 if (name_i.compare("alpha2phi") == 0) {
406 gegenalpha[1] = value;
407 return true;
408 }
409 }
410 if (name.compare("K_star") == 0) {
411 if (name_i.compare("MKstar") == 0) {
412 mass = value;
413 return true;
414 }
415 if (name_i.compare("tKstar") == 0) {
416 lifetime = value;
417 return true;
418 }
419 if (name_i.compare("FKstar") == 0) {
420 decayconst = value;
421 return true;
422 }
423 if (name_i.compare("FKstarp") == 0) {
424 decayconst_p = value;
425 return true;
426 }
427 if (name_i.compare("alpha1kst") == 0) {
428 gegenalpha[0] = value;
429 return true;
430 }
431 if (name_i.compare("alpha2kst") == 0) {
432 gegenalpha[1] = value;
433 return true;
434 }
435 }
436 if (name.compare("K_star_P") == 0) {
437 if (name_i.compare("MKstarP") == 0) {
438 mass = value;
439 return true;
440 }
441 if (name_i.compare("tKstar") == 0) {
442 lifetime = value;
443 return true;
444 }
445 if (name_i.compare("FKstar") == 0) {
446 decayconst = value;
447 return true;
448 }
449 if (name_i.compare("FKstarp") == 0) {
450 decayconst_p = value;
451 return true;
452 }
453 if (name_i.compare("alpha1kst") == 0) {
454 gegenalpha[0] = value;
455 return true;
456 }
457 if (name_i.compare("alpha2kst") == 0) {
458 gegenalpha[1] = value;
459 return true;
460 }
461 }
462 if (name.compare("D_star_P") == 0) {
463 if (name_i.compare("MDstarP") == 0) {
464 mass = value;
465 return true;
466 }
467 if (name_i.compare("tDstarP") == 0) {
468 lifetime = value;
469 return true;
470 }
471 if (name_i.compare("FDstarP") == 0) {
472 decayconst = value;
473 return true;
474 }
475 }
476 if (name.compare("RHO") == 0) {
477 if (name_i.compare("Mrho") == 0) {
478 mass = value;
479 return true;
480 }
481 if (name_i.compare("trho") == 0) {
482 lifetime = value;
483 return true;
484 }
485 if (name_i.compare("Frho") == 0) {
486 decayconst = value;
487 return true;
488 }
489 }
490 if (name.compare("RHO_P") == 0) {
491 if (name_i.compare("MrhoP") == 0) {
492 mass = value;
493 return true;
494 }
495 if (name_i.compare("trho") == 0) {
496 lifetime = value;
497 return true;
498 }
499 if (name_i.compare("Frho") == 0) {
500 decayconst = value;
501 return true;
502 }
503 }
504 if (name.compare("OMEGA") == 0) {
505 if (name_i.compare("Momega") == 0) {
506 mass = value;
507 return true;
508 }
509 if (name_i.compare("tomega") == 0) {
510 lifetime = value;
511 return true;
512 }
513 if (name_i.compare("Fomega") == 0) {
514 decayconst = value;
515 return true;
516 }
517 }
518 return false;
519}
520
522{
523 return (HCUT / lifetime);
524}
Meson()
The default constructor.
Definition: Meson.cpp:22
double Dgamma_gamma
Dgamma/gamma for neutral mesons.
Definition: Meson.h:445
virtual ~Meson()
The default destructor.
Definition: Meson.cpp:33
double computeWidth() const
A method to compute the width of the meson from its lifetime.
Definition: Meson.cpp:521
double lambdaM
First moment of LCDA.
Definition: Meson.h:444
double gegenalpha[2]
Gegenbauer moments.
Definition: Meson.h:443
bool setParameter(std::string name_i, double value)
Definition: Meson.cpp:194
std::vector< std::string > parameterList(std::string name_i)
Definition: Meson.cpp:170
void ModelParameterMapInsert(std::map< std::string, std::reference_wrapper< const double > > &ModelParamMap)
Definition: Meson.cpp:36
double decayconst_p
The perpendicular decay constant of a vector meson.
Definition: Meson.h:441
double decayconst
The decay constant of the meson.
Definition: Meson.h:440
double FBsoFBd
Definition: Meson.h:446
double lifetime
The lifetime of the meson.
Definition: Meson.h:442
std::string name
The particle name.
Definition: Particle.h:171
double mass
The particle mass in GeV.
Definition: Particle.h:166