laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
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 
34 ClassImp(LauAbsResonance)
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  q_(0.0),
52  p_(0.0),
53  pstar_(0.0)
54 {
55  if (daughters_) {
56  nameParent_ = this->getNameParent();
57  nameDaug1_ = this->getNameDaug1();
58  nameDaug2_ = this->getNameDaug2();
59  nameBachelor_ = this->getNameBachelor();
60  massParent_ = this->getMassParent();
61  massDaug1_ = this->getMassDaug1();
62  massDaug2_ = this->getMassDaug2();
63  massBachelor_ = this->getMassBachelor();
64  chargeParent_ = this->getChargeParent();
65  chargeDaug1_ = this->getChargeDaug1();
66  chargeDaug2_ = this->getChargeDaug2();
67  chargeBachelor_ = this->getChargeBachelor();
68  } else {
69  cerr<<"ERROR in LauAbsResonance : daughters_ pointer is NULL."<<endl;
70  }
71 
72  // check that the total charge adds up to that of the resonance
73  Int_t totalCharge = chargeDaug1_ + chargeDaug2_;
74  if ( (totalCharge != resCharge_) && (resName != "NonReson") && (!resName.BeginsWith("BelleNR")) ) {
75  cerr<<"ERROR in LauAbsResonance : "
76  <<"Total charge of daughters = "<<totalCharge<<". Resonance charge = "<<resCharge_<<"."<<endl;
77  gSystem->Exit(EXIT_FAILURE);
78  }
79 }
80 
81 // Destructor
83 {
84 }
85 
87 {
88  // Use LauKinematics interface for amplitude
89  Double_t mass(0.0), cosHel(0.0);
90  // For resonance made from tracks i, j, we need the momenta
91  // of tracks i and k in the i-j rest frame for spin helicity calculations
92  // in the Zemach tensor formalism.
93  // Also need the momentum of track k in the parent rest-frame for
94  // calculation of the Blatt-Weisskopf factors.
95  q_ = 0.0; p_ = 0.0; pstar_ = 0.0;
96 
97  if (resPairAmpInt_ == 1) {
98 
99  mass = kinematics->getm23();
100  cosHel = kinematics->getc23();
101  q_ = kinematics->getp2_23();
102  p_ = kinematics->getp1_23();
103  pstar_ = kinematics->getp1_Parent();
104 
105  } else if (resPairAmpInt_ == 2) {
106 
107  mass = kinematics->getm13();
108  cosHel = kinematics->getc13();
109  q_ = kinematics->getp1_13();
110  p_ = kinematics->getp2_13();
111  pstar_ = kinematics->getp2_Parent();
112 
113  } else if (resPairAmpInt_ == 3) {
114 
115  mass = kinematics->getm12();
116  cosHel = kinematics->getc12();
117  q_ = kinematics->getp1_12();
118  p_ = kinematics->getp3_12();
119  pstar_ = kinematics->getp3_Parent();
120 
121  } else {
122  cerr<<"Nonsense setup of resPairAmp array."<<endl;
123  }
124 
125  if (this->flipHelicity()) {
126  cosHel *= -1.0;
127  }
128 
129  Double_t spinTerm(1.0);
130  if (resSpin_ == 1) {
131  // Calculate vector resonance Zemach helicity factor
132  spinTerm = -2.0*q_*p_*cosHel;
133  } else if (resSpin_ == 2) {
134  // Calculate tensor resonance Zemach helicity factor
135  Double_t pProd = q_*p_;
136  spinTerm = 4.0*(pProd*pProd)*(3.0*cosHel*cosHel - 1.0)/3.0;
137  } else if (resSpin_ == 3) {
138  // Calculate spin 3 resonance Zemach helicity factor
139  Double_t pProd = q_*p_;
140  spinTerm = -8.0*3.0*(pProd*pProd*pProd)*(5.0*cosHel*cosHel*cosHel - 3.0*cosHel)/15.0;
141  }
142 
143  LauComplex resAmplitude = this->resAmp(mass, spinTerm);
144 
145  return resAmplitude;
146 }
147 
148 void LauAbsResonance::changeResonance(Double_t newMass, Double_t newWidth, Int_t newSpin)
149 {
150  if (newMass > 0.0) {
151  resMass_ = newMass;
152  cout << "Setting mass to " << resMass_ << endl;
153  }
154  if (newWidth > 0.0) {
155  resWidth_ = newWidth;
156  cout << "Setting width to " << resWidth_ << endl;
157  }
158  if (newSpin > -1) {
159  resSpin_ = newSpin;
160  cout << "Setting spin to " << resSpin_ << endl;
161  }
162  this->initialise();
163 }
164 
165 void LauAbsResonance::setResonanceParameter(Double_t value, const TString& name)
166 {
167  //This function should always be overwritten if needed in classes inheriting from LauAbsResonance.
168  cerr << "WARNING in LauAbsResonance::setResonanceParameter : Unable to set parameter \"" << name << "\" to value: " << value << "." << endl;
169 }
170 
172 {
173  // Get the parent mass
174  Double_t mass(LauConstants::mB);
175 
176  if (daughters_) {
177  mass = daughters_->getMassParent();
178  }
179 
180  return mass;
181 }
182 
184 {
185  // Get the daughter mass
186  Double_t mass(LauConstants::mPi);
187 
188  if (daughters_) {
189  if (resPairAmpInt_ == 1) {
190  mass = daughters_->getMassDaug2();
191  } else if (resPairAmpInt_ == 2) {
192  mass = daughters_->getMassDaug1();
193  } else if (resPairAmpInt_ == 3) {
194  mass = daughters_->getMassDaug1();
195  }
196  }
197 
198  return mass;
199 }
200 
202 {
203  // Get the daughter mass
204  Double_t mass(LauConstants::mPi);
205 
206  if (daughters_) {
207  if (resPairAmpInt_ == 1) {
208  mass = daughters_->getMassDaug3();
209  } else if (resPairAmpInt_ == 2) {
210  mass = daughters_->getMassDaug3();
211  } else if (resPairAmpInt_ == 3) {
212  mass = daughters_->getMassDaug2();
213  }
214  }
215 
216  return mass;
217 }
218 
220 {
221  // Get the bachelor mass
222  Double_t mass(LauConstants::mPi);
223 
224  if (daughters_) {
225  if (resPairAmpInt_ == 1) {
226  mass = daughters_->getMassDaug1();
227  } else if (resPairAmpInt_ == 2) {
228  mass = daughters_->getMassDaug2();
229  } else if (resPairAmpInt_ == 3) {
230  mass = daughters_->getMassDaug3();
231  }
232  }
233 
234  return mass;
235 }
236 
238 {
239  // Get the parent charge
240  Int_t charge(0);
241 
242  if (daughters_) {
243  charge = daughters_->getChargeParent();
244  }
245 
246  return charge;
247 }
248 
250 {
251  // Get the daughter charge
252  Int_t charge(0);
253 
254  if (daughters_) {
255  if (resPairAmpInt_ == 1) {
256  charge = daughters_->getChargeDaug2();
257  } else if (resPairAmpInt_ == 2) {
258  charge = daughters_->getChargeDaug1();
259  } else if (resPairAmpInt_ == 3) {
260  charge = daughters_->getChargeDaug1();
261  }
262  }
263 
264  return charge;
265 }
266 
268 {
269  // Get the daughter charge
270  Int_t charge(0);
271 
272  if (daughters_) {
273  if (resPairAmpInt_ == 1) {
274  charge = daughters_->getChargeDaug3();
275  } else if (resPairAmpInt_ == 2) {
276  charge = daughters_->getChargeDaug3();
277  } else if (resPairAmpInt_ == 3) {
278  charge = daughters_->getChargeDaug2();
279  }
280  }
281 
282  return charge;
283 }
284 
286 {
287  // Get the bachelor charge
288  Int_t charge(0);
289 
290  if (daughters_) {
291  if (resPairAmpInt_ == 1) {
292  charge = daughters_->getChargeDaug1();
293  } else if (resPairAmpInt_ == 2) {
294  charge = daughters_->getChargeDaug2();
295  } else if (resPairAmpInt_ == 3) {
296  charge = daughters_->getChargeDaug3();
297  }
298  }
299 
300  return charge;
301 }
302 
304 {
305  // Get the parent name
306  TString name("");
307 
308  if (daughters_) {
309  name = daughters_->getNameParent();
310  }
311 
312  return name;
313 }
314 
316 {
317  // Get the daughter name
318  TString name("");
319 
320  if (daughters_) {
321  if (resPairAmpInt_ == 1) {
322  name = daughters_->getNameDaug2();
323  } else if (resPairAmpInt_ == 2) {
324  name = daughters_->getNameDaug1();
325  } else if (resPairAmpInt_ == 3) {
326  name = daughters_->getNameDaug1();
327  }
328  }
329 
330  return name;
331 }
332 
334 {
335  // Get the daughter name
336  TString name("");
337 
338  if (daughters_) {
339  if (resPairAmpInt_ == 1) {
340  name = daughters_->getNameDaug3();
341  } else if (resPairAmpInt_ == 2) {
342  name = daughters_->getNameDaug3();
343  } else if (resPairAmpInt_ == 3) {
344  name = daughters_->getNameDaug2();
345  }
346  }
347 
348  return name;
349 }
350 
352 {
353  // Get the bachelor name
354  TString name("");
355 
356  if (daughters_) {
357  if (resPairAmpInt_ == 1) {
358  name = daughters_->getNameDaug1();
359  } else if (resPairAmpInt_ == 2) {
360  name = daughters_->getNameDaug2();
361  } else if (resPairAmpInt_ == 3) {
362  name = daughters_->getNameDaug3();
363  }
364  }
365 
366  return name;
367 }
368 
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.
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.
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.