CbmRoot
PairAnalysisPairLV.h
Go to the documentation of this file.
1 #ifndef PAIRANALYSISPAIRLV_H
2 #define PAIRANALYSISPAIRLV_H
3 
4 //#############################################################
5 //# #
6 //# PairAnalysisPairLV #
7 //# Class to store pair information #
8 //# #
9 //# #
10 //# Authors: #
11 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
12 //# #
13 //#############################################################
14 
15 #include <TLorentzVector.h>
16 #include <TMath.h>
17 
18 #include "PairAnalysisPair.h"
19 #include "PairAnalysisTrack.h"
21 
22 class CbmVertex;
23 class CbmMCTrack;
24 
26 public:
28  virtual ~PairAnalysisPairLV();
30 
31  PairAnalysisPairLV(PairAnalysisTrack* const particle1,
32  Int_t pid1,
33  PairAnalysisTrack* const particle2,
34  Int_t pid2,
35  Char_t type);
36 
37  void SetTracks(PairAnalysisTrack* const particle1,
38  Int_t pid1,
39  PairAnalysisTrack* const particle2,
40  Int_t pid2);
41 
42  void SetMCTracks(const CbmMCTrack* const particle1,
43  const CbmMCTrack* const particle2);
44 
45 
46  // kinematics
47  virtual Double_t Px() const { return fPair.Px(); }
48  virtual Double_t Py() const { return fPair.Py(); }
49  virtual Double_t Pz() const { return fPair.Pz(); }
50  virtual Double_t Pt() const { return fPair.Pt(); }
51  virtual Double_t P() const { return fPair.P(); }
52  virtual Bool_t PxPyPz(Double_t p[3]) const {
53  p[0] = Px();
54  p[1] = Py();
55  p[2] = Pz();
56  return kTRUE;
57  }
58 
59  virtual Double_t Xv() const { return fPairPos.X(); }
60  virtual Double_t Yv() const { return fPairPos.Y(); }
61  virtual Double_t Zv() const { return fPairPos.Z(); }
62  virtual Bool_t XvYvZv(Double_t x[3]) const {
63  x[0] = Xv();
64  x[1] = Yv();
65  x[2] = Zv();
66  return kTRUE;
67  }
68 
69  virtual Double_t OneOverPt() const {
70  return Pt() > 0. ? 1. / Pt() : 0.;
71  } //TODO: check
72  virtual Double_t Phi() const { return fPair.Phi(); }
73  virtual Double_t Theta() const {
74  return Pz() != 0 ? TMath::ATan(Pt() / Pz()) : 0.;
75  } //TODO: check
76 
77 
78  virtual Double_t E() const { return fPair.E(); }
79  virtual Double_t M() const { return fPair.M(); }
80 
81  // virtual Double_t Eta() const { return fPair.Eta();}
82  virtual Double_t Y() const { return fPair.Rapidity(); }
83 
84  // virtual Int_t Charge() const {return fCharge; }
85 
86  //inter leg information
87  Double_t GetR() const { return fPairPos.Vect().Perp(); }
88  Double_t OpeningAngle() const { return fD1.Angle(fD2.Vect()); }
89  Double_t DeltaEta() const { return TMath::Abs(fD1.Eta() - fD2.Eta()); }
90  Double_t DeltaPhi() const { return fD1.DeltaPhi(fD2); }
91  Double_t DaughtersP() const { return fD1.P() * fD2.P(); }
92 
93  // calculate cos(theta*) and phi* in HE and CS pictures
94  void GetThetaPhiCM(Double_t& thetaHE,
95  Double_t& phiHE,
96  Double_t& thetaCS,
97  Double_t& phiCS) const;
98 
99  Double_t
100  PsiPair(Double_t MagField) const; //Angle cut w.r.t. to magnetic field
101  Double_t PhivPair(
102  Double_t MagField) const; //Angle of ee plane w.r.t. to magnetic field
103 
104  Double_t GetArmAlpha() const;
105  Double_t GetArmPt() const;
106 
107  // internal Lorentz vector particle
108  const TLorentzVector& GetLVParticle() const { return fPair; }
109  const TLorentzVector& GetLVFirstDaughter() const { return fD1; }
110  const TLorentzVector& GetLVSecondDaughter() const { return fD2; }
111 
112  // rotations
113  virtual void RotateTrack(PairAnalysisTrackRotator* rot);
114 
115 private:
116  TLorentzVector fPairPos; // lorentz vector position
117  TLorentzVector fPair; // lorentz vector internaly used for pair calculation
118  TLorentzVector fD1; // lorentz vector first daughter
119  TLorentzVector fD2; // lorentz vector second daughter
120 
121  ClassDef(PairAnalysisPairLV, 2) // Lorentz vector pairs
122 };
123 
124 #endif
PairAnalysisPairLV::SetTracks
void SetTracks(PairAnalysisTrack *const particle1, Int_t pid1, PairAnalysisTrack *const particle2, Int_t pid2)
Definition: PairAnalysisPairLV.cxx:68
PairAnalysisPairLV::fPair
TLorentzVector fPair
Definition: PairAnalysisPairLV.h:117
PairAnalysisPairLV::PxPyPz
virtual Bool_t PxPyPz(Double_t p[3]) const
Definition: PairAnalysisPairLV.h:52
PairAnalysisPairLV::GetArmAlpha
Double_t GetArmAlpha() const
Definition: PairAnalysisPairLV.cxx:238
PairAnalysisPairLV::PsiPair
Double_t PsiPair(Double_t MagField) const
Definition: PairAnalysisPairLV.cxx:171
PairAnalysisPairLV::DaughtersP
Double_t DaughtersP() const
Definition: PairAnalysisPairLV.h:91
PairAnalysisPairLV::Phi
virtual Double_t Phi() const
Definition: PairAnalysisPairLV.h:72
PairAnalysisPairLV::P
virtual Double_t P() const
Definition: PairAnalysisPairLV.h:51
PairAnalysisPairLV::DeltaEta
Double_t DeltaEta() const
Definition: PairAnalysisPairLV.h:89
PairAnalysisPairLV::Theta
virtual Double_t Theta() const
Definition: PairAnalysisPairLV.h:73
PairAnalysisPairLV::Y
virtual Double_t Y() const
Definition: PairAnalysisPairLV.h:82
PairAnalysisTrackRotator
Definition: PairAnalysisTrackRotator.h:17
PairAnalysisTrackRotator.h
PairAnalysisTrack
Definition: PairAnalysisTrack.h:37
PairAnalysisPairLV::Zv
virtual Double_t Zv() const
Definition: PairAnalysisPairLV.h:61
PairAnalysisPair
Definition: PairAnalysisPair.h:25
PairAnalysisPairLV::GetR
Double_t GetR() const
Definition: PairAnalysisPairLV.h:87
PairAnalysisPairLV::PhivPair
Double_t PhivPair(Double_t MagField) const
Definition: PairAnalysisPairLV.cxx:267
PairAnalysisPairLV::GetThetaPhiCM
void GetThetaPhiCM(Double_t &thetaHE, Double_t &phiHE, Double_t &thetaCS, Double_t &phiCS) const
Definition: PairAnalysisPairLV.cxx:154
PairAnalysisPairLV::fD2
TLorentzVector fD2
Definition: PairAnalysisPairLV.h:119
PairAnalysisPairLV::OpeningAngle
Double_t OpeningAngle() const
Definition: PairAnalysisPairLV.h:88
PairAnalysisPairLV::XvYvZv
virtual Bool_t XvYvZv(Double_t x[3]) const
Definition: PairAnalysisPairLV.h:62
PairAnalysisPairLV::M
virtual Double_t M() const
Definition: PairAnalysisPairLV.h:79
CbmVertex
Definition: CbmVertex.h:26
PairAnalysisPairLV::GetLVFirstDaughter
const TLorentzVector & GetLVFirstDaughter() const
Definition: PairAnalysisPairLV.h:109
PairAnalysisPairLV
Definition: PairAnalysisPairLV.h:25
PairAnalysisPairLV::Px
virtual Double_t Px() const
Definition: PairAnalysisPairLV.h:47
PairAnalysisPairLV::Xv
virtual Double_t Xv() const
Definition: PairAnalysisPairLV.h:59
PairAnalysisPairLV::GetLVSecondDaughter
const TLorentzVector & GetLVSecondDaughter() const
Definition: PairAnalysisPairLV.h:110
PairAnalysisPairLV::Pt
virtual Double_t Pt() const
Definition: PairAnalysisPairLV.h:50
PairAnalysisPairLV::GetArmPt
Double_t GetArmPt() const
Definition: PairAnalysisPairLV.cxx:255
PairAnalysisTrack.h
PairAnalysisPairLV::E
virtual Double_t E() const
Definition: PairAnalysisPairLV.h:78
CbmMCTrack
Definition: CbmMCTrack.h:34
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
PairAnalysisPairLV::RotateTrack
virtual void RotateTrack(PairAnalysisTrackRotator *rot)
Definition: PairAnalysisPairLV.cxx:327
PairAnalysisPairLV::fD1
TLorentzVector fD1
Definition: PairAnalysisPairLV.h:118
PairAnalysisPair.h
PairAnalysisPairLV::~PairAnalysisPairLV
virtual ~PairAnalysisPairLV()
Definition: PairAnalysisPairLV.cxx:61
PairAnalysisPairLV::DeltaPhi
Double_t DeltaPhi() const
Definition: PairAnalysisPairLV.h:90
PairAnalysisPairLV::Py
virtual Double_t Py() const
Definition: PairAnalysisPairLV.h:48
PairAnalysisPairLV::fPairPos
TLorentzVector fPairPos
Definition: PairAnalysisPairLV.h:116
PairAnalysisPairLV::Pz
virtual Double_t Pz() const
Definition: PairAnalysisPairLV.h:49
PairAnalysisPairLV::PairAnalysisPairLV
PairAnalysisPairLV()
PairAnalysisPairLV::Yv
virtual Double_t Yv() const
Definition: PairAnalysisPairLV.h:60
PairAnalysisPairLV::SetMCTracks
void SetMCTracks(const CbmMCTrack *const particle1, const CbmMCTrack *const particle2)
Definition: PairAnalysisPairLV.cxx:126
PairAnalysisPairLV::GetLVParticle
const TLorentzVector & GetLVParticle() const
Definition: PairAnalysisPairLV.h:108
PairAnalysisPairLV::OneOverPt
virtual Double_t OneOverPt() const
Definition: PairAnalysisPairLV.h:69