laura is hosted by Hepforge, IPPP Durham
Laura++  v1r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauKinematics.hh
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 
23 #ifndef LAU_KINEMATICS
24 #define LAU_KINEMATICS
25 
26 #include <vector>
27 
28 #include "TMath.h"
29 
30 
32 
33  public:
35 
42  LauKinematics(Double_t m1, Double_t m2, Double_t m3, Double_t mParent, Bool_t calcSquareDPCoords = kFALSE);
43 
45  virtual ~LauKinematics();
46 
48 
51  inline Bool_t squareDP() const { return squareDP_; }
52 
54  inline void warningMessages(Bool_t boolean) { warnings_ = boolean; }
55 
57 
61  void updateKinematics(Double_t m13Sq, Double_t m23Sq);
62 
64 
68  void updateSqDPKinematics(Double_t mPrime, Double_t thetaPrime);
69 
71 
74  Double_t calcSqDPJacobian();
75 
77 
81  void genFlatPhaseSpace(Double_t& m13Sq, Double_t& m23Sq) const;
82 
84 
88  void genFlatSqDP(Double_t& mPrime, Double_t& thetaPrime) const;
89 
91 
101  Bool_t withinDPLimits(Double_t m13Sq, Double_t m23Sq) const;
102 
104 
114  Bool_t withinDPLimits2(Double_t m13Sq, Double_t m23Sq) const;
115 
117 
120  Bool_t withinDPLimits() const;
121 
123 
128  Bool_t withinSqDPLimits(Double_t mPrime, Double_t thetaPrime) const;
129 
131 
136  Double_t calcThirdMassSq(Double_t firstMassSq, Double_t secondMassSq) const;
137 
139 
142  Double_t distanceFromDPCentre() const;
143 
145 
148  Double_t distanceFromDPCentre(Double_t m13Sq, Double_t m23Sq) const;
149 
151 
154  inline Double_t getm12() const {return m12_;}
156 
159  inline Double_t getm23() const {return m23_;}
161 
164  inline Double_t getm13() const {return m13_;}
165 
167 
170  inline Double_t getm12Sq() const {return m12Sq_;}
172 
175  inline Double_t getm23Sq() const {return m23Sq_;}
177 
180  inline Double_t getm13Sq() const {return m13Sq_;}
181 
183 
187  inline Double_t getc12() const {return c12_;}
189 
193  inline Double_t getc23() const {return c23_;}
195 
199  inline Double_t getc13() const {return c13_;}
200 
202 
205  inline Double_t getmPrime() const {return mPrime_;}
207 
210  inline Double_t getThetaPrime() const {return thetaPrime_;}
211 
213 
216  inline Double_t getmParent() const {return mParent_;}
218 
221  inline Double_t getmParentSq() const {return mParentSq_;}
222 
224 
230  inline Double_t getDPBoxArea() const {return (mSqMax_[1] - mSqMin_[1])*(mSqMax_[0] - mSqMin_[0]);}
231 
233 
237 
239 
242  inline Double_t getm1() const {return m1_;}
244 
247  inline Double_t getm2() const {return m2_;}
249 
252  inline Double_t getm3() const {return m3_;}
253 
255 
258  inline Double_t getm23Min() const {return TMath::Sqrt(mSqMin_[0]);}
260 
263  inline Double_t getm13Min() const {return TMath::Sqrt(mSqMin_[1]);}
265 
268  inline Double_t getm12Min() const {return TMath::Sqrt(mSqMin_[2]);}
269 
271 
274  inline Double_t getm23Max() const {return TMath::Sqrt(mSqMax_[0]);}
276 
279  inline Double_t getm13Max() const {return TMath::Sqrt(mSqMax_[1]);}
281 
284  inline Double_t getm12Max() const {return TMath::Sqrt(mSqMax_[2]);}
285 
287 
290  inline Double_t getm23SqMin() const {return mSqMin_[0];}
292 
295  inline Double_t getm13SqMin() const {return mSqMin_[1];}
297 
300  inline Double_t getm12SqMin() const {return mSqMin_[2];}
301 
303 
306  inline Double_t getm23SqMax() const {return mSqMax_[0];}
308 
311  inline Double_t getm13SqMax() const {return mSqMax_[1];}
313 
316  inline Double_t getm12SqMax() const {return mSqMax_[2];}
317 
319 
322  inline Double_t getp1_12() const {return p1_12_;}
324 
327  inline Double_t getp3_12() const {return p3_12_;}
329 
332  inline Double_t getp2_23() const {return p2_23_;}
334 
337  inline Double_t getp1_23() const {return p1_23_;}
339 
342  inline Double_t getp1_13() const {return p1_13_;}
344 
347  inline Double_t getp2_13() const {return p2_13_;}
348 
350 
353  inline Double_t getp1_Parent() const {return p1_Parent_;}
355 
358  inline Double_t getp2_Parent() const {return p2_Parent_;}
360 
363  inline Double_t getp3_Parent() const {return p3_Parent_;}
364 
366 
370  void drawDPContour(Int_t orientation = 1323, Int_t nbins = 100);
371 
372  protected:
374 
378  void updateMassSq_m12(Double_t m12, Double_t c12);
380 
384  void updateMassSq_m23(Double_t m23, Double_t c23);
386 
390  void updateMassSq_m13(Double_t m13, Double_t c13);
391 
393 
399  void updateMassSquares(Double_t m13Sq, Double_t m23Sq);
400 
402 
408  void updateSqDPMassSquares(Double_t mPrime, Double_t thetaPrime);
409 
411 
420  Double_t cFromM(Double_t mijSq, Double_t mikSq, Double_t mij, Int_t i, Int_t j, Int_t k) const;
421 
423 
432  Double_t mFromC(Double_t mijSq, Double_t cij, Double_t mij, Int_t i, Int_t j, Int_t k) const;
433 
435 
440  Double_t pCalc(Double_t energy, Double_t massSq) const;
441 
443 
446  Double_t genm13Sq() const;
448 
451  Double_t genm23Sq() const;
453 
456  Double_t genm12Sq() const;
457 
459  void calcm12Sq();
460 
462  void calcHelicities();
463 
465  void calcSqDPVars();
466 
468  void calcParentFrameMomenta();
469 
470  private:
472  const Double_t m1_;
474  const Double_t m2_;
476  const Double_t m3_;
478  const Double_t mParent_;
479 
481  const Double_t m1Sq_;
483  const Double_t m2Sq_;
485  const Double_t m3Sq_;
487  const Double_t mParentSq_;
488 
490  std::vector<Double_t> mass_;
492  std::vector<Double_t> mMin_;
494  std::vector<Double_t> mMax_;
496  std::vector<Double_t> mDiff_;
497 
499  std::vector<Double_t> mSq_;
501  std::vector<Double_t> mSqMin_;
503  std::vector<Double_t> mSqMax_;
505  std::vector<Double_t> mSqDiff_;
506 
508  const Double_t mDTot_;
510  const Double_t massInt_;
512  const Double_t mSqDTot_;
513 
515  Double_t m12_;
517  Double_t m23_;
519  Double_t m13_;
520 
522  Double_t m12Sq_;
524  Double_t m23Sq_;
526  Double_t m13Sq_;
527 
529  Double_t c12_;
531  Double_t c23_;
533  Double_t c13_;
534 
536  Double_t mPrime_;
538  Double_t thetaPrime_;
539 
541  mutable Double_t qi_;
543  mutable Double_t qk_;
544 
546  Double_t p1_12_;
548  Double_t p3_12_;
550  Double_t p2_23_;
552  Double_t p1_23_;
554  Double_t p1_13_;
556  Double_t p2_13_;
557 
559  Double_t p1_Parent_;
561  Double_t p2_Parent_;
563  Double_t p3_Parent_;
564 
566  Bool_t squareDP_;
568  Bool_t warnings_;
569 
570  ClassDef(LauKinematics,0)
571 };
572 
573 Double_t dal(Double_t* x, Double_t* par);
574 
575 #endif
Double_t p1_23_
Momentum of track 1 in 2-3 rest frame.
Double_t getm23Max() const
Get the m23 maximum defined as (mParent - m1)
Double_t getm13SqMin() const
Get the m13Sq minimum, (m1 + m3)^2.
const Double_t mParentSq_
Mass of parent particle squared.
Bool_t squareDP() const
Are the square Dalitz plot co-ordinates being calculated?
Double_t calcThirdMassSq(Double_t firstMassSq, Double_t secondMassSq) const
Calculate the third invariant mass square from the two provided (e.g. mjkSq from mijSq and mikSq) ...
Double_t getc23() const
Get the cosine of the helicity angle theta23.
void updateMassSq_m13(Double_t m13, Double_t c13)
Update the variables m12Sq_ and m23Sq_ given the invariant mass m13 and the cosine of the helicity an...
Double_t getm23SqMin() const
Get the m23Sq minimum, (m2 + m3)^2.
Double_t qi_
Momentum q of particle i.
void updateSqDPKinematics(Double_t mPrime, Double_t thetaPrime)
Update all kinematic quantities based on the square DP co-ordinates m&#39; and theta&#39;.
Double_t getp2_Parent() const
Get the momentum of the track 2 in parent rest frame.
std::vector< Double_t > mSqMin_
Vector of the minimum mijSq values.
Double_t getm23() const
Get the m23 invariant mass.
Bool_t withinDPLimits2(Double_t m13Sq, Double_t m23Sq) const
Check whether a given (m13Sq,m23Sq) point is within the kinematic limits of the Dalitz plot (alternat...
Double_t m23_
Invariant mass m23.
Double_t p2_Parent_
Momentum of track 2 in parent rest frame.
Double_t getmPrime() const
Get m&#39; value.
std::vector< Double_t > mass_
Vector of daughter particles masses.
Double_t getc13() const
Get the cosine of the helicity angle theta13.
const Double_t m1Sq_
Mass of particle 1 squared.
Double_t getm3() const
Get the m3 mass.
Double_t getp2_13() const
Get the momentum of the track 2 in 13 rest frame.
Double_t getm1() const
Get the m1 mass.
Double_t getm23SqMax() const
Get the m23Sq maximum, (mParent - m1)^2.
Double_t m13_
Invariant mass m13.
Double_t p1_13_
Momentum of track 1 in 1-3 rest frame.
void drawDPContour(Int_t orientation=1323, Int_t nbins=100)
Method to draw the Dalitz plot contours on the top of the histo previously drawn. ...
Bool_t warnings_
Enable/disable warning messages.
Double_t getp1_12() const
Get the momentum of the track 1 in 12 rest frame.
Double_t getm13Min() const
Get the m13 minimum defined as (m1 + m3)
Double_t getm13SqMax() const
Get the m13Sq maximum, (mParent - m2)^2.
Double_t getm23Sq() const
Get the m23 invariant mass square.
Double_t distanceFromDPCentre() const
Calculate the distance from the currently set (m13Sq, m23Sq) point to the centre of the Dalitz plot (...
const Double_t mDTot_
Sum of the daughter masses.
const Double_t mSqDTot_
Sum of the squares of the daughter masses.
Double_t getm12SqMin() const
Get the m12Sq minimum, (m1 + m2)^2.
std::vector< Double_t > mMin_
Vector of the minimum mij values.
Double_t getm13Max() const
Get the m13 maximum defined as (mParent - m2)
Double_t genm23Sq() const
Randomly generate the invariant mass squared m23Sq.
Double_t getp1_Parent() const
Get the momentum of the track 1 in parent rest frame.
Double_t getm12Min() const
Get the m12 minimum defined as (m1 + m2)
void calcm12Sq()
Calculate m12Sq from m13Sq and m23Sq.
Double_t p2_23_
Momentum of track 2 in 2-3 rest frame.
Double_t thetaPrime_
theta&#39; co-ordinate
std::vector< Double_t > mSqDiff_
Vector of the difference between the mSqMax and mSqMin.
void updateKinematics(Double_t m13Sq, Double_t m23Sq)
Update all kinematic quantities based on the DP co-ordinates m13Sq and m23Sq.
Double_t getm2() const
Get the m2 mass.
Double_t p2_13_
Momentum of track 2 in 1-3 rest frame.
void genFlatSqDP(Double_t &mPrime, Double_t &thetaPrime) const
Routine to generate events flat in the square Dalitz plot.
Double_t p1_Parent_
Momentum of track 1 in parent rest frame.
Double_t getm12Max() const
Get the m12 maximum defined as (mParent - m3)
void warningMessages(Bool_t boolean)
Enable/disable warning messages.
Double_t getp1_23() const
Get the momentum of the track 1 in 23 rest frame.
Double_t pCalc(Double_t energy, Double_t massSq) const
General method to calculate the momentum of a particle, given its energy and invariant mass squared...
const Double_t m3Sq_
Mass of particle 3 squared.
Double_t getc12() const
Get the cosine of the helicity angle theta12.
Bool_t withinSqDPLimits(Double_t mPrime, Double_t thetaPrime) const
Check whether a given (m&#39;,theta&#39;) point is within the kinematic limits of the Dalitz plot...
Double_t getm13() const
Get the m13 invariant mass.
Double_t mFromC(Double_t mijSq, Double_t cij, Double_t mij, Int_t i, Int_t j, Int_t k) const
General method to calculate mikSq given mijSq and cosHel_ij.
void flipAndUpdateKinematics()
Flips the DP variables m13^2 &lt;-&gt; m23^2 and recalculates all kinematic quantities. ...
Double_t getp1_13() const
Get the momentum of the track 1 in 13 rest frame.
void updateMassSq_m23(Double_t m23, Double_t c23)
Update the variables m12Sq_ and m13Sq_ given the invariant mass m23 and the cosine of the helicity an...
Double_t getm23Min() const
Get the m23 minimum defined as (m2 + m3)
std::vector< Double_t > mMax_
Vector of the maximum mij values.
Double_t getmParent() const
Get parent mass.
void updateSqDPMassSquares(Double_t mPrime, Double_t thetaPrime)
Update some kinematic quantities based on the square DP co-ordinates m&#39; and theta&#39;.
Double_t m13Sq_
Invariant mass m13 squared.
Double_t m12Sq_
Invariant mass m12 squared.
LauKinematics(Double_t m1, Double_t m2, Double_t m3, Double_t mParent, Bool_t calcSquareDPCoords=kFALSE)
Constructor.
Double_t qk_
Momentum q of particle k.
Double_t p3_Parent_
Momentum of track 3 in parent rest frame.
void updateMassSq_m12(Double_t m12, Double_t c12)
Update the variables m23Sq_ and m13Sq_ given the invariant mass m12 and the cosine of the helicity an...
const Double_t m3_
Mass of particle 3.
Double_t genm13Sq() const
Randomly generate the invariant mass squared m13Sq.
Double_t getm12Sq() const
Get the m12 invariant mass square.
Double_t getp3_12() const
Get the momentum of the track 3 in 12 rest frame.
std::vector< Double_t > mSqMax_
Vector of the maximum mijSq values.
Double_t c23_
Cosine of the helicity angle theta23, which is defined as the angle between 1&amp;2 in the rest frame of ...
const Double_t massInt_
Mass difference between the parent particle and the sum of the daughter particles.
Double_t dal(Double_t *x, Double_t *par)
Double_t getm13Sq() const
Get the m13 invariant mass square.
void calcParentFrameMomenta()
Calculate the momenta of each daughter in the parent rest frame.
std::vector< Double_t > mDiff_
Vector of the difference between the mMax and mMin.
Double_t getm12() const
Get the m12 invariant mass.
Double_t getDPBoxArea() const
Get the box area defined from the kinematic bounds.
Bool_t squareDP_
Should we calculate the square DP co-ordinates or not?
Double_t m12_
Invariant mass m12.
Double_t getp2_23() const
Get the momentum of the track 2 in 23 rest frame.
Double_t c12_
Cosine of the helicity angle theta12, which is defined as the angle between 1&amp;3 in the rest frame of ...
const Double_t mParent_
Mass of parent particle.
Double_t p3_12_
Momentum of track 3 in 1-2 rest frame.
Double_t getThetaPrime() const
Get theta&#39; value.
Double_t m23Sq_
Invariant mass m23 squared.
Double_t getm12SqMax() const
Get the m12Sq maximum, (mParent - m3)^2.
void genFlatPhaseSpace(Double_t &m13Sq, Double_t &m23Sq) const
Routine to generate events flat in phase-space.
virtual ~LauKinematics()
Destructor.
Class for calculating 3-body kinematic quantities.
Double_t genm12Sq() const
Randomly generate the invariant mass squared m12Sq.
const Double_t m2_
Mass of particle 2.
Double_t calcSqDPJacobian()
Calculate the Jacobian for the transformation m23^2, m13^2 -&gt; m&#39;, theta&#39; (square DP) ...
Double_t c13_
Cosine of the helicity angle theta13, which is defined as the angle between 1&amp;2 in the rest frame of ...
void calcHelicities()
Calculate cosines of the helicity angles, momenta of daughters and bachelor in various ij rest frames...
const Double_t m2Sq_
Mass of particle 2 squared.
Double_t cFromM(Double_t mijSq, Double_t mikSq, Double_t mij, Int_t i, Int_t j, Int_t k) const
General method to calculate the cos(helicity) variables from the masses of the particles.
Double_t p1_12_
Momentum of track 1 in 1-2 rest frame.
Double_t mPrime_
m&#39; co-ordinate
Double_t getmParentSq() const
Get parent mass squared.
Double_t getp3_Parent() const
Get the momentum of the track 3 in parent rest frame.
void updateMassSquares(Double_t m13Sq, Double_t m23Sq)
Update some kinematic quantities based on the DP co-ordinates m13Sq and m23Sq.
std::vector< Double_t > mSq_
Vector of daughter particles masses squared.
Bool_t withinDPLimits() const
Check whether the currently set (m13Sq,m23Sq) point is within the kinematic limits of the Dalitz plot...
void calcSqDPVars()
Calculate the m&#39; and theta&#39; variables for the square Dalitz plot.
const Double_t m1_
Mass of particle 1.