MINT2
Model_independent.h
Go to the documentation of this file.
1 #ifndef MODEL_INDEPENDENT_LINESHAPE_HH
2 #define MODEL_INDEPENDENT_LINESHAPE_HH
3 // author: Philippe d'Argent (p.dargent@cern.ch)
4 // status: 30.10.2015
5 
6 #include <complex>
7 #include <string>
8 
9 #include "Mint/ILineshape.h"
10 #include "Mint/BW_BW.h"
11 #include "Mint/NamedParameter.h"
14 #include "Mint/FitParDependent.h"
16 #include "Math/Interpolator.h"
17 #include "Math/InterpolationTypes.h"
18 
19 using namespace MINT;
20 
21 class Model_independent : public BW_BW, virtual public ILineshape{
22  public:
23 
24  Model_independent( const AssociatedDecayTree& tree, const std::string& namePrefix="");
25 
26  virtual std::string name() const{
27  return "Model_independent("+_theDecay.oneLiner() +")";
28  }
29 
30  virtual ~Model_independent(){
31  plot();
32  delete _interpolator_Re;
33  delete _interpolator_Im;
34  }
35  virtual std::complex<double> getVal(IDalitzEvent& evt);
36  std::complex<double> getInterpolatedVal(const double s_inGeV2);
37  void plot();
38 
39  protected:
40 
41  int _nBins;
43  std::vector<double> _binCenterVector;
44 
45  std::vector<double> getBinCenterValues_Re();
46  std::vector<double> getBinCenterValues_Im();
47 
49  ROOT::Math::Interpolation::Type _interpolationType;
50 
51  ROOT::Math::Interpolator* _interpolator_Re;
52  ROOT::Math::Interpolator* _interpolator_Im;
53 
54  double Re_Bin(int i) const{
55  if(i==0)return mumsFittableProperties().fitModel_independent_Bin_1_Re();
56  if(i==1)return mumsFittableProperties().fitModel_independent_Bin_2_Re();
57  if(i==2)return mumsFittableProperties().fitModel_independent_Bin_3_Re();
58  if(i==3)return mumsFittableProperties().fitModel_independent_Bin_4_Re();
59  if(i==4)return mumsFittableProperties().fitModel_independent_Bin_5_Re();
60  if(i==5)return mumsFittableProperties().fitModel_independent_Bin_6_Re();
61  if(i==6)return mumsFittableProperties().fitModel_independent_Bin_7_Re();
62  if(i==7)return mumsFittableProperties().fitModel_independent_Bin_8_Re();
63  if(i==8)return mumsFittableProperties().fitModel_independent_Bin_9_Re();
64  if(i==9)return mumsFittableProperties().fitModel_independent_Bin_10_Re();
65  else return 0.;
66  }
67 
68  double Im_Bin(int i) const{
69  if(i==0)return mumsFittableProperties().fitModel_independent_Bin_1_Im();
70  if(i==1)return mumsFittableProperties().fitModel_independent_Bin_2_Im();
71  if(i==2)return mumsFittableProperties().fitModel_independent_Bin_3_Im();
72  if(i==3)return mumsFittableProperties().fitModel_independent_Bin_4_Im();
73  if(i==4)return mumsFittableProperties().fitModel_independent_Bin_5_Im();
74  if(i==5)return mumsFittableProperties().fitModel_independent_Bin_6_Im();
75  if(i==6)return mumsFittableProperties().fitModel_independent_Bin_7_Im();
76  if(i==7)return mumsFittableProperties().fitModel_independent_Bin_8_Im();
77  if(i==8)return mumsFittableProperties().fitModel_independent_Bin_9_Im();
78  if(i==9)return mumsFittableProperties().fitModel_independent_Bin_10_Im();
79  else return 0.;
80  }
81 
82  double Bin_1_Re() const{
83  return mumsFittableProperties().fitModel_independent_Bin_1_Re();
84  }
85  double Bin_1_Im() const{
86  return mumsFittableProperties().fitModel_independent_Bin_1_Im();
87  }
88  double Bin_2_Re() const{
89  return mumsFittableProperties().fitModel_independent_Bin_2_Re();
90  }
91  double Bin_2_Im() const{
92  return mumsFittableProperties().fitModel_independent_Bin_2_Im();
93  }
94  double Bin_3_Re() const{
95  return mumsFittableProperties().fitModel_independent_Bin_3_Re();
96  }
97  double Bin_3_Im() const{
98  return mumsFittableProperties().fitModel_independent_Bin_3_Im();
99  }
100  double Bin_4_Re() const{
101  return mumsFittableProperties().fitModel_independent_Bin_4_Re();
102  }
103  double Bin_4_Im() const{
104  return mumsFittableProperties().fitModel_independent_Bin_4_Im();
105  }
106  double Bin_5_Re() const{
107  return mumsFittableProperties().fitModel_independent_Bin_5_Re();
108  }
109  double Bin_5_Im() const{
110  return mumsFittableProperties().fitModel_independent_Bin_5_Im();
111  }
112  double Bin_6_Re() const{
113  return mumsFittableProperties().fitModel_independent_Bin_6_Re();
114  }
115  double Bin_6_Im() const{
116  return mumsFittableProperties().fitModel_independent_Bin_6_Im();
117  }
118  double Bin_7_Re() const{
119  return mumsFittableProperties().fitModel_independent_Bin_7_Re();
120  }
121  double Bin_7_Im() const{
122  return mumsFittableProperties().fitModel_independent_Bin_7_Im();
123  }
124  double Bin_8_Re() const{
125  return mumsFittableProperties().fitModel_independent_Bin_8_Re();
126  }
127  double Bin_8_Im() const{
128  return mumsFittableProperties().fitModel_independent_Bin_8_Im();
129  }
130  double Bin_9_Re() const{
131  return mumsFittableProperties().fitModel_independent_Bin_9_Re();
132  }
133  double Bin_9_Im() const{
134  return mumsFittableProperties().fitModel_independent_Bin_9_Im();
135  }
136  double Bin_10_Re() const{
137  return mumsFittableProperties().fitModel_independent_Bin_10_Re();
138  }
139  double Bin_10_Im() const{
140  return mumsFittableProperties().fitModel_independent_Bin_10_Im();
141  }
142 
143 };
144 
145 #endif
146 //
double Bin_3_Im() const
double Bin_9_Im() const
NamedParameter< std::string > _interpolationTypeString
double Bin_7_Im() const
ROOT::Math::Interpolator * _interpolator_Re
double Bin_4_Re() const
double Bin_10_Re() const
double Bin_6_Re() const
Definition: BW_BW.h:30
double Re_Bin(int i) const
std::vector< double > _binCenterVector
double Bin_10_Im() const
double Bin_1_Im() const
double Bin_8_Re() const
double Bin_5_Im() const
double Bin_7_Re() const
NamedParameter< double > _binCenters
double Bin_2_Im() const
ROOT::Math::Interpolator * _interpolator_Im
double Bin_1_Re() const
virtual ~Model_independent()
virtual std::string name() const
double Bin_9_Re() const
double Bin_2_Re() const
double Im_Bin(int i) const
double Bin_5_Re() const
double Bin_6_Im() const
ROOT::Math::Interpolation::Type _interpolationType
double Bin_3_Re() const
double Bin_8_Im() const
double Bin_4_Im() const