CbmRoot
CbmTofTrack.h
Go to the documentation of this file.
1 
6 #ifndef CBMTOFTRACK_H
7 #define CBMTOFTRACK_H 1
8 
9 #include <Rtypes.h> // for ClassDef
10 #include <RtypesCore.h> // for Int_t, Double_t, Float_t, Double32_t
11 #include <TMath.h> // for Sqrt
12 #include <TObject.h> // for TObject
13 
14 #include <FairTrackParam.h> // for FairTrackParam
15 
20 class CbmTofTrack : public TObject {
21 
22 public:
24  CbmTofTrack();
25 
26 
35  CbmTofTrack(Int_t trackIndex,
36  Int_t hitIndex,
37  Double_t trackLength,
38  Float_t mass,
39  const FairTrackParam& trackPar,
40  Int_t pidHypo)
41  : TObject()
42  , fGlbTrack(trackIndex)
43  , fTofHit(hitIndex)
44  , fTrackLength(trackLength)
45  , fTrackPar(trackPar)
46  , fPidHypo(pidHypo)
47  , fMass(mass)
48  , fDistance(0.) {}
49 
50 
52  virtual ~CbmTofTrack();
53 
55  Int_t GetPidHypo() const { return fPidHypo; }
56 
58  Float_t GetMass() const { return fMass; }
59 
61  Int_t GetTofHitIndex() const { return fTofHit; }
62 
64  Double_t GetTrackDx() const {
65  return TMath::Sqrt(fTrackPar.GetCovariance(1, 1));
66  }
67 
69  Double_t GetTrackDy() const {
70  return TMath::Sqrt(fTrackPar.GetCovariance(2, 2));
71  }
72 
74  Int_t GetTrackIndex() const { return fGlbTrack; }
75 
77  Double_t GetTrackLength() const { return fTrackLength; }
78 
80  const FairTrackParam* GetTrackParameter() const { return &fTrackPar; }
81 
83  Double_t GetTrackX() const { return fTrackPar.GetX(); }
84 
86  Double_t GetTrackY() const { return fTrackPar.GetY(); }
87 
89  Double_t GetDistance() const { return fDistance; }
90 
92  void SetTrackIndex(Int_t trackIndex) { fGlbTrack = trackIndex; }
93 
95  void SetTofHitIndex(Int_t tofHitIndex) { fTofHit = tofHitIndex; }
96 
98  void SetTrackParameter(const FairTrackParam* par) { fTrackPar = *par; }
99 
101  void SetTrackLength(Double32_t trackLength) { fTrackLength = trackLength; }
102 
104  void SetPidHypo(Int_t pid) { fPidHypo = pid; }
105 
107  void SetMass(Float_t mass) { fMass = mass; }
108 
110  void SetDistance(Double_t distance) { fDistance = distance; }
111 
112 private:
113  Int_t fGlbTrack;
114  Int_t fTofHit;
115  Double32_t fTrackLength;
116  FairTrackParam fTrackPar;
117  Int_t fPidHypo;
118  Float_t fMass;
119  Double32_t fDistance;
120 
121 
123 };
124 
125 #endif /* CBMTOFTRACK_H */
CbmTofTrack::SetMass
void SetMass(Float_t mass)
Definition: CbmTofTrack.h:107
CbmTofTrack::SetPidHypo
void SetPidHypo(Int_t pid)
Definition: CbmTofTrack.h:104
CbmTofTrack::fTofHit
Int_t fTofHit
Index of TofHit.
Definition: CbmTofTrack.h:114
CbmTofTrack::GetTrackDx
Double_t GetTrackDx() const
Definition: CbmTofTrack.h:64
CbmTofTrack::SetTrackIndex
void SetTrackIndex(Int_t trackIndex)
Definition: CbmTofTrack.h:92
CbmTofTrack::GetPidHypo
Int_t GetPidHypo() const
Definition: CbmTofTrack.h:55
CbmTofTrack::GetTrackParameter
const FairTrackParam * GetTrackParameter() const
Definition: CbmTofTrack.h:80
CbmTofTrack::GetTrackLength
Double_t GetTrackLength() const
Definition: CbmTofTrack.h:77
CbmTofTrack::SetTrackParameter
void SetTrackParameter(const FairTrackParam *par)
Definition: CbmTofTrack.h:98
CbmTofTrack::fGlbTrack
Int_t fGlbTrack
Index of global track.
Definition: CbmTofTrack.h:113
CbmTofTrack::GetTrackDy
Double_t GetTrackDy() const
Definition: CbmTofTrack.h:69
CbmTofTrack::GetMass
Float_t GetMass() const
Definition: CbmTofTrack.h:58
CbmTofTrack::fPidHypo
Int_t fPidHypo
PID hypothesis used for track extrapolation.
Definition: CbmTofTrack.h:117
CbmTofTrack::fTrackLength
Double32_t fTrackLength
Track length from primary vertex to TOF [cm].
Definition: CbmTofTrack.h:115
CbmTofTrack::CbmTofTrack
CbmTofTrack()
Definition: CbmTofTrack.cxx:11
CbmTofTrack::GetTrackIndex
Int_t GetTrackIndex() const
Definition: CbmTofTrack.h:74
CbmTofTrack::fMass
Float_t fMass
Mass from Tof.
Definition: CbmTofTrack.h:118
CbmTofTrack::GetTofHitIndex
Int_t GetTofHitIndex() const
Definition: CbmTofTrack.h:61
CbmTofTrack::GetTrackY
Double_t GetTrackY() const
Definition: CbmTofTrack.h:86
CbmTofTrack::ClassDef
ClassDef(CbmTofTrack, 1)
CbmTofTrack::SetTofHitIndex
void SetTofHitIndex(Int_t tofHitIndex)
Definition: CbmTofTrack.h:95
CbmTofTrack::GetDistance
Double_t GetDistance() const
Definition: CbmTofTrack.h:89
CbmTofTrack::fTrackPar
FairTrackParam fTrackPar
Track parameters at z of TofHit.
Definition: CbmTofTrack.h:116
CbmTofTrack::SetDistance
void SetDistance(Double_t distance)
Definition: CbmTofTrack.h:110
CbmTofTrack::~CbmTofTrack
virtual ~CbmTofTrack()
Definition: CbmTofTrack.cxx:21
CbmTofTrack::GetTrackX
Double_t GetTrackX() const
Definition: CbmTofTrack.h:83
CbmTofTrack::fDistance
Double32_t fDistance
Normalized distance from hit to track.
Definition: CbmTofTrack.h:119
CbmTofTrack::SetTrackLength
void SetTrackLength(Double32_t trackLength)
Definition: CbmTofTrack.h:101
CbmTofTrack::CbmTofTrack
CbmTofTrack(Int_t trackIndex, Int_t hitIndex, Double_t trackLength, Float_t mass, const FairTrackParam &trackPar, Int_t pidHypo)
Definition: CbmTofTrack.h:35
CbmTofTrack
Provides information on attaching a TofHit to a GlobalTrack.
Definition: CbmTofTrack.h:20