a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
Doxygen/examples-src/myModel/src/myObservables.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 HEPfit Collaboration
3  * All rights reserved.
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #include "myObservables.h"
9 
10 
12 : ThObservable(SM_i), my_model(static_cast<const myModel*> (&SM_i))
13 {
14  fact = 2. * 3000 * pow(0.95, 4.);
15  kfact = 1.85;
16 }
17 
19 {}
20 
22 {
23  c1 = my_model->getc1();
24  if (my_model->get_condition_flag() == true) {
25  c2 = 1. - c1;
26  } else {
27  c2 = my_model->getc2();
28  }
29  c3 = my_model->getc3();
30  c4 = my_model->getc4();
31  sw2 = my_model->sW2();
32 }
33 
34 /*******************************************************************************
35  * Observables *
36  * ****************************************************************************/
37 
38 yield::yield(const StandardModel& SM_i, unsigned int bin_i)
39 : myObservables(SM_i)
40 {
41  bin = bin_i;
42 }
43 
44 double yield::computeThValue()
45 {
47 
48  double wt = kfact * sqrt(fact);
49 
50  if (bin == 1) return (13.0556 + 0.00433972*c4*c4 - 0.595884*c2 - 0.539262*c4*c4*c2 + 0.45963*c2*c2 - 0.844644*c1 - 0.896512*c4*c4*c1 + 1.40761*c2*c1 + 1.10521*c1*c1 - 0.0566324*c3*c3 + 0.00224709*c4*c4*c3*c3 + 0.000814862*c2*c3*c3 + 0.000885144*c1*c3*c3 + 0.252697*pow(c4,4.) + 0.000602038*pow(c3,4.)) * wt;
51 
52  if (bin == 2) return (2.59123 + 0.169824*c4*c4 - 0.113991*c2 - 0.637075*c4*c4*c2 + 0.52955*c2*c2 - 0.184628*c1 - 1.77388*c4*c4*c1 + 1.31494*c2*c1 + 1.45195*c1*c1 + 0.00228014*c3*c3 + 0.00281452*c4*c4*c3*c3 - 0.00121316*c2*c3*c3 + 0.00216552*c1*c3*c3 + 0.68041*pow(c4,4.) + 0.000218874*pow(c3,4.)) * wt;
53 
54  if (bin == 3) return (0.49923 + 0.0605644*c4*c4 - 0.0176069*c2 - 0.160722*c4*c4*c2 + 0.439888*c2*c2 - 0.0183051*c1 - 1.04927*c4*c4*c1 + 0.456769*c2*c1 + 0.695114*c1*c1 + 0.0115523*c3*c3 + 0.00023496*c4*c4*c3*c3 + 0.000200689*c2*c3*c3 + 0.00104028*c1*c3*c3 + 0.48041*pow(c4,4.) - 0.000532762*pow(c3,4.)) * wt;
55 
56  if (bin == 4) return (0.177548 + 0.0262649*c4*c4 - 0.00743058*c2 + 0.0546468*c4*c4*c2 + 0.524296*c2*c2 - 0.00407272*c1 - 0.748231*c4*c4*c1 + 0.14861*c2*c1 + 0.436721*c1*c1 + 0.00637587*c3*c3 + 0.000702175*c4*c4*c3*c3 + 0.0002901*c2*c3*c3 - 0.00040867*c1*c3*c3 + 0.375159*pow(c4,4.) + 5.37945e-6*pow(c3,4.)) * wt;
57 
58  if (bin == 5) return (0.0485093 + 0.00891872*c4*c4 - 0.00324976*c2 + 0.155788*c4*c4*c2 + 0.523622*c2*c2 + 0.00396845*c1 - 0.384512*c4*c4*c1 - 0.0424597*c2*c1 + 0.20254*c1*c1 + 0.00271808*c3*c3 + 0.000118455*c4*c4*c3*c3 + 0.000624283*c2*c3*c3 - 0.000523273*c1*c3*c3 + 0.202822*pow(c4,4.) - 5.43403e-6 *pow(c3,4.)) * wt;
59 
60  if (bin == 6) return (0.0165142 + 0.00240494*c4*c4 - 0.00151538*c2 + 0.443147*c4*c4*c2 + 2.01346*c2*c2 + 0.0066562*c1 - 0.285082*c4*c4*c1 - 0.329009*c2*c1 + 0.139285*c1*c1 + 0.00226039*c3*c3 + 0.000642254*c4*c4*c3*c3 - 0.000373886*c2*c3*c3 - 0.00122827*c1*c3*c3 + 0.154372*pow(c4,4.) - 0.000211814*pow(c3,4.)) * wt;
61  else {
62  std::cout << "Bin not defined" << std::endl;
63  return (EXIT_FAILURE);
64  }
65 }
66 
67 C_3::C_3(const StandardModel& SM_i)
68 : myObservables(SM_i)
69 {}
70 
71 double C_3::computeThValue()
72 {
74 
75  return (1./2. - 4./3.*sw2)/(2. * (sqrt(sw2) * sqrt(1. - sw2))) * c3;
76 }
77 
78 C_4::C_4(const StandardModel& SM_i)
79 : myObservables(SM_i)
80 {}
81 
82 double C_4::computeThValue()
83 {
85 
86  return -1./2./(2. * (sqrt(sw2) * sqrt(1. - sw2))) * c4;
87 }
myObservables::c2
double c2
Definition: Doxygen/examples-src/myModel/src/myObservables.h:29
C_4::C_4
C_4(const StandardModel &SM_i)
Constructor.
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:77
myModel::getc2
double getc2() const
Definition: Doxygen/examples-src/myModel/src/myModel.h:61
C_3::C_3
C_3(const StandardModel &SM_i)
Constructor.
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:66
C_4::computeThValue
double computeThValue()
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:81
myObservables
A class for the gg -> 4l.
Definition: Doxygen/examples-src/myModel/src/myObservables.h:19
myObservables::myObservables
myObservables(const StandardModel &SM_i)
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:11
StandardModel
A model class for the Standard Model.
Definition: StandardModel.h:474
myObservables::~myObservables
virtual ~myObservables()
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:18
StandardModel::sW2
virtual double sW2(const double Mw_i) const
The square of the sine of the weak mixing angle in the on-shell scheme, denoted as .
Definition: StandardModel.cpp:1000
myModel
My own Model.
Definition: Doxygen/examples-src/myModel/src/myModel.h:17
myObservables::sw2
double sw2
Definition: Doxygen/examples-src/myModel/src/myObservables.h:32
myModel::get_condition_flag
bool get_condition_flag() const
Definition: Doxygen/examples-src/myModel/src/myModel.h:88
gslpp::pow
complex pow(const complex &z1, const complex &z2)
Definition: gslpp_complex.cpp:395
gslpp::sqrt
complex sqrt(const complex &z)
Definition: gslpp_complex.cpp:385
myObservables::fact
double fact
Definition: Doxygen/examples-src/myModel/src/myObservables.h:33
myObservables::c3
double c3
Definition: Doxygen/examples-src/myModel/src/myObservables.h:30
myObservables::kfact
double kfact
Definition: Doxygen/examples-src/myModel/src/myObservables.h:34
myObservables::c4
double c4
Definition: Doxygen/examples-src/myModel/src/myObservables.h:31
myModel::getc1
double getc1() const
Definition: Doxygen/examples-src/myModel/src/myModel.h:52
ThObservable
A class for a model prediction of an observable.
Definition: ThObservable.h:25
myObservables::c1
double c1
Definition: Doxygen/examples-src/myModel/src/myObservables.h:28
C_3::computeThValue
double computeThValue()
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:70
myModel::getc4
double getc4() const
Definition: Doxygen/examples-src/myModel/src/myModel.h:79
yield::bin
unsigned int bin
Definition: Doxygen/examples-src/myModel/src/myObservables.h:55
myObservables::updateParameters
void updateParameters()
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:21
myObservables::my_model
const myModel * my_model
Definition: Doxygen/examples-src/myModel/src/myObservables.h:37
myModel::getc3
double getc3() const
Definition: Doxygen/examples-src/myModel/src/myModel.h:70
yield::computeThValue
double computeThValue()
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:43
yield::yield
yield(const StandardModel &SM_i, unsigned int bin_i)
Constructor.
Definition: Doxygen/examples-src/myModel/src/myObservables.cpp:37