laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauKinematics.hh
Go to the documentation of this file.
1 
2 /*
3 Copyright 2004 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
37 #ifndef LAU_KINEMATICS
38 #define LAU_KINEMATICS
39 
40 #include "Rtypes.h"
41 #include "TMath.h"
42 
43 #include <vector>
44 
46 
47  public:
49 
58  LauKinematics( const Double_t m1,
59  const Double_t m2,
60  const Double_t m3,
61  const Double_t mParent,
62  const Bool_t calcSquareDPCoords = kFALSE,
63  const Bool_t symmetricalDP = kFALSE,
64  const Bool_t fullySymmetricDP = kFALSE );
65 
67  virtual ~LauKinematics();
68 
70 
73  inline void squareDP( const Bool_t calcSquareDPCoords ) { squareDP_ = calcSquareDPCoords; }
74 
76 
79  inline Bool_t squareDP() const { return squareDP_; }
80 
82 
85  inline Bool_t gotSymmetricalDP() const { return ( symmetricalDP_ && ! fullySymmetricDP_ ); }
86 
88 
91  inline Bool_t gotFullySymmetricDP() const { return fullySymmetricDP_; }
92 
94  inline void warningMessages( const Bool_t boolean ) { warnings_ = boolean; }
95 
97 
103  void updateKinematics( const Double_t m13Sq, const Double_t m23Sq );
104 
106 
112  void updateSqDPKinematics( const Double_t mPrime, const Double_t thetaPrime );
113 
115 
119  void updateKinematicsFrom23( const Double_t m23, const Double_t c23 );
120 
122 
126  void updateKinematicsFrom13( const Double_t m13, const Double_t c13 );
127 
129 
133  void updateKinematicsFrom12( const Double_t m12, const Double_t c12 );
134 
136 
141  Double_t calcSqDPJacobian( const Double_t mPrime, const Double_t thPrime ) const;
142 
144 
147  Double_t calcSqDPJacobian() const;
148 
150 
154  void genFlatPhaseSpace( Double_t& m13Sq, Double_t& m23Sq ) const;
155 
157 
161  void genFlatSqDP( Double_t& mPrime, Double_t& thetaPrime ) const;
162 
164 
174  Bool_t withinDPLimits( const Double_t m13Sq, const Double_t m23Sq ) const;
175 
177 
187  Bool_t withinDPLimits2( const Double_t m13Sq, const Double_t m23Sq ) const;
188 
190 
195  Bool_t withinSqDPLimits( const Double_t mPrime, const Double_t thetaPrime ) const;
196 
198 
203  Double_t calcThirdMassSq( const Double_t firstMassSq, const Double_t secondMassSq ) const;
204 
206 
209  Double_t distanceFromDPCentre() const;
210 
212 
215  Double_t distanceFromDPCentre( const Double_t m13Sq, const Double_t m23Sq ) const;
216 
218 
221  inline Double_t getm12() const { return m12_; }
222 
224 
227  inline Double_t getm23() const { return m23_; }
228 
230 
233  inline Double_t getm13() const { return m13_; }
234 
236 
239  inline Double_t getm12Sq() const { return m12Sq_; }
240 
242 
245  inline Double_t getm23Sq() const { return m23Sq_; }
246 
248 
251  inline Double_t getm13Sq() const { return m13Sq_; }
252 
254 
259  inline Double_t getc12() const { return c12_; }
260 
262 
267  inline Double_t getc23() const { return c23_; }
268 
270 
275  inline Double_t getc13() const { return c13_; }
276 
278 
281  inline Double_t getmPrime() const { return mPrime_; }
282 
284 
287  inline Double_t getThetaPrime() const { return thetaPrime_; }
288 
290 
293  inline Double_t getmParent() const { return mParent_; }
294 
296 
299  inline Double_t getmParentSq() const { return mParentSq_; }
300 
302 
308  inline Double_t getDPBoxArea() const
309  {
310  return ( mSqMax_[1] - mSqMin_[1] ) * ( mSqMax_[0] - mSqMin_[0] );
311  }
312 
314 
318 
320 
324 
326 
329  inline Double_t getm1() const { return m1_; }
330 
332 
335  inline Double_t getm2() const { return m2_; }
336 
338 
341  inline Double_t getm3() const { return m3_; }
342 
344 
347  inline Double_t getm23Min() const { return TMath::Sqrt( mSqMin_[0] ); }
348 
350 
353  inline Double_t getm13Min() const { return TMath::Sqrt( mSqMin_[1] ); }
354 
356 
359  inline Double_t getm12Min() const { return TMath::Sqrt( mSqMin_[2] ); }
360 
362 
365  inline Double_t getm23Max() const { return TMath::Sqrt( mSqMax_[0] ); }
366 
368 
371  inline Double_t getm13Max() const { return TMath::Sqrt( mSqMax_[1] ); }
372 
374 
377  inline Double_t getm12Max() const { return TMath::Sqrt( mSqMax_[2] ); }
378 
380 
383  inline Double_t getm23SqMin() const { return mSqMin_[0]; }
384 
386 
389  inline Double_t getm13SqMin() const { return mSqMin_[1]; }
390 
392 
395  inline Double_t getm12SqMin() const { return mSqMin_[2]; }
396 
398 
401  inline Double_t getm23SqMax() const { return mSqMax_[0]; }
402 
404 
407  inline Double_t getm13SqMax() const { return mSqMax_[1]; }
408 
410 
413  inline Double_t getm12SqMax() const { return mSqMax_[2]; }
414 
416 
419  inline Double_t getp1_12() const { return p1_12_; }
420 
422 
425  inline Double_t getp3_12() const { return p3_12_; }
426 
428 
431  inline Double_t getp2_23() const { return p2_23_; }
432 
434 
437  inline Double_t getp1_23() const { return p1_23_; }
438 
440 
443  inline Double_t getp1_13() const { return p1_13_; }
444 
446 
449  inline Double_t getp2_13() const { return p2_13_; }
450 
452 
455  inline Double_t getp1_Parent() const { return p1_Parent_; }
456 
458 
461  inline Double_t getp2_Parent() const { return p2_Parent_; }
462 
464 
467  inline Double_t getp3_Parent() const { return p3_Parent_; }
468 
470 
474  void drawDPContour( const Int_t orientation = 1323, const Int_t nbins = 100 );
475 
477 
480  inline Double_t getcov12() const
481  {
482  return ( mParentSq_ + m12Sq_ - m3Sq_ ) / ( 2. * mParent_ * m12_ );
483  }
484 
486 
489  inline Double_t getcov13() const
490  {
491  return ( mParentSq_ + m13Sq_ - m2Sq_ ) / ( 2. * mParent_ * m13_ );
492  }
493 
495 
498  inline Double_t getcov23() const
499  {
500  return ( mParentSq_ + m23Sq_ - m1Sq_ ) / ( 2. * mParent_ * m23_ );
501  }
502 
503  protected:
505 
509  void updateMassSq_m12( const Double_t m12, const Double_t c12 );
510 
512 
516  void updateMassSq_m23( const Double_t m23, const Double_t c23 );
517 
519 
523  void updateMassSq_m13( const Double_t m13, const Double_t c13 );
524 
526 
532  void updateMassSquares( const Double_t m13Sq, const Double_t m23Sq );
533 
535 
541  void updateSqDPMassSquares( const Double_t mPrime, const Double_t thetaPrime );
542 
544 
553  Double_t cFromM( const Double_t mijSq,
554  const Double_t mikSq,
555  const Double_t mij,
556  const Int_t i,
557  const Int_t j,
558  const Int_t k ) const;
559 
561 
570  Double_t mFromC( const Double_t mijSq,
571  const Double_t cij,
572  const Double_t mij,
573  const Int_t i,
574  const Int_t j,
575  const Int_t k ) const;
576 
578 
583  Double_t pCalc( const Double_t energy, const Double_t massSq ) const;
584 
586 
589  Double_t genm13Sq() const;
591 
594  Double_t genm23Sq() const;
596 
599  Double_t genm12Sq() const;
600 
602  void calcm12Sq();
603 
605  void calcHelicities();
606 
608  void calcSqDPVars();
609 
611  void calcParentFrameMomenta();
612 
613  private:
616 
619 
621  const Bool_t symmetricalDP_;
623  const Bool_t fullySymmetricDP_;
624 
626  const Double_t m1_;
628  const Double_t m2_;
630  const Double_t m3_;
632  const Double_t mParent_;
633 
635  const Double_t m1Sq_;
637  const Double_t m2Sq_;
639  const Double_t m3Sq_;
641  const Double_t mParentSq_;
642 
644  std::vector<Double_t> mass_;
646  std::vector<Double_t> mMin_;
648  std::vector<Double_t> mMax_;
650  std::vector<Double_t> mDiff_;
651 
653  std::vector<Double_t> mSq_;
655  std::vector<Double_t> mSqMin_;
657  std::vector<Double_t> mSqMax_;
659  std::vector<Double_t> mSqDiff_;
660 
662  const Double_t mDTot_;
664  const Double_t massInt_;
666  const Double_t mSqDTot_;
667 
669  Double_t m12_;
671  Double_t m23_;
673  Double_t m13_;
674 
676  Double_t m12Sq_;
678  Double_t m23Sq_;
680  Double_t m13Sq_;
681 
683  Double_t c12_;
685  Double_t c23_;
687  Double_t c13_;
688 
690  Double_t mPrime_;
692  Double_t thetaPrime_;
693 
695  mutable Double_t qi_;
697  mutable Double_t qk_;
698 
700  Double_t p1_12_;
702  Double_t p3_12_;
704  Double_t p2_23_;
706  Double_t p1_23_;
708  Double_t p1_13_;
710  Double_t p2_13_;
711 
713  Double_t p1_Parent_;
715  Double_t p2_Parent_;
717  Double_t p3_Parent_;
718 
720  Bool_t squareDP_;
722  Bool_t warnings_;
723 
724  ClassDef( LauKinematics, 0 )
725 };
726 
727 #endif
Double_t getm23SqMax() const
Get the m23Sq maximum, (mParent - m1)^2.
void updateMassSq_m23(const Double_t m23, const Double_t c23)
Update the variables m12Sq_ and m13Sq_ given the invariant mass m23 and the cosine of the helicity an...
Double_t getm12Max() const
Get the m12 maximum defined as (mParent - m3)
Double_t qk_
Momentum q of particle k.
Double_t calcSqDPJacobian() const
Calculate the Jacobian for the transformation m23^2, m13^2 -> m', theta' (square DP) at the currently...
Double_t getm3() const
Get the m3 mass.
Double_t thetaPrime_
theta' co-ordinate
Double_t m12_
Invariant mass m12.
Double_t c12_
Cosine of the helicity angle theta12, which is defined as the angle between 1&3 in the rest frame of ...
std::vector< Double_t > mSqMax_
Vector of the maximum mijSq values.
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.
Double_t getc23() const
Get the cosine of the helicity angle theta23.
const Double_t mSqDTot_
Sum of the squares of the daughter masses.
const Bool_t fullySymmetricDP_
Fully-symmetrical DP.
Double_t getm12Sq() const
Get the m12 invariant mass square.
Double_t getThetaPrime() const
Get theta' value.
std::vector< Double_t > mMax_
Vector of the maximum mij values.
Double_t getmPrime() const
Get m' value.
Double_t m23Sq_
Invariant mass m23 squared.
const Double_t m3Sq_
Mass of particle 3 squared.
Double_t distanceFromDPCentre() const
Calculate the distance from the currently set (m13Sq, m23Sq) point to the centre of the Dalitz plot (...
void updateSqDPMassSquares(const Double_t mPrime, const Double_t thetaPrime)
Update some kinematic quantities based on the square DP co-ordinates m' and theta'.
Bool_t withinDPLimits2(const Double_t m13Sq, const Double_t m23Sq) const
Check whether a given (m13Sq,m23Sq) point is within the kinematic limits of the Dalitz plot (alternat...
void flipAndUpdateKinematics()
Flips the DP variables m13^2 <-> m23^2 and recalculates all kinematic quantities.
std::vector< Double_t > mDiff_
Vector of the difference between the mMax and mMin.
Double_t mFromC(const Double_t mijSq, const Double_t cij, const Double_t mij, const Int_t i, const Int_t j, const Int_t k) const
General method to calculate mikSq given mijSq and cosHel_ij.
Double_t p2_13_
Momentum of track 2 in 1-3 rest frame.
Double_t genm12Sq() const
Randomly generate the invariant mass squared m12Sq.
const Double_t m2_
Mass of particle 2.
void calcSqDPVars()
Calculate the m' and theta' variables for the square Dalitz plot.
Double_t getm13Max() const
Get the m13 maximum defined as (mParent - m2)
const Double_t m2Sq_
Mass of particle 2 squared.
void genFlatSqDP(Double_t &mPrime, Double_t &thetaPrime) const
Routine to generate events flat in the square Dalitz plot.
const Double_t massInt_
Mass difference between the parent particle and the sum of the daughter particles.
Double_t getm2() const
Get the m2 mass.
Double_t p3_12_
Momentum of track 3 in 1-2 rest frame.
void updateKinematics(const Double_t m13Sq, const Double_t m23Sq)
Update all kinematic quantities based on the DP co-ordinates m13Sq and m23Sq.
Double_t m12Sq_
Invariant mass m12 squared.
Double_t genm23Sq() const
Randomly generate the invariant mass squared m23Sq.
void rotateAndUpdateKinematics()
Cyclically rotates the DP variables (m12 -> m23, m23 -> m13, m13 -> m12) and recalculates all kinemat...
const Bool_t symmetricalDP_
Symmetrical DP.
Double_t qi_
Momentum q of particle i.
Bool_t withinDPLimits(const Double_t m13Sq, const Double_t m23Sq) const
Check whether a given (m13Sq,m23Sq) point is within the kinematic limits of the Dalitz plot.
const Double_t mParent_
Mass of parent particle.
Double_t genm13Sq() const
Randomly generate the invariant mass squared m13Sq.
Bool_t squareDP_
Should we calculate the square DP co-ordinates or not?
void calcHelicities()
Calculate cosines of the helicity angles, momenta of daughters and bachelor in various ij rest frames...
std::vector< Double_t > mSqMin_
Vector of the minimum mijSq values.
Double_t mPrime_
m' co-ordinate
Double_t calcThirdMassSq(const Double_t firstMassSq, const Double_t secondMassSq) const
Calculate the third invariant mass square from the two provided (e.g. mjkSq from mijSq and mikSq)
Double_t getm12SqMin() const
Get the m12Sq minimum, (m1 + m2)^2.
Double_t getm23Max() const
Get the m23 maximum defined as (mParent - m1)
Double_t getp1_13() const
Get the momentum of the track 1 in 13 rest frame.
Double_t p3_Parent_
Momentum of track 3 in parent rest frame.
Double_t getc12() const
Get the cosine of the helicity angle theta12.
Double_t p2_Parent_
Momentum of track 2 in parent rest frame.
LauKinematics(const LauKinematics &rhs)
Copy constructor (not implemented)
Double_t getmParentSq() const
Get parent mass squared.
Double_t getm12Min() const
Get the m12 minimum defined as (m1 + m2)
std::vector< Double_t > mSq_
Vector of daughter particles masses squared.
Double_t getm13SqMax() const
Get the m13Sq maximum, (mParent - m2)^2.
Double_t pCalc(const Double_t energy, const Double_t massSq) const
General method to calculate the momentum of a particle, given its energy and invariant mass squared.
void updateKinematicsFrom13(const Double_t m13, const Double_t c13)
Update all kinematic quantities based on m13 and cos(theta13)
const Double_t mParentSq_
Mass of parent particle squared.
void drawDPContour(const Int_t orientation=1323, const Int_t nbins=100)
Method to draw the Dalitz plot contours on the top of the histo previously drawn.
Double_t c23_
Cosine of the helicity angle theta23, which is defined as the angle between 1&2 in the rest frame of ...
void updateKinematicsFrom12(const Double_t m12, const Double_t c12)
Update all kinematic quantities based on m12 and cos(theta12)
Double_t p1_23_
Momentum of track 1 in 2-3 rest frame.
LauKinematics & operator=(const LauKinematics &rhs)
Copy assignment operator (not implemented)
Double_t getm1() const
Get the m1 mass.
void squareDP(const Bool_t calcSquareDPCoords)
Enable/disable the calculation of square Dalitz plot co-ordinates.
Double_t p1_13_
Momentum of track 1 in 1-3 rest frame.
virtual ~LauKinematics()
Destructor.
void calcParentFrameMomenta()
Calculate the momenta of each daughter in the parent rest frame.
void updateMassSquares(const Double_t m13Sq, const Double_t m23Sq)
Update some kinematic quantities based on the DP co-ordinates m13Sq and m23Sq.
LauKinematics(const Double_t m1, const Double_t m2, const Double_t m3, const Double_t mParent, const Bool_t calcSquareDPCoords=kFALSE, const Bool_t symmetricalDP=kFALSE, const Bool_t fullySymmetricDP=kFALSE)
Constructor.
Double_t getm23Min() const
Get the m23 minimum defined as (m2 + m3)
Double_t getm23() const
Get the m23 invariant mass.
const Double_t m1_
Mass of particle 1.
Double_t getp1_12() const
Get the momentum of the track 1 in 12 rest frame.
Double_t getp2_23() const
Get the momentum of the track 2 in 23 rest frame.
Bool_t gotFullySymmetricDP() const
Is the DP fully symmetric?
Double_t getm23SqMin() const
Get the m23Sq minimum, (m2 + m3)^2.
Double_t p1_12_
Momentum of track 1 in 1-2 rest frame.
Double_t getcov12() const
Get covariant factor in 12 axis.
void warningMessages(const Bool_t boolean)
Enable/disable warning messages.
Double_t getm12() const
Get the m12 invariant mass.
Bool_t gotSymmetricalDP() const
Is the DP symmetric?
Double_t getcov13() const
Get covariant factor in 13 axis.
Bool_t warnings_
Enable/disable warning messages.
Double_t c13_
Cosine of the helicity angle theta13, which is defined as the angle between 1&2 in the rest frame of ...
void genFlatPhaseSpace(Double_t &m13Sq, Double_t &m23Sq) const
Routine to generate events flat in phase-space.
Double_t getm13() const
Get the m13 invariant mass.
void updateMassSq_m13(const Double_t m13, const Double_t c13)
Update the variables m12Sq_ and m23Sq_ given the invariant mass m13 and the cosine of the helicity an...
void updateMassSq_m12(const Double_t m12, const Double_t c12)
Update the variables m23Sq_ and m13Sq_ given the invariant mass m12 and the cosine of the helicity an...
Double_t getm13SqMin() const
Get the m13Sq minimum, (m1 + m3)^2.
Double_t getp3_12() const
Get the momentum of the track 3 in 12 rest frame.
Double_t m23_
Invariant mass m23.
Bool_t squareDP() const
Are the square Dalitz plot co-ordinates being calculated?
const Double_t mDTot_
Sum of the daughter masses.
Double_t p1_Parent_
Momentum of track 1 in parent rest frame.
Double_t cFromM(const Double_t mijSq, const Double_t mikSq, const Double_t mij, const Int_t i, const Int_t j, const Int_t k) const
General method to calculate the cos(helicity) variables from the masses of the particles.
void updateSqDPKinematics(const Double_t mPrime, const Double_t thetaPrime)
Update all kinematic quantities based on the square DP co-ordinates m' and theta'.
Double_t getp2_Parent() const
Get the momentum of the track 2 in parent rest frame.
std::vector< Double_t > mMin_
Vector of the minimum mij values.
Class for calculating 3-body kinematic quantities.
Double_t getp1_Parent() const
Get the momentum of the track 1 in parent rest frame.
Double_t p2_23_
Momentum of track 2 in 2-3 rest frame.
std::vector< Double_t > mass_
Vector of daughter particles masses.
Double_t getm12SqMax() const
Get the m12Sq maximum, (mParent - m3)^2.
Double_t getp3_Parent() const
Get the momentum of the track 3 in parent rest frame.
Double_t getm13Min() const
Get the m13 minimum defined as (m1 + m3)
Double_t getcov23() const
Get covariant factor in 23 axis.
Double_t getmParent() const
Get parent mass.
void calcm12Sq()
Calculate m12Sq from m13Sq and m23Sq.
Double_t getm23Sq() const
Get the m23 invariant mass square.
std::vector< Double_t > mSqDiff_
Vector of the difference between the mSqMax and mSqMin.
Double_t m13Sq_
Invariant mass m13 squared.
void updateKinematicsFrom23(const Double_t m23, const Double_t c23)
Update all kinematic quantities based on m23 and cos(theta23)
Double_t getm13Sq() const
Get the m13 invariant mass square.
Double_t getDPBoxArea() const
Get the box area defined from the kinematic bounds.
const Double_t m1Sq_
Mass of particle 1 squared.
const Double_t m3_
Mass of particle 3.
Double_t getp1_23() const
Get the momentum of the track 1 in 23 rest frame.
Double_t m13_
Invariant mass m13.
Bool_t withinSqDPLimits(const Double_t mPrime, const Double_t thetaPrime) const
Check whether a given (m',theta') point is within the kinematic limits of the Dalitz plot.