CbmRoot
CbmLmvmKinematicParams.h
Go to the documentation of this file.
1 
7 #ifndef CBM_LMVM_KINEMATIC_PARAMS_H
8 #define CBM_LMVM_KINEMATIC_PARAMS_H
9 
10 #include "CbmLmvmCandidate.h"
11 #include "CbmMCTrack.h"
12 #include "TLorentzVector.h"
13 #include "TMath.h"
14 
15 #define M2E 2.6112004954086e-7
16 
18 public:
19  Double_t fMomentumMag; // Absolute value of momentum
20  Double_t fPt; // Transverse momentum
21  Double_t fRapidity; // Rapidity
22  Double_t fMinv; // Invariant mass
23  Double_t fAngle; // Opening angle
24 
25  /*
26  * Calculate kinematic parameters for MC tracks.
27  */
30  const CbmMCTrack* mctrackM) {
32 
33  TVector3 momP; //momentum e+
34  mctrackP->GetMomentum(momP);
35  Double_t energyP = TMath::Sqrt(momP.Mag2() + M2E);
36  TLorentzVector lorVecP(momP, energyP);
37 
38  TVector3 momM; //momentum e-
39  mctrackM->GetMomentum(momM);
40  Double_t energyM = TMath::Sqrt(momM.Mag2() + M2E);
41  TLorentzVector lorVecM(momM, energyM);
42 
43  TVector3 momPair = momP + momM;
44  Double_t energyPair = energyP + energyM;
45  Double_t ptPair = momPair.Perp();
46  Double_t pzPair = momPair.Pz();
47  Double_t yPair =
48  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
49  Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
50  Double_t theta = 180. * anglePair / TMath::Pi();
51  Double_t minv =
52  2. * TMath::Sin(anglePair / 2.) * TMath::Sqrt(momM.Mag() * momP.Mag());
53 
54  params.fMomentumMag = momPair.Mag();
55  params.fPt = ptPair;
56  params.fRapidity = yPair;
57  params.fMinv = minv;
58  params.fAngle = theta;
59  return params;
60  }
61 
62  /*
63  * Calculate kinematic parameters for LMVM candidates.
64  */
67  const CbmLmvmCandidate* candM) {
69 
70  TLorentzVector lorVecP(candP->fMomentum, candP->fEnergy);
71  TLorentzVector lorVecM(candM->fMomentum, candM->fEnergy);
72 
73  TVector3 momPair = candP->fMomentum + candM->fMomentum;
74  Double_t energyPair = candP->fEnergy + candM->fEnergy;
75  Double_t ptPair = momPair.Perp();
76  Double_t pzPair = momPair.Pz();
77  Double_t yPair =
78  0.5 * TMath::Log((energyPair + pzPair) / (energyPair - pzPair));
79  Double_t anglePair = lorVecM.Angle(lorVecP.Vect());
80  Double_t theta = 180. * anglePair / TMath::Pi();
81  Double_t minv =
82  2. * TMath::Sin(anglePair / 2.)
83  * TMath::Sqrt(candM->fMomentum.Mag() * candP->fMomentum.Mag());
84 
85  params.fMomentumMag = momPair.Mag();
86  params.fPt = ptPair;
87  params.fRapidity = yPair;
88  params.fMinv = minv;
89  params.fAngle = theta;
90  return params;
91  }
92 };
93 
94 #endif
CbmMCTrack::GetMomentum
void GetMomentum(TVector3 &momentum) const
Definition: CbmMCTrack.h:172
CbmLmvmCandidate
Definition: CbmLmvmCandidate.h:11
CbmLmvmCandidate.h
CbmLmvmCandidate::fEnergy
Double_t fEnergy
Definition: CbmLmvmCandidate.h:64
CbmLmvmKinematicParams::fMinv
Double_t fMinv
Definition: CbmLmvmKinematicParams.h:22
CbmLmvmKinematicParams::KinematicParamsWithMcTracks
static CbmLmvmKinematicParams KinematicParamsWithMcTracks(const CbmMCTrack *mctrackP, const CbmMCTrack *mctrackM)
Definition: CbmLmvmKinematicParams.h:29
CbmLmvmKinematicParams::fRapidity
Double_t fRapidity
Definition: CbmLmvmKinematicParams.h:21
xMath::Pi
double Pi()
Definition: xMath.h:5
CbmLmvmCandidate::fMomentum
TVector3 fMomentum
Definition: CbmLmvmCandidate.h:62
CbmMCTrack.h
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmLmvmKinematicParams::KinematicParamsWithCandidates
static CbmLmvmKinematicParams KinematicParamsWithCandidates(const CbmLmvmCandidate *candP, const CbmLmvmCandidate *candM)
Definition: CbmLmvmKinematicParams.h:66
CbmLmvmKinematicParams::fMomentumMag
Double_t fMomentumMag
Definition: CbmLmvmKinematicParams.h:19
M2E
#define M2E
Definition: CbmLmvmKinematicParams.h:15
CbmLmvmKinematicParams
Definition: CbmLmvmKinematicParams.h:17
CbmLmvmKinematicParams::fPt
Double_t fPt
Definition: CbmLmvmKinematicParams.h:20
CbmLmvmKinematicParams::fAngle
Double_t fAngle
Definition: CbmLmvmKinematicParams.h:23