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