laura is hosted by Hepforge, IPPP Durham
Laura++  v3r1
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 
63  void updateKinematics(Double_t m13Sq, Double_t m23Sq);
64 
66 
72  void updateSqDPKinematics(Double_t mPrime, Double_t thetaPrime);
73 
75 
80  Double_t calcSqDPJacobian(const Double_t mPrime, const Double_t thPrime) const;
81 
83 
86  Double_t calcSqDPJacobian() const;
87 
89 
93  void genFlatPhaseSpace(Double_t& m13Sq, Double_t& m23Sq) const;
94 
96 
100  void genFlatSqDP(Double_t& mPrime, Double_t& thetaPrime) const;
101 
103 
113  Bool_t withinDPLimits(Double_t m13Sq, Double_t m23Sq) const;
114 
116 
126  Bool_t withinDPLimits2(Double_t m13Sq, Double_t m23Sq) const;
127 
129 
134  Bool_t withinSqDPLimits(Double_t mPrime, Double_t thetaPrime) const;
135 
137 
142  Double_t calcThirdMassSq(Double_t firstMassSq, Double_t secondMassSq) const;
143 
145 
148  Double_t distanceFromDPCentre() const;
149 
151 
154  Double_t distanceFromDPCentre(Double_t m13Sq, Double_t m23Sq) const;
155 
157 
160  inline Double_t getm12() const {return m12_;}
162 
165  inline Double_t getm23() const {return m23_;}
167 
170  inline Double_t getm13() const {return m13_;}
171 
173 
176  inline Double_t getm12Sq() const {return m12Sq_;}
178 
181  inline Double_t getm23Sq() const {return m23Sq_;}
183 
186  inline Double_t getm13Sq() const {return m13Sq_;}
187 
189 
193  inline Double_t getc12() const {return c12_;}
195 
199  inline Double_t getc23() const {return c23_;}
201 
205  inline Double_t getc13() const {return c13_;}
206 
208 
211  inline Double_t getmPrime() const {return mPrime_;}
213 
216  inline Double_t getThetaPrime() const {return thetaPrime_;}
217 
219 
222  inline Double_t getmParent() const {return mParent_;}
224 
227  inline Double_t getmParentSq() const {return mParentSq_;}
228 
230 
236  inline Double_t getDPBoxArea() const {return (mSqMax_[1] - mSqMin_[1])*(mSqMax_[0] - mSqMin_[0]);}
237 
239 
243 
245 
249 
251 
254  inline Double_t getm1() const {return m1_;}
256 
259  inline Double_t getm2() const {return m2_;}
261 
264  inline Double_t getm3() const {return m3_;}
265 
267 
270  inline Double_t getm23Min() const {return TMath::Sqrt(mSqMin_[0]);}
272 
275  inline Double_t getm13Min() const {return TMath::Sqrt(mSqMin_[1]);}
277 
280  inline Double_t getm12Min() const {return TMath::Sqrt(mSqMin_[2]);}
281 
283 
286  inline Double_t getm23Max() const {return TMath::Sqrt(mSqMax_[0]);}
288 
291  inline Double_t getm13Max() const {return TMath::Sqrt(mSqMax_[1]);}
293 
296  inline Double_t getm12Max() const {return TMath::Sqrt(mSqMax_[2]);}
297 
299 
302  inline Double_t getm23SqMin() const {return mSqMin_[0];}
304 
307  inline Double_t getm13SqMin() const {return mSqMin_[1];}
309 
312  inline Double_t getm12SqMin() const {return mSqMin_[2];}
313 
315 
318  inline Double_t getm23SqMax() const {return mSqMax_[0];}
320 
323  inline Double_t getm13SqMax() const {return mSqMax_[1];}
325 
328  inline Double_t getm12SqMax() const {return mSqMax_[2];}
329 
331 
334  inline Double_t getp1_12() const {return p1_12_;}
336 
339  inline Double_t getp3_12() const {return p3_12_;}
341 
344  inline Double_t getp2_23() const {return p2_23_;}
346 
349  inline Double_t getp1_23() const {return p1_23_;}
351 
354  inline Double_t getp1_13() const {return p1_13_;}
356 
359  inline Double_t getp2_13() const {return p2_13_;}
360 
362 
365  inline Double_t getp1_Parent() const {return p1_Parent_;}
367 
370  inline Double_t getp2_Parent() const {return p2_Parent_;}
372 
375  inline Double_t getp3_Parent() const {return p3_Parent_;}
376 
378 
382  void drawDPContour(Int_t orientation = 1323, Int_t nbins = 100);
383 
384  protected:
386 
390  void updateMassSq_m12(Double_t m12, Double_t c12);
392 
396  void updateMassSq_m23(Double_t m23, Double_t c23);
398 
402  void updateMassSq_m13(Double_t m13, Double_t c13);
403 
405 
411  void updateMassSquares(Double_t m13Sq, Double_t m23Sq);
412 
414 
420  void updateSqDPMassSquares(Double_t mPrime, Double_t thetaPrime);
421 
423 
432  Double_t cFromM(Double_t mijSq, Double_t mikSq, Double_t mij, Int_t i, Int_t j, Int_t k) const;
433 
435 
444  Double_t mFromC(Double_t mijSq, Double_t cij, Double_t mij, Int_t i, Int_t j, Int_t k) const;
445 
447 
452  Double_t pCalc(Double_t energy, Double_t massSq) const;
453 
455 
458  Double_t genm13Sq() const;
460 
463  Double_t genm23Sq() const;
465 
468  Double_t genm12Sq() const;
469 
471  void calcm12Sq();
472 
474  void calcHelicities();
475 
477  void calcSqDPVars();
478 
480  void calcParentFrameMomenta();
481 
482  private:
484  LauKinematics(const LauKinematics& rhs);
485 
488 
490  const Double_t m1_;
492  const Double_t m2_;
494  const Double_t m3_;
496  const Double_t mParent_;
497 
499  const Double_t m1Sq_;
501  const Double_t m2Sq_;
503  const Double_t m3Sq_;
505  const Double_t mParentSq_;
506 
508  std::vector<Double_t> mass_;
510  std::vector<Double_t> mMin_;
512  std::vector<Double_t> mMax_;
514  std::vector<Double_t> mDiff_;
515 
517  std::vector<Double_t> mSq_;
519  std::vector<Double_t> mSqMin_;
521  std::vector<Double_t> mSqMax_;
523  std::vector<Double_t> mSqDiff_;
524 
526  const Double_t mDTot_;
528  const Double_t massInt_;
530  const Double_t mSqDTot_;
531 
533  Double_t m12_;
535  Double_t m23_;
537  Double_t m13_;
538 
540  Double_t m12Sq_;
542  Double_t m23Sq_;
544  Double_t m13Sq_;
545 
547  Double_t c12_;
549  Double_t c23_;
551  Double_t c13_;
552 
554  Double_t mPrime_;
556  Double_t thetaPrime_;
557 
559  mutable Double_t qi_;
561  mutable Double_t qk_;
562 
564  Double_t p1_12_;
566  Double_t p3_12_;
568  Double_t p2_23_;
570  Double_t p1_23_;
572  Double_t p1_13_;
574  Double_t p2_13_;
575 
577  Double_t p1_Parent_;
579  Double_t p2_Parent_;
581  Double_t p3_Parent_;
582 
584  Bool_t squareDP_;
586  Bool_t warnings_;
587 
588  ClassDef(LauKinematics,0)
589 };
590 
591 Double_t dal(Double_t* x, Double_t* par);
592 
593 #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.
LauKinematics & operator=(const LauKinematics &rhs)
Copy assignment operator (not implemented)
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.
Double_t calcSqDPJacobian() const
Calculate the Jacobian for the transformation m23^2, m13^2 -&gt; m&#39;, theta&#39; (square DP) at the currently ...
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.
Bool_t withinDPLimits(Double_t m13Sq, Double_t m23Sq) const
Check whether a given (m13Sq,m23Sq) point is within the kinematic limits of the Dalitz plot...
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...
void rotateAndUpdateKinematics()
Cyclically rotates the DP variables (m12 -&gt; m23, m23 -&gt; m13, m13 -&gt; m12) and recalculates all kinemat...
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 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.
void calcSqDPVars()
Calculate the m&#39; and theta&#39; variables for the square Dalitz plot.
const Double_t m1_
Mass of particle 1.