CbmRoot
PairAnalysisTrack.h
Go to the documentation of this file.
1 #ifndef PAIRANALYSISTRACK_H
2 #define PAIRANALYSISTRACK_H
3 
4 //#############################################################
5 //# #
6 //# Class PairAnalysisTrack #
7 //# Class for management of the gobal track #
8 //# #
9 //# Authors: #
10 //# Julian Book, Uni Ffm / Julian.Book@cern.ch #
11 //# #
12 //#############################################################
13 
14 #include <TLorentzVector.h>
15 #include <TNamed.h>
16 
17 #include "CbmDefs.h"
18 //#include "CbmTrackMatchNew.h"
19 
20 class FairTrackParam;
21 class CbmTrack;
22 class CbmGlobalTrack;
23 class CbmStsTrack;
24 class CbmMuchTrack;
25 class CbmTrdTrack;
26 class CbmRichRing;
27 class CbmTofHit;
28 class CbmMCTrack;
29 class CbmTrackMatchNew;
30 class CbmKFVertex;
31 
32 class TParticle;
33 //class TObjArray;
34 //class TProcessID;
35 //class FairRootManager;
36 
37 class PairAnalysisTrack : public TNamed {
38 public:
40  PairAnalysisTrack(const char* name, const char* title);
42  CbmGlobalTrack* gtrk,
43  CbmStsTrack* ststrk,
44  CbmMuchTrack* muchtrk,
45  CbmTrdTrack* trdtrk,
46  CbmRichRing* richring,
47  CbmTofHit* tofhit,
48  CbmMCTrack* mctrk,
49  CbmTrackMatchNew* stsmatch,
50  CbmTrackMatchNew* muchmatch,
51  CbmTrackMatchNew* trdMatch,
52  CbmTrackMatchNew* richMatch,
53  FairTrackParam* richproj,
54  Int_t gIndex);
55  PairAnalysisTrack(TParticle* fastTrk, CbmMCTrack* mctrk);
56 
57  virtual ~PairAnalysisTrack();
59 
60  // setter
61  void SetPdgCode(Int_t pdg) { fPdgCode = pdg; }
62  void SetLabel(Int_t lbl) { fLabel = lbl; }
63  void SetWeight(Double_t wght) { fWeight = wght; }
64  void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump);
65 
66  // track getters
67  TLorentzVector* GetPosition() { return &fPosition; }
68  TLorentzVector* GetMomentum() { return &fMomentum; }
70  Int_t GetGlobalIndex() const { return fGlblTrackIndex; }
71  CbmStsTrack* GetStsTrack() const { return fStsTrack; }
72  CbmMuchTrack* GetMuchTrack() const { return fMuchTrack; }
73  CbmTrdTrack* GetTrdTrack() const { return fTrdTrack; }
74  CbmRichRing* GetRichRing() const { return fRichRing; }
75  CbmTofHit* GetTofHit() const { return fTofHit; }
76  CbmTrack* GetTrack(ECbmModuleId det) const;
77 
78  FairTrackParam* GetRichProj() const { return fRichProj; }
79  FairTrackParam* GetMvdEntrance() const { return fMvdEntrance; }
80  // mc track
81  CbmMCTrack* GetMCTrack() const { return fMCTrack; }
83 
85  // default kinematics
86  Double_t Px() const { return fMomentum.Px(); }
87  Double_t Py() const { return fMomentum.Py(); }
88  Double_t Pz() const { return fMomentum.Pz(); }
89  Double_t Pt() const { return fMomentum.Pt(); }
90  Double_t P() const { return fMomentum.P(); }
91 
92  Double_t Xv() const { return fPosition.X(); }
93  Double_t Yv() const { return fPosition.Y(); }
94  Double_t Zv() const { return fPosition.Z(); }
95 
96  Double_t OneOverPt() const { return 1. / fMomentum.Pt(); }
97  Double_t Phi() const { return fMomentum.Phi(); }
98  Double_t Theta() const { return fMomentum.Theta(); }
99 
100  Double_t E() const { return fMomentum.Energy(); }
101  Double_t M() const { return fMomentum.M(); }
102 
103  // Double_t Eta() const { return fMomentum.Eta(); }
104  Double_t Y() const { return fMomentum.Rapidity(); }
105 
106  Double_t ChiToVertex() const { return fChi2Vtx; }
107  Short_t Charge() const { return fCharge; }
108  Int_t PdgCode() const { return fPdgCode; }
109  Int_t GetLabel() const { return fLabel; }
110  Double_t GetWeight() const { return fWeight; }
111 
112 private:
113  void Refit(Int_t pidHypo);
114  void CalculateChi2Vtx();
115 
116  CbmKFVertex* fPrimVertex = NULL; // primary vertex
117  CbmGlobalTrack* fGlblTrack = NULL; // global track
118  Int_t fGlblTrackIndex = -1; // global track
119  CbmStsTrack* fStsTrack = NULL; // sts track
120  CbmMuchTrack* fMuchTrack = NULL; // much track
121  CbmTrdTrack* fTrdTrack = NULL; // trd track
122  CbmRichRing* fRichRing = NULL; // rich ring
123  CbmTofHit* fTofHit = NULL; // tof hit
124 
125  CbmMCTrack* fMCTrack = NULL; // matched mc track
126  CbmTrackMatchNew* fStsTrackMatch = NULL; // sts track match
127  CbmTrackMatchNew* fMuchTrackMatch = NULL; // much track match
128  CbmTrackMatchNew* fTrdTrackMatch = NULL; // trd track match
129  CbmTrackMatchNew* fRichRingMatch = NULL; // rich ring match
130 
131  FairTrackParam* fRichProj = NULL; // rich ring projection
132  FairTrackParam* fMvdEntrance = NULL; // mvd entrance
133 
134  TLorentzVector fMomentum; // momentum vector
135  TLorentzVector fPosition; // position vector
136  Double_t fChi2Vtx = -1.; // chi2 to vertex in sigma
137  Short_t fCharge = 0; // charge
138  Int_t fPdgCode = 0; // pdg code
139  Int_t fLabel = -1; // MC label
140  Double_t fWeight = 1.; // weighting
141  Int_t fMultiMatch = 0; // MC label for n-times matched tracks
142 
143  Bool_t fFastTrack = kFALSE; // fast simulation track identifier
144 
146  ClassDef(PairAnalysisTrack, 6) // Track structure
147 };
148 
149 
150 #endif
PairAnalysisTrack::P
Double_t P() const
Definition: PairAnalysisTrack.h:90
PairAnalysisTrack::fCharge
Short_t fCharge
Definition: PairAnalysisTrack.h:137
PairAnalysisTrack::GetWeight
Double_t GetWeight() const
Definition: PairAnalysisTrack.h:110
PairAnalysisTrack::PairAnalysisTrack
PairAnalysisTrack()
PairAnalysisTrack::fMuchTrackMatch
CbmTrackMatchNew * fMuchTrackMatch
Definition: PairAnalysisTrack.h:127
PairAnalysisTrack::SetMassHypo
void SetMassHypo(Int_t pdg1, Int_t pdg2, Bool_t refitMassAssump)
Definition: PairAnalysisTrack.cxx:247
PairAnalysisTrack::Y
Double_t Y() const
Definition: PairAnalysisTrack.h:104
PairAnalysisTrack::~PairAnalysisTrack
virtual ~PairAnalysisTrack()
Definition: PairAnalysisTrack.cxx:207
PairAnalysisTrack::GetRichRing
CbmRichRing * GetRichRing() const
Definition: PairAnalysisTrack.h:74
PairAnalysisTrack::M
Double_t M() const
Definition: PairAnalysisTrack.h:101
PairAnalysisTrack::GetGlobalIndex
Int_t GetGlobalIndex() const
Definition: PairAnalysisTrack.h:70
PairAnalysisTrack::Zv
Double_t Zv() const
Definition: PairAnalysisTrack.h:94
PairAnalysisTrack::Charge
Short_t Charge() const
Definition: PairAnalysisTrack.h:107
PairAnalysisTrack::GetMCTrack
CbmMCTrack * GetMCTrack() const
Definition: PairAnalysisTrack.h:81
PairAnalysisTrack::GetMvdEntrance
FairTrackParam * GetMvdEntrance() const
Definition: PairAnalysisTrack.h:79
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmRichRing
Definition: CbmRichRing.h:17
PairAnalysisTrack
Definition: PairAnalysisTrack.h:37
PairAnalysisTrack::fLabel
Int_t fLabel
Definition: PairAnalysisTrack.h:139
PairAnalysisTrack::GetStsTrack
CbmStsTrack * GetStsTrack() const
Definition: PairAnalysisTrack.h:71
PairAnalysisTrack::GetTrack
CbmTrack * GetTrack(ECbmModuleId det) const
Definition: PairAnalysisTrack.cxx:231
PairAnalysisTrack::fMvdEntrance
FairTrackParam * fMvdEntrance
Definition: PairAnalysisTrack.h:132
PairAnalysisTrack::fTofHit
CbmTofHit * fTofHit
Definition: PairAnalysisTrack.h:123
PairAnalysisTrack::fRichRingMatch
CbmTrackMatchNew * fRichRingMatch
Definition: PairAnalysisTrack.h:129
PairAnalysisTrack::GetTofHit
CbmTofHit * GetTofHit() const
Definition: PairAnalysisTrack.h:75
CbmMuchTrack
Definition: CbmMuchTrack.h:16
PairAnalysisTrack::Pt
Double_t Pt() const
Definition: PairAnalysisTrack.h:89
PairAnalysisTrack::fStsTrackMatch
CbmTrackMatchNew * fStsTrackMatch
Definition: PairAnalysisTrack.h:126
PairAnalysisTrack::GetLabel
Int_t GetLabel() const
Definition: PairAnalysisTrack.h:109
PairAnalysisTrack::Xv
Double_t Xv() const
Definition: PairAnalysisTrack.h:92
PairAnalysisTrack::fPrimVertex
CbmKFVertex * fPrimVertex
Definition: PairAnalysisTrack.h:116
CbmTrack
Definition: CbmTrack.h:32
PairAnalysisTrack::E
Double_t E() const
Definition: PairAnalysisTrack.h:100
PairAnalysisTrack::GetTrackMatch
CbmTrackMatchNew * GetTrackMatch(ECbmModuleId det) const
Definition: PairAnalysisTrack.cxx:215
PairAnalysisTrack::fRichProj
FairTrackParam * fRichProj
Definition: PairAnalysisTrack.h:131
PairAnalysisTrack::GetTrdTrack
CbmTrdTrack * GetTrdTrack() const
Definition: PairAnalysisTrack.h:73
PairAnalysisTrack::fRichRing
CbmRichRing * fRichRing
Definition: PairAnalysisTrack.h:122
PairAnalysisTrack::Px
Double_t Px() const
Definition: PairAnalysisTrack.h:86
PairAnalysisTrack::ChiToVertex
Double_t ChiToVertex() const
Definition: PairAnalysisTrack.h:106
PairAnalysisTrack::Phi
Double_t Phi() const
Definition: PairAnalysisTrack.h:97
PairAnalysisTrack::fTrdTrack
CbmTrdTrack * fTrdTrack
Definition: PairAnalysisTrack.h:121
PairAnalysisTrack::fGlblTrackIndex
Int_t fGlblTrackIndex
Definition: PairAnalysisTrack.h:118
PairAnalysisTrack::SetPdgCode
void SetPdgCode(Int_t pdg)
Definition: PairAnalysisTrack.h:61
CbmTrdTrack
Definition: CbmTrdTrack.h:22
PairAnalysisTrack::fChi2Vtx
Double_t fChi2Vtx
Definition: PairAnalysisTrack.h:136
PairAnalysisTrack::GetMuchTrack
CbmMuchTrack * GetMuchTrack() const
Definition: PairAnalysisTrack.h:72
CbmGlobalTrack
Definition: CbmGlobalTrack.h:26
PairAnalysisTrack::CalculateChi2Vtx
void CalculateChi2Vtx()
Definition: PairAnalysisTrack.cxx:351
PairAnalysisTrack::fStsTrack
CbmStsTrack * fStsTrack
Definition: PairAnalysisTrack.h:119
PairAnalysisTrack::operator=
PairAnalysisTrack & operator=(const PairAnalysisTrack &c)
CbmMCTrack
Definition: CbmMCTrack.h:34
PairAnalysisTrack::GetRichProj
FairTrackParam * GetRichProj() const
Definition: PairAnalysisTrack.h:78
PairAnalysisTrack::fPdgCode
Int_t fPdgCode
Definition: PairAnalysisTrack.h:138
PairAnalysisTrack::fGlblTrack
CbmGlobalTrack * fGlblTrack
Definition: PairAnalysisTrack.h:117
PairAnalysisTrack::fMultiMatch
Int_t fMultiMatch
Definition: PairAnalysisTrack.h:141
PairAnalysisTrack::GetPrimaryKFVertex
CbmKFVertex * GetPrimaryKFVertex() const
Definition: PairAnalysisTrack.h:84
PairAnalysisTrack::PdgCode
Int_t PdgCode() const
Definition: PairAnalysisTrack.h:108
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
PairAnalysisTrack::fMuchTrack
CbmMuchTrack * fMuchTrack
Definition: PairAnalysisTrack.h:120
PairAnalysisTrack::fMomentum
TLorentzVector fMomentum
Definition: PairAnalysisTrack.h:134
CbmTofHit
Definition: core/data/tof/CbmTofHit.h:26
PairAnalysisTrack::fFastTrack
Bool_t fFastTrack
Definition: PairAnalysisTrack.h:143
PairAnalysisTrack::fMCTrack
CbmMCTrack * fMCTrack
Definition: PairAnalysisTrack.h:125
PairAnalysisTrack::SetLabel
void SetLabel(Int_t lbl)
Definition: PairAnalysisTrack.h:62
CbmStsTrack
Definition: CbmStsTrack.h:37
PairAnalysisTrack::Refit
void Refit(Int_t pidHypo)
Definition: PairAnalysisTrack.cxx:305
PairAnalysisTrack::SetWeight
void SetWeight(Double_t wght)
Definition: PairAnalysisTrack.h:63
PairAnalysisTrack::GetMomentum
TLorentzVector * GetMomentum()
Definition: PairAnalysisTrack.h:68
PairAnalysisTrack::Pz
Double_t Pz() const
Definition: PairAnalysisTrack.h:88
PairAnalysisTrack::fTrdTrackMatch
CbmTrackMatchNew * fTrdTrackMatch
Definition: PairAnalysisTrack.h:128
PairAnalysisTrack::OneOverPt
Double_t OneOverPt() const
Definition: PairAnalysisTrack.h:96
PairAnalysisTrack::GetPosition
TLorentzVector * GetPosition()
Definition: PairAnalysisTrack.h:67
PairAnalysisTrack::GetGlobalTrack
CbmGlobalTrack * GetGlobalTrack() const
Definition: PairAnalysisTrack.h:69
PairAnalysisTrack::fPosition
TLorentzVector fPosition
Definition: PairAnalysisTrack.h:135
CbmKFVertex
Definition: CbmKFVertex.h:6
PairAnalysisTrack::Yv
Double_t Yv() const
Definition: PairAnalysisTrack.h:93
PairAnalysisTrack::Py
Double_t Py() const
Definition: PairAnalysisTrack.h:87
CbmDefs.h
PairAnalysisTrack::fWeight
Double_t fWeight
Definition: PairAnalysisTrack.h:140
PairAnalysisTrack::Theta
Double_t Theta() const
Definition: PairAnalysisTrack.h:98