MINT2
ResonanceProperties.cpp
Go to the documentation of this file.
1 // author: Philippe d'Argent (p.dargent@cern.ch)
5 #include "Mint/NamedParameter.h"
6 #include "Mint/Utils.h"
7 #include "Mint/FitParameter.h"
10 
11 #include <cstdio>
12 #include <cstring>
13 #include <algorithm>
14 
15 using namespace std;
16 using namespace MINT;
17 
18 std::string ResonanceProperties::nameFromPid(int pdg_id){
19  bool dbThis = false;
21  const ParticleProperties* pp = PPL->get(pdg_id);
22  if(0 == pp){
23  cout << "ResonanceProperties::nameFromPid error!" << endl;
24  cout << "Can't find ParticleProperties for pdg_id = " << pdg_id << endl;
25  return "fuck!";
26  }
27  if(dbThis){
28  cout << "got name from PID: " << endl;
29  cout << PPL->get(pdg_id)->name() << endl;
30  }
31  return PPL->get(pdg_id)->name();
32 }
33 
34 int ResonanceProperties::pidFromName(const std::string& name){
36  const ParticleProperties* pp = PPL->get(name);
37  if(0 == pp){
38  cout << "ResonanceProperties::nameFromPid error!" << endl;
39  cout << "Can't find ParticleProperties for name = " << name << endl;
40  throw "ResonanceProperties::pidFromName: cannot find name";
41  }
42  return pp->pdg_id();
43 }
44 
45 std::string ResonanceProperties::nameFromName(const std::string& name){
46  return nameFromPid(abs(pidFromName(name)));
47 }
48 
49 double ResonanceProperties::massInit(int pdg_id){
50  return ParticlePropertiesList::getMe()->get(pdg_id)->mass();
51 }
52 double ResonanceProperties::widthInit(int pdg_id){
53  return ParticlePropertiesList::getMe()->get(pdg_id)->width();
54 }
56  return ParticlePropertiesList::getMe()->get(pdg_id)->radius();
57 }
58 
59 std::string ResonanceProperties::makeFitParName(const std::string& propertyName, int pdg_id) const{
60  /*
61  cout << "ResonanceProperties::makeFitParName "
62  << "making name: "
63  << prefix() + propertyName + nameFromPid(abs(pdg_id))
64  << endl;
65  */
66  return prefix() + propertyName + nameFromPid(abs(pdg_id));
67 }
68 
69 ResonanceProperties::ResonanceProperties(int pdg_id, MinuitParameterSet* mps, const std::string& namePrefix)
70  : _prefix(namePrefix)
71  , _pid(abs(pdg_id))
72  , _fitMass(makeFitParName("mass_", pdg_id), 1, massInit(pdg_id) , 0, 0, 0, mps, NamedParameterBase::QUIET)
73  , _fitWidth(makeFitParName("width_", pdg_id), 1, widthInit(pdg_id) , 0, 0, 0, mps, NamedParameterBase::QUIET)
74  , _fitRadius(makeFitParName("radius_", pdg_id), 1, radiusInit(pdg_id), 0, 0, 0, mps, NamedParameterBase::QUIET)
75  , _fitAlpha(makeFitParName("NonRes::alpha_", pdg_id), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
76  , _fitc1(makeFitParName("NonRes::c1_", pdg_id), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
77  , _fitc2(makeFitParName("NonRes::c2_", pdg_id), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
78  , _fitc3(makeFitParName("NonRes::c3_", pdg_id), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
79  , _fitc4(makeFitParName("NonRes::c4_", pdg_id), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
80  , _fitc5(makeFitParName("NonRes::c5_", pdg_id), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
81  , _fitFermiLambda(makeFitParName("FermiPS::lambda_", pdg_id), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
82  , _fitFermiS0(makeFitParName("FermiPS::s0_", pdg_id), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
83  , _fitRhoOmegaDelta_Re(makeFitParName("RhoOmegaGS::Delta_Re_", pdg_id), 1, 0.00153 , 0, 0, 0, mps, NamedParameterBase::QUIET)
84  , _fitRhoOmegaDelta_Im(makeFitParName("RhoOmegaGS::Delta_Im_", pdg_id ), 1, 0.00034 , 0, 0, 0, mps, NamedParameterBase::QUIET)
85 
86  , _fitFlatte_gPi(makeFitParName("Flatte::gPi_", pdg_id), 1, 0.165*GeV , 0, 0, 0, mps, NamedParameterBase::QUIET)
87  , _fitFlatte_gK_by_gPi(makeFitParName("Flatte::gK_by_gPi_", pdg_id), 1, 4.21 , 0, 0, 0, mps, NamedParameterBase::QUIET)
88 
89  , _fitBugg_M(makeFitParName("Bugg::M_", pdg_id), 1, 0.935 , 0, 0, 0, mps, NamedParameterBase::QUIET)
90  , _fitBugg_b1(makeFitParName("Bugg::b1_", pdg_id), 1, 1.302 , 0, 0, 0, mps, NamedParameterBase::QUIET)
91  , _fitBugg_b2(makeFitParName("Bugg::b2_", pdg_id), 1, 0.340 , 0, 0, 0, mps, NamedParameterBase::QUIET)
92  , _fitBugg_A(makeFitParName("Bugg::A_", pdg_id), 1, 2.426 , 0, 0, 0, mps, NamedParameterBase::QUIET)
93  , _fitBugg_g_4pi(makeFitParName("Bugg::g_4pi_", pdg_id), 1, 0.011 , 0, 0, 0, mps, NamedParameterBase::QUIET)
94  , _fitBugg_g_KK(makeFitParName("Bugg::g_KK_", pdg_id), 1, 0.6 , 0, 0, 0, mps, NamedParameterBase::QUIET)
95  , _fitBugg_g_etaeta(makeFitParName("Bugg::g_etaeta_", pdg_id), 1, 0.2 , 0, 0, 0, mps, NamedParameterBase::QUIET)
96  , _fitBugg_alpha(makeFitParName("Bugg::alpha_", pdg_id), 1, 1.3 , 0, 0, 0, mps, NamedParameterBase::QUIET)
97  , _fitBugg_sA(makeFitParName("Bugg::sA_", pdg_id), 1, 0.41 , 0, 0, 0, mps, NamedParameterBase::QUIET)
98  , _fitBugg_4pi_s0(makeFitParName("Bugg::4pi_s0_", pdg_id), 1, 7.082/2.845 , 0, 0, 0, mps, NamedParameterBase::QUIET)
99  , _fitBugg_4pi_lambda(makeFitParName("Bugg::4pi_lambda_", pdg_id), 1, 2.845 , 0, 0, 0, mps, NamedParameterBase::QUIET)
100 
101  , _fitModel_independent_Bin_1_Re(makeFitParName("MI::", pdg_id)+"_Bin_1_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
102  , _fitModel_independent_Bin_1_Im(makeFitParName("MI::", pdg_id)+"_Bin_1_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
103  , _fitModel_independent_Bin_2_Re(makeFitParName("MI::", pdg_id)+"_Bin_2_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
104  , _fitModel_independent_Bin_2_Im(makeFitParName("MI::", pdg_id)+"_Bin_2_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
105  , _fitModel_independent_Bin_3_Re(makeFitParName("MI::", pdg_id)+"_Bin_3_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
106  , _fitModel_independent_Bin_3_Im(makeFitParName("MI::", pdg_id)+"_Bin_3_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
107  , _fitModel_independent_Bin_4_Re(makeFitParName("MI::", pdg_id)+"_Bin_4_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
108  , _fitModel_independent_Bin_4_Im(makeFitParName("MI::", pdg_id)+"_Bin_4_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
109  , _fitModel_independent_Bin_5_Re(makeFitParName("MI::", pdg_id)+"_Bin_5_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
110  , _fitModel_independent_Bin_5_Im(makeFitParName("MI::", pdg_id)+"_Bin_5_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
111  , _fitModel_independent_Bin_6_Re(makeFitParName("MI::", pdg_id)+"_Bin_6_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
112  , _fitModel_independent_Bin_6_Im(makeFitParName("MI::", pdg_id)+"_Bin_6_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
113  , _fitModel_independent_Bin_7_Re(makeFitParName("MI::", pdg_id)+"_Bin_7_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
114  , _fitModel_independent_Bin_7_Im(makeFitParName("MI::", pdg_id)+"_Bin_7_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
115  , _fitModel_independent_Bin_8_Re(makeFitParName("MI::", pdg_id)+"_Bin_8_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
116  , _fitModel_independent_Bin_8_Im(makeFitParName("MI::", pdg_id)+"_Bin_8_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
117  , _fitModel_independent_Bin_9_Re(makeFitParName("MI::", pdg_id)+"_Bin_9_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
118  , _fitModel_independent_Bin_9_Im(makeFitParName("MI::", pdg_id)+"_Bin_9_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
119  , _fitModel_independent_Bin_10_Re(makeFitParName("MI::", pdg_id)+"_Bin_10_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
120  , _fitModel_independent_Bin_10_Im(makeFitParName("MI::", pdg_id)+"_Bin_10_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
121 
122  , _fitGLASS_a(makeFitParName("GLASS::a_", pdg_id), 1, 0.224 , 0, 0, 0, mps, NamedParameterBase::QUIET)
123  , _fitGLASS_r(makeFitParName("GLASS::r_", pdg_id), 1, -15.01 , 0, 0, 0, mps, NamedParameterBase::QUIET)
124  , _fitGLASS_F(makeFitParName("GLASS::F_", pdg_id), 1, 0.62 , 0, 0, 0, mps, NamedParameterBase::QUIET)
125  , _fitGLASS_phiF(makeFitParName("GLASS::phiF_", pdg_id), 1, -0.1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
126  , _fitGLASS_R(makeFitParName("GLASS::R_", pdg_id), 1, 1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
127  , _fitGLASS_phiR(makeFitParName("GLASS::phiR_", pdg_id), 1, 1.1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
128  , _fitGLASS_alpha1(makeFitParName("GLASS::alpha1_", pdg_id), 1, 0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
129  , _fitGLASS_alpha2(makeFitParName("GLASS::alpha2_", pdg_id), 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
130  , _fitGLASS_alpha3(makeFitParName("GLASS::alpha3_", pdg_id), 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
131 
132 {
133 
134  //fix to PDG value if not explicitly initiallised
135  // const ParticlePropertiesList* PPL = ParticlePropertiesList::getMe();
136  // if(_fitMass.iFixInit() && _fitMass== 0) _fitMass = PPL->mass(pdg_id);
137  // if(_fitWidth.iFixInit() && _fitWidth== 0) _fitWidth = PPL->width(pdg_id);
138  // if(_fitRadius.iFixInit() && _fitRadius== 0) _fitRadius = PPL->get(pdg_id)->radius();
139  //std:: cout << _fitMass << endl;
140  //std:: cout << _fitWidth << endl;
141  }
142 
143 ResonanceProperties::ResonanceProperties(const std::string& name, MinuitParameterSet* mps, const std::string& namePrefix)
144  : _prefix(namePrefix)
145  , _pid(abs(pidFromName(name)))
146  , _fitMass(makeFitParName("mass_", _pid), 1, massInit(_pid) , 0, 0, 0, mps, NamedParameterBase::QUIET)
147  , _fitWidth(makeFitParName("width_", _pid), 1, widthInit(_pid) , 0, 0, 0, mps, NamedParameterBase::QUIET)
148  , _fitRadius(makeFitParName("radius_", _pid), 1, radiusInit(_pid), 0, 0, 0, mps, NamedParameterBase::QUIET)
149  , _fitAlpha(makeFitParName("NonRes::alpha_", _pid), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
150  , _fitc1(makeFitParName("NonRes::c1_", _pid), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
151  , _fitc2(makeFitParName("NonRes::c2_", _pid), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
152  , _fitc3(makeFitParName("NonRes::c3_", _pid), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
153  , _fitc4(makeFitParName("NonRes::c4_", _pid), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
154  , _fitc5(makeFitParName("NonRes::c5_" , _pid), 1, .0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
155  , _fitFermiLambda(makeFitParName("FermiPS::lambda_", _pid), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
156  , _fitFermiS0(makeFitParName("FermiPS::s0_", _pid), 1, 1.0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
157  , _fitRhoOmegaDelta_Re(makeFitParName("RhoOmegaGS::Delta_Re_", _pid), 1, 0.00153 , 0, 0, 0, mps, NamedParameterBase::QUIET)
158  , _fitRhoOmegaDelta_Im(makeFitParName("RhoOmegaGS::Delta_Im_" , _pid), 1, 0.00034 , 0, 0, 0, mps, NamedParameterBase::QUIET)
159  , _fitFlatte_gPi(makeFitParName("Flatte::gPi_", _pid), 1, 0.165*GeV , 0, 0, 0, mps, NamedParameterBase::QUIET)
160  , _fitFlatte_gK_by_gPi(makeFitParName("Flatte::gK_by_gPi_", _pid), 1, 4.21 , 0, 0, 0, mps, NamedParameterBase::QUIET)
161  , _fitBugg_M(makeFitParName("Bugg::M_", _pid), 1, 0.935 , 0, 0, 0, mps, NamedParameterBase::QUIET)
162  , _fitBugg_b1(makeFitParName("Bugg::b1_", _pid), 1, 1.302 , 0, 0, 0, mps, NamedParameterBase::QUIET)
163  , _fitBugg_b2(makeFitParName("Bugg::b2_", _pid), 1, 0.340 , 0, 0, 0, mps, NamedParameterBase::QUIET)
164  , _fitBugg_A(makeFitParName("Bugg::A_", _pid), 1, 2.426 , 0, 0, 0, mps, NamedParameterBase::QUIET)
165  , _fitBugg_g_4pi(makeFitParName("Bugg::g_4pi_", _pid), 1, 0.011 , 0, 0, 0, mps, NamedParameterBase::QUIET)
166  , _fitBugg_g_KK(makeFitParName("Bugg::g_KK_", _pid), 1, 0.6 , 0, 0, 0, mps, NamedParameterBase::QUIET)
167  , _fitBugg_g_etaeta(makeFitParName("Bugg::g_etaeta_", _pid), 1, 0.2 , 0, 0, 0, mps, NamedParameterBase::QUIET)
168  , _fitBugg_alpha(makeFitParName("Bugg::alpha_", _pid), 1, 1.3 , 0, 0, 0, mps, NamedParameterBase::QUIET)
169  , _fitBugg_sA(makeFitParName("Bugg::sA_", _pid), 1, 0.41 , 0, 0, 0, mps, NamedParameterBase::QUIET)
170  , _fitBugg_4pi_s0(makeFitParName("Bugg::4pi_s0_", _pid), 1, 7.082/2.845 , 0, 0, 0, mps, NamedParameterBase::QUIET)
171  , _fitBugg_4pi_lambda(makeFitParName("Bugg::4pi_lambda_", _pid), 1, 2.845 , 0, 0, 0, mps, NamedParameterBase::QUIET)
172  , _fitModel_independent_Bin_1_Re(makeFitParName("MI::", _pid)+"_Bin_1_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
173  , _fitModel_independent_Bin_1_Im(makeFitParName("MI::", _pid)+"_Bin_1_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
174  , _fitModel_independent_Bin_2_Re(makeFitParName("MI::", _pid)+"_Bin_2_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
175  , _fitModel_independent_Bin_2_Im(makeFitParName("MI::", _pid)+"_Bin_2_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
176  , _fitModel_independent_Bin_3_Re(makeFitParName("MI::", _pid)+"_Bin_3_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
177  , _fitModel_independent_Bin_3_Im(makeFitParName("MI::", _pid)+"_Bin_3_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
178  , _fitModel_independent_Bin_4_Re(makeFitParName("MI::", _pid)+"_Bin_4_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
179  , _fitModel_independent_Bin_4_Im(makeFitParName("MI::", _pid)+"_Bin_4_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
180  , _fitModel_independent_Bin_5_Re(makeFitParName("MI::", _pid)+"_Bin_5_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
181  , _fitModel_independent_Bin_5_Im(makeFitParName("MI::", _pid)+"_Bin_5_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
182  , _fitModel_independent_Bin_6_Re(makeFitParName("MI::", _pid)+"_Bin_6_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
183  , _fitModel_independent_Bin_6_Im(makeFitParName("MI::", _pid)+"_Bin_6_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
184  , _fitModel_independent_Bin_7_Re(makeFitParName("MI::", _pid)+"_Bin_7_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
185  , _fitModel_independent_Bin_7_Im(makeFitParName("MI::", _pid)+"_Bin_7_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
186  , _fitModel_independent_Bin_8_Re(makeFitParName("MI::", _pid)+"_Bin_8_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
187  , _fitModel_independent_Bin_8_Im(makeFitParName("MI::", _pid)+"_Bin_8_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
188  , _fitModel_independent_Bin_9_Re(makeFitParName("MI::", _pid)+"_Bin_9_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
189  , _fitModel_independent_Bin_9_Im(makeFitParName("MI::", _pid)+"_Bin_9_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
190  , _fitModel_independent_Bin_10_Re(makeFitParName("MI::", _pid)+"_Bin_10_Re", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
191  , _fitModel_independent_Bin_10_Im(makeFitParName("MI::", _pid)+"_Bin_10_Im", 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
192 , _fitGLASS_a(makeFitParName("GLASS::a_", _pid), 1, 0.224 , 0, 0, 0, mps, NamedParameterBase::QUIET)
193 , _fitGLASS_r(makeFitParName("GLASS::r_", _pid), 1, -15.01 , 0, 0, 0, mps, NamedParameterBase::QUIET)
194 , _fitGLASS_F(makeFitParName("GLASS::F_", _pid), 1, 0.62 , 0, 0, 0, mps, NamedParameterBase::QUIET)
195 , _fitGLASS_phiF(makeFitParName("GLASS::phiF_", _pid), 1, -0.1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
196 , _fitGLASS_R(makeFitParName("GLASS::R_", _pid), 1, 1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
197 , _fitGLASS_phiR(makeFitParName("GLASS::phiR_", _pid), 1, 1.1 , 0, 0, 0, mps, NamedParameterBase::QUIET)
198 , _fitGLASS_alpha1(makeFitParName("GLASS::alpha1_", _pid), 1, 0 , 0, 0, 0, mps, NamedParameterBase::QUIET)
199 , _fitGLASS_alpha2(makeFitParName("GLASS::alpha2_", _pid), 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
200 , _fitGLASS_alpha3(makeFitParName("GLASS::alpha3_", _pid), 1, 0. , 0, 0, 0, mps, NamedParameterBase::QUIET)
201 
202 
203 {
204 }
205 
206 
207 
208 //
static double widthInit(int pdg_id)
static double massInit(int pdg_id)
ResonanceProperties(int pid, MINT::MinuitParameterSet *mps=0, const std::string &namePrefix="")
static std::string nameFromName(const std::string &name)
const ParticleProperties * get(const std::string &name) const
static const double GeV
static double radiusInit(int pdg_id)
std::string name() const
static const ParticlePropertiesList * getMe()
std::string makeFitParName(const std::string &propertyName, int pdg_id) const
static std::string nameFromPid(int pdg_id)
double width() const
static int pidFromName(const std::string &name)