laura is hosted by Hepforge, IPPP Durham
Laura++  v2r2
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 
24 #include "TSystem.h"
25 
26 #include "LauAbsResonance.hh"
27 #include "LauConstants.hh"
28 #include "LauDaughters.hh"
29 #include "LauKinematics.hh"
30 
32 
33 
34 // Constructor
35 LauAbsResonance::LauAbsResonance(const TString& resName, Double_t resMass, Double_t resWidth, Int_t resSpin,
36  Int_t resCharge, Int_t resPairAmpInt, const LauDaughters* daughters) :
37  daughters_(daughters),
38  nameParent_(""), nameDaug1_(""), nameDaug2_(""), nameBachelor_(""),
39  chargeParent_(0), chargeDaug1_(0), chargeDaug2_(0), chargeBachelor_(0),
40  massParent_(0.0), massDaug1_(0.0), massDaug2_(0.0), massBachelor_(0.0),
41  resName_(resName),
42  resMass_(resMass),
43  resWidth_(resWidth),
44  resSpin_(resSpin),
45  resCharge_(resCharge),
46  resPairAmpInt_(resPairAmpInt),
47  parR_(4.0),
48  resR_(4.0),
49  barrierType_(BWPrimeBarrier),
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  std::cerr<<"ERROR in LauAbsResonance : daughters_ pointer is NULL."<<std::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  std::cerr<<"ERROR in LauAbsResonance : "<<"Total charge of daughters = "<<totalCharge<<". Resonance charge = "<<resCharge_<<"."<<std::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  std::cerr<<"ERROR in LauAbsResonance::amplitude : Nonsense setup of resPairAmp array."<<std::endl;
123  gSystem->Exit(EXIT_FAILURE);
124  }
125 
126  if (this->flipHelicity()) {
127  cosHel *= -1.0;
128  }
129 
130  if (this->ignoreMomenta()) {
131  q_ = 1.0;
132  p_ = 1.0;
133  }
134 
135  // Calculate the spin factors
136  //
137  // These are calculated as follows
138  //
139  // -2^j * (q*p)^j * cj * Pj(cosHel)
140  //
141  // where Pj(coshHel) is the jth order Legendre polynomial and
142  //
143  // cj = j! / (2j-1)!!
144 
145  Double_t spinTerm(1.0);
146  if (resSpin_ == 1) {
147  // Calculate vector resonance Zemach helicity factor
148  spinTerm = -2.0*q_*p_*cosHel;
149  } else if (resSpin_ == 2) {
150  // Calculate tensor resonance Zemach helicity factor
151  Double_t pProd = q_*p_;
152  spinTerm = 4.0*(pProd*pProd)*(3.0*cosHel*cosHel - 1.0)/3.0;
153  } else if (resSpin_ == 3) {
154  // Calculate spin 3 resonance Zemach helicity factor
155  Double_t pProd = q_*p_;
156  spinTerm = -8.0*(pProd*pProd*pProd)*(5.0*cosHel*cosHel*cosHel - 3.0*cosHel)/5.0;
157  } else if (resSpin_ == 4) {
158  // Calculate spin 4 resonance Zemach helicity factor
159  Double_t pProd = q_*p_;
160  spinTerm = 16.0*(pProd*pProd*pProd*pProd)*(35.0*cosHel*cosHel*cosHel*cosHel - 30.0*cosHel*cosHel + 3.0)/35.0;
161  } else if (resSpin_ == 5) {
162  // Calculate spin 5 resonance Zemach helicity factor
163  Double_t pProd = q_*p_;
164  spinTerm = -32.0*(pProd*pProd*pProd*pProd*pProd)*(63.0*cosHel*cosHel*cosHel*cosHel*cosHel - 70.0*cosHel*cosHel*cosHel + 15.0*cosHel)/63.0;
165  }
166 
167  LauComplex resAmplitude = this->resAmp(mass, spinTerm);
168 
169  return resAmplitude;
170 }
171 
172 void LauAbsResonance::changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin)
173 {
174  if (newMass > 0.0) {
175  resMass_ = newMass;
176  std::cout << "INFO in LauAbsResonance::changeResonance : Setting mass to " << resMass_ << std::endl;
177  }
178  if (newWidth > 0.0) {
179  resWidth_ = newWidth;
180  std::cout << "INFO in LauAbsResonance::changeResonance : Setting width to " << resWidth_ << std::endl;
181  }
182  if (newSpin > -1) {
183  resSpin_ = newSpin;
184  std::cout << "INFO in LauAbsResonance::changeResonance : Setting spin to " << resSpin_ << std::endl;
185  }
186 }
187 
188 void LauAbsResonance::setResonanceParameter(const TString& name, const Double_t value)
189 {
190  //This function should always be overwritten if needed in classes inheriting from LauAbsResonance.
191  std::cerr << "WARNING in LauAbsResonance::setResonanceParameter : Unable to set parameter \"" << name << "\" to value: " << value << "." << std::endl;
192 }
193 
195 {
196  // Get the parent mass
197  Double_t mass(LauConstants::mB);
198 
199  if (daughters_) {
200  mass = daughters_->getMassParent();
201  }
202 
203  return mass;
204 }
205 
207 {
208  // Get the daughter mass
209  Double_t mass(LauConstants::mPi);
210 
211  if (daughters_) {
212  if (resPairAmpInt_ == 1) {
213  mass = daughters_->getMassDaug2();
214  } else if (resPairAmpInt_ == 2) {
215  mass = daughters_->getMassDaug1();
216  } else if (resPairAmpInt_ == 3) {
217  mass = daughters_->getMassDaug1();
218  }
219  }
220 
221  return mass;
222 }
223 
225 {
226  // Get the daughter mass
227  Double_t mass(LauConstants::mPi);
228 
229  if (daughters_) {
230  if (resPairAmpInt_ == 1) {
231  mass = daughters_->getMassDaug3();
232  } else if (resPairAmpInt_ == 2) {
233  mass = daughters_->getMassDaug3();
234  } else if (resPairAmpInt_ == 3) {
235  mass = daughters_->getMassDaug2();
236  }
237  }
238 
239  return mass;
240 }
241 
243 {
244  // Get the bachelor mass
245  Double_t mass(LauConstants::mPi);
246 
247  if (daughters_) {
248  if (resPairAmpInt_ == 1) {
249  mass = daughters_->getMassDaug1();
250  } else if (resPairAmpInt_ == 2) {
251  mass = daughters_->getMassDaug2();
252  } else if (resPairAmpInt_ == 3) {
253  mass = daughters_->getMassDaug3();
254  }
255  }
256 
257  return mass;
258 }
259 
261 {
262  // Get the parent charge
263  Int_t charge(0);
264 
265  if (daughters_) {
266  charge = daughters_->getChargeParent();
267  }
268 
269  return charge;
270 }
271 
273 {
274  // Get the daughter charge
275  Int_t charge(0);
276 
277  if (daughters_) {
278  if (resPairAmpInt_ == 1) {
279  charge = daughters_->getChargeDaug2();
280  } else if (resPairAmpInt_ == 2) {
281  charge = daughters_->getChargeDaug1();
282  } else if (resPairAmpInt_ == 3) {
283  charge = daughters_->getChargeDaug1();
284  }
285  }
286 
287  return charge;
288 }
289 
291 {
292  // Get the daughter charge
293  Int_t charge(0);
294 
295  if (daughters_) {
296  if (resPairAmpInt_ == 1) {
297  charge = daughters_->getChargeDaug3();
298  } else if (resPairAmpInt_ == 2) {
299  charge = daughters_->getChargeDaug3();
300  } else if (resPairAmpInt_ == 3) {
301  charge = daughters_->getChargeDaug2();
302  }
303  }
304 
305  return charge;
306 }
307 
309 {
310  // Get the bachelor charge
311  Int_t charge(0);
312 
313  if (daughters_) {
314  if (resPairAmpInt_ == 1) {
315  charge = daughters_->getChargeDaug1();
316  } else if (resPairAmpInt_ == 2) {
317  charge = daughters_->getChargeDaug2();
318  } else if (resPairAmpInt_ == 3) {
319  charge = daughters_->getChargeDaug3();
320  }
321  }
322 
323  return charge;
324 }
325 
327 {
328  // Get the parent name
329  TString name("");
330 
331  if (daughters_) {
332  name = daughters_->getNameParent();
333  }
334 
335  return name;
336 }
337 
339 {
340  // Get the daughter name
341  TString name("");
342 
343  if (daughters_) {
344  if (resPairAmpInt_ == 1) {
345  name = daughters_->getNameDaug2();
346  } else if (resPairAmpInt_ == 2) {
347  name = daughters_->getNameDaug1();
348  } else if (resPairAmpInt_ == 3) {
349  name = daughters_->getNameDaug1();
350  }
351  }
352 
353  return name;
354 }
355 
357 {
358  // Get the daughter name
359  TString name("");
360 
361  if (daughters_) {
362  if (resPairAmpInt_ == 1) {
363  name = daughters_->getNameDaug3();
364  } else if (resPairAmpInt_ == 2) {
365  name = daughters_->getNameDaug3();
366  } else if (resPairAmpInt_ == 3) {
367  name = daughters_->getNameDaug2();
368  }
369  }
370 
371  return name;
372 }
373 
375 {
376  // Get the bachelor name
377  TString name("");
378 
379  if (daughters_) {
380  if (resPairAmpInt_ == 1) {
381  name = daughters_->getNameDaug1();
382  } else if (resPairAmpInt_ == 2) {
383  name = daughters_->getNameDaug2();
384  } else if (resPairAmpInt_ == 3) {
385  name = daughters_->getNameDaug3();
386  }
387  }
388 
389  return name;
390 }
391 
Double_t getMassParent() const
Get mass of the parent particle.
TString getNameDaug1() const
Get name of the first daughter particle.
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.
void changeResonance(const Double_t newMass, const Double_t newWidth, const Int_t newSpin)
Allow the mass, width and spin of the resonance to be changed.
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.
virtual void setResonanceParameter(const TString &name, const Double_t value)
Set value of the various parameters.
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.
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.
Double_t pstar_
Bachelor momentum in parent rest frame.
Double_t q_
Daughter momentum in resonance rest frame.