laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauAbsResonance.cc
Go to the documentation of this file.
1 
2 // Copyright University of Warwick 2004 - 2013.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 // Authors:
7 // Thomas Latham
8 // John Back
9 // Paul Harrison
10 
15 //****************************************************************************
16 // Abstract class for defining resonance models (Breit-Wigner, Flatte etc.)
17 //****************************************************************************
18 
19 // --CLASS DESCRIPTION [MODEL] --
20 // Abstract class for defining resonance models (Breit-Wigner, Flatte etc.)
21 
22 #include <iostream>
23 using std::cout;
24 using std::cerr;
25 using std::endl;
26 
27 #include "TSystem.h"
28 
29 #include "LauAbsResonance.hh"
30 #include "LauConstants.hh"
31 #include "LauDaughters.hh"
32 #include "LauKinematics.hh"
33 
35 
36 
37  // Constructor
38  LauAbsResonance::LauAbsResonance(const TString& resName, Double_t resMass, Double_t resWidth, Int_t resSpin,
39  Int_t resCharge, Int_t resPairAmpInt, const LauDaughters* daughters) :
40  daughters_(daughters),
41  nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""),
42  chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0),
43  massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0),
44  resName_(resName),
45  resMass_(resMass),
46  resWidth_(resWidth),
47  resSpin_(resSpin),
48  resCharge_(resCharge),
49  resPairAmpInt_(resPairAmpInt),
50  flipHelicity_(kFALSE),
51  ignoreMomenta_(kFALSE),
52  q_(0.0),
53  p_(0.0),
54  pstar_(0.0)
55 {
56  if (daughters_) {
57  nameParent_ = this->getNameParent();
58  nameDaug1_ = this->getNameDaug1();
59  nameDaug2_ = this->getNameDaug2();
60  nameBachelor_ = this->getNameBachelor();
61  massParent_ = this->getMassParent();
62  massDaug1_ = this->getMassDaug1();
63  massDaug2_ = this->getMassDaug2();
64  massBachelor_ = this->getMassBachelor();
65  chargeParent_ = this->getChargeParent();
66  chargeDaug1_ = this->getChargeDaug1();
67  chargeDaug2_ = this->getChargeDaug2();
68  chargeBachelor_ = this->getChargeBachelor();
69  } else {
70  cerr<<"ERROR in LauAbsResonance : daughters_ pointer is NULL."<<endl;
71  }
72 
73  // check that the total charge adds up to that of the resonance
74  Int_t totalCharge = chargeDaug1_ + chargeDaug2_;
75  if ( (totalCharge != resCharge_) && (resName != "NonReson") && (!resName.BeginsWith("BelleNR")) ) {
76  cerr<<"ERROR in LauAbsResonance : "
77  <<"Total charge of daughters = "<<totalCharge<<". Resonance charge = "<<resCharge_<<"."<<endl;
78  gSystem->Exit(EXIT_FAILURE);
79  }
80 }
81 
82 // Destructor
84 {
85 }
86 
88 {
89  // Use LauKinematics interface for amplitude
90  Double_t mass(0.0), cosHel(0.0);
91  // For resonance made from tracks i, j, we need the momenta
92  // of tracks i and k in the i-j rest frame for spin helicity calculations
93  // in the Zemach tensor formalism.
94  // Also need the momentum of track k in the parent rest-frame for
95  // calculation of the Blatt-Weisskopf factors.
96  q_ = 0.0; p_ = 0.0; pstar_ = 0.0;
97 
98  if (resPairAmpInt_ == 1) {
99 
100  mass = kinematics->getm23();
101  cosHel = kinematics->getc23();
102  q_ = kinematics->getp2_23();
103  p_ = kinematics->getp1_23();
104  pstar_ = kinematics->getp1_Parent();
105 
106  } else if (resPairAmpInt_ == 2) {
107 
108  mass = kinematics->getm13();
109  cosHel = kinematics->getc13();
110  q_ = kinematics->getp1_13();
111  p_ = kinematics->getp2_13();
112  pstar_ = kinematics->getp2_Parent();
113 
114  } else if (resPairAmpInt_ == 3) {
115 
116  mass = kinematics->getm12();
117  cosHel = kinematics->getc12();
118  q_ = kinematics->getp1_12();
119  p_ = kinematics->getp3_12();
120  pstar_ = kinematics->getp3_Parent();
121 
122  } else {
123  cerr<<"Nonsense setup of resPairAmp array."<<endl;
124  }
125 
126  if (this->flipHelicity()) {
127  cosHel *= -1.0;
128  }
129 
130  if (this->ignoreMomenta()) {
131  q_ = 1;
132  p_ = 1;
133  }
134 
135  Double_t spinTerm(1.0);
136  if (resSpin_ == 1) {
137  // Calculate vector resonance Zemach helicity factor
138  spinTerm = -2.0*q_*p_*cosHel;
139  } else if (resSpin_ == 2) {
140  // Calculate tensor resonance Zemach helicity factor
141  Double_t pProd = q_*p_;
142  spinTerm = 4.0*(pProd*pProd)*(3.0*cosHel*cosHel - 1.0)/3.0;
143  } else if (resSpin_ == 3) {
144  // Calculate spin 3 resonance Zemach helicity factor
145  Double_t pProd = q_*p_;
146  spinTerm = -8.0*3.0*(pProd*pProd*pProd)*(5.0*cosHel*cosHel*cosHel - 3.0*cosHel)/15.0;
147  }
148 
149  LauComplex resAmplitude = this->resAmp(mass, spinTerm);
150 
151  return resAmplitude;
152 }
153 
154 void LauAbsResonance::changeResonance(Double_t newMass, Double_t newWidth, Int_t newSpin)
155 {
156  if (newMass > 0.0) {
157  resMass_ = newMass;
158  cout << "Setting mass to " << resMass_ << endl;
159  }
160  if (newWidth > 0.0) {
161  resWidth_ = newWidth;
162  cout << "Setting width to " << resWidth_ << endl;
163  }
164  if (newSpin > -1) {
165  resSpin_ = newSpin;
166  cout << "Setting spin to " << resSpin_ << endl;
167  }
168  this->initialise();
169 }
170 
171 void LauAbsResonance::setResonanceParameter(Double_t value, const TString& name)
172 {
173  //This function should always be overwritten if needed in classes inheriting from LauAbsResonance.
174  cerr << "WARNING in LauAbsResonance::setResonanceParameter : Unable to set parameter \"" << name << "\" to value: " << value << "." << endl;
175 }
176 
178 {
179  // Get the parent mass
180  Double_t mass(LauConstants::mB);
181 
182  if (daughters_) {
183  mass = daughters_->getMassParent();
184  }
185 
186  return mass;
187 }
188 
190 {
191  // Get the daughter mass
192  Double_t mass(LauConstants::mPi);
193 
194  if (daughters_) {
195  if (resPairAmpInt_ == 1) {
196  mass = daughters_->getMassDaug2();
197  } else if (resPairAmpInt_ == 2) {
198  mass = daughters_->getMassDaug1();
199  } else if (resPairAmpInt_ == 3) {
200  mass = daughters_->getMassDaug1();
201  }
202  }
203 
204  return mass;
205 }
206 
208 {
209  // Get the daughter mass
210  Double_t mass(LauConstants::mPi);
211 
212  if (daughters_) {
213  if (resPairAmpInt_ == 1) {
214  mass = daughters_->getMassDaug3();
215  } else if (resPairAmpInt_ == 2) {
216  mass = daughters_->getMassDaug3();
217  } else if (resPairAmpInt_ == 3) {
218  mass = daughters_->getMassDaug2();
219  }
220  }
221 
222  return mass;
223 }
224 
226 {
227  // Get the bachelor mass
228  Double_t mass(LauConstants::mPi);
229 
230  if (daughters_) {
231  if (resPairAmpInt_ == 1) {
232  mass = daughters_->getMassDaug1();
233  } else if (resPairAmpInt_ == 2) {
234  mass = daughters_->getMassDaug2();
235  } else if (resPairAmpInt_ == 3) {
236  mass = daughters_->getMassDaug3();
237  }
238  }
239 
240  return mass;
241 }
242 
244 {
245  // Get the parent charge
246  Int_t charge(0);
247 
248  if (daughters_) {
249  charge = daughters_->getChargeParent();
250  }
251 
252  return charge;
253 }
254 
256 {
257  // Get the daughter charge
258  Int_t charge(0);
259 
260  if (daughters_) {
261  if (resPairAmpInt_ == 1) {
262  charge = daughters_->getChargeDaug2();
263  } else if (resPairAmpInt_ == 2) {
264  charge = daughters_->getChargeDaug1();
265  } else if (resPairAmpInt_ == 3) {
266  charge = daughters_->getChargeDaug1();
267  }
268  }
269 
270  return charge;
271 }
272 
274 {
275  // Get the daughter charge
276  Int_t charge(0);
277 
278  if (daughters_) {
279  if (resPairAmpInt_ == 1) {
280  charge = daughters_->getChargeDaug3();
281  } else if (resPairAmpInt_ == 2) {
282  charge = daughters_->getChargeDaug3();
283  } else if (resPairAmpInt_ == 3) {
284  charge = daughters_->getChargeDaug2();
285  }
286  }
287 
288  return charge;
289 }
290 
292 {
293  // Get the bachelor charge
294  Int_t charge(0);
295 
296  if (daughters_) {
297  if (resPairAmpInt_ == 1) {
298  charge = daughters_->getChargeDaug1();
299  } else if (resPairAmpInt_ == 2) {
300  charge = daughters_->getChargeDaug2();
301  } else if (resPairAmpInt_ == 3) {
302  charge = daughters_->getChargeDaug3();
303  }
304  }
305 
306  return charge;
307 }
308 
310 {
311  // Get the parent name
312  TString name("");
313 
314  if (daughters_) {
315  name = daughters_->getNameParent();
316  }
317 
318  return name;
319 }
320 
322 {
323  // Get the daughter name
324  TString name("");
325 
326  if (daughters_) {
327  if (resPairAmpInt_ == 1) {
328  name = daughters_->getNameDaug2();
329  } else if (resPairAmpInt_ == 2) {
330  name = daughters_->getNameDaug1();
331  } else if (resPairAmpInt_ == 3) {
332  name = daughters_->getNameDaug1();
333  }
334  }
335 
336  return name;
337 }
338 
340 {
341  // Get the daughter name
342  TString name("");
343 
344  if (daughters_) {
345  if (resPairAmpInt_ == 1) {
346  name = daughters_->getNameDaug3();
347  } else if (resPairAmpInt_ == 2) {
348  name = daughters_->getNameDaug3();
349  } else if (resPairAmpInt_ == 3) {
350  name = daughters_->getNameDaug2();
351  }
352  }
353 
354  return name;
355 }
356 
358 {
359  // Get the bachelor name
360  TString name("");
361 
362  if (daughters_) {
363  if (resPairAmpInt_ == 1) {
364  name = daughters_->getNameDaug1();
365  } else if (resPairAmpInt_ == 2) {
366  name = daughters_->getNameDaug2();
367  } else if (resPairAmpInt_ == 3) {
368  name = daughters_->getNameDaug3();
369  }
370  }
371 
372  return name;
373 }
374 
Double_t getMassParent() const
Get mass of the parent particle.
TString getNameDaug1() const
Get name of the first daughter particle.
virtual void initialise()=0
Initialise the model.
Int_t getChargeDaug3() const
Get charge of the third daughter particle.
Int_t getChargeBachelor() const
Get the charge of the bachelor daughter.
Double_t getc23() const
Get the cosine of the helicity angle theta23.
Double_t resMass_
Resonance mass.
Double_t getMassBachelor() const
Get the mass of the bachelor daughter.
Double_t getp2_Parent() const
Get the momentum of the track 2 in parent rest frame.
ClassImp(LauAbsCoeffSet)
Double_t getMassParent() const
Get the parent particle mass.
Double_t getm23() const
Get the m23 invariant mass.
const TString & name() const
The parameter name.
Class that defines the particular 3-body decay under study.
Definition: LauDaughters.hh:33
Double_t getc13() const
Get the cosine of the helicity angle theta13.
Double_t getp2_13() const
Get the momentum of the track 2 in 13 rest frame.
File containing declaration of LauDaughters class.
Int_t getChargeDaug1() const
Get charge of the first daughter particle.
TString getNameDaug2() const
Get the name of the second daughter of the resonance.
Double_t getp1_12() const
Get the momentum of the track 1 in 12 rest frame.
Double_t resWidth_
Resonance width.
Double_t getMassDaug1() const
Get the mass of daughter 1.
TString getNameDaug2() const
Get name of the second daughter particle.
Double_t getMassDaug2() const
Get mass of second daughter particle.
Bool_t flipHelicity() const
Get the helicity flip flag.
File containing declaration of LauKinematics class.
Double_t getMassDaug2() const
Get the mass of daughter 2.
Double_t getp1_Parent() const
Get the momentum of the track 1 in parent rest frame.
const Double_t mPi
Mass of pi+- (GeV/c^2)
Definition: LauConstants.hh:40
const Double_t mB
Mass of charged B (GeV/c^2)
Definition: LauConstants.hh:34
Int_t getChargeDaug1() const
Get the charge of daughter 1.
const LauDaughters * daughters_
Information on the particles.
Double_t getp1_23() const
Get the momentum of the track 1 in 23 rest frame.
Double_t getc12() const
Get the cosine of the helicity angle theta12.
Double_t getm13() const
Get the m13 invariant mass.
Int_t getChargeDaug2() const
Get charge of the second daughter particle.
Int_t getChargeParent() const
Get the Charge of the parent particle.
Double_t getp1_13() const
Get the momentum of the track 1 in 13 rest frame.
virtual ~LauAbsResonance()
Destructor.
virtual LauComplex resAmp(Double_t mass, Double_t spinTerm)=0
Complex resonant amplitude.
TString getNameParent() const
Get the name of the parent particle.
Bool_t ignoreMomenta() const
Get the ignore momenta flag.
TString getNameBachelor() const
Get the name of the daughter that does not originate form the resonance.
Int_t getChargeDaug2() const
Get the charge of daughter 2.
Double_t getp3_12() const
Get the momentum of the track 3 in 12 rest frame.
Abstract class for defining type for resonance amplitude models (Breit-Wigner, Flatte etc...
TString getNameParent() const
Get name of the parent particle.
Int_t getChargeParent() const
Get charge of the parent particle.
Double_t getMassDaug1() const
Get mass of first daughter particle.
Int_t resPairAmpInt_
DP axis identifier.
Double_t getm12() const
Get the m12 invariant mass.
File containing LauConstants namespace.
File containing declaration of LauAbsResonance class.
Double_t getp2_23() const
Get the momentum of the track 2 in 23 rest frame.
Class for defining a complex number.
Definition: LauComplex.hh:47
TString getNameDaug1() const
Get the name of the first daughter of the resonance.
Class for calculating 3-body kinematic quantities.
Int_t resSpin_
Resonance spin.
Double_t value() const
The value of the parameter.
void changeResonance(Double_t newMass, Double_t newWidth, Int_t newSpin)
Allow the mass, width and spin of the resonance to be changed.
virtual LauComplex amplitude(const LauKinematics *kinematics)
Calculate the complex amplitude.
Double_t getMassDaug3() const
Get mass of third daughter particle.
TString getNameDaug3() const
Get name of the third daughter particle.
Double_t p_
Bachelor momentum in resonance rest frame.
Double_t getp3_Parent() const
Get the momentum of the track 3 in parent rest frame.
virtual void setResonanceParameter(Double_t value, const TString &name)
Set the updated parameters from changeResonance.
Double_t pstar_
Bachelor momentum in parent rest frame.
Double_t q_
Daughter momentum in resonance rest frame.