CbmRoot
CbmStsTrack.h
Go to the documentation of this file.
1 
15 #ifndef CBMSTSTRACK_H
16 #define CBMSTSTRACK_H 1
17 
18 #include <Rtypes.h> // for ClassDef
19 #include <RtypesCore.h> // for Int_t, Double_t, Double32_t
20 
21 #include <cassert> // for assert
22 #include <string> // for string
23 #include <vector> // for vector
24 
25 #include "CbmHit.h" // for kSTSHIT
26 #include "CbmTrack.h" // for CbmTrack
27 
37 class CbmStsTrack : public CbmTrack {
38 public:
40  CbmStsTrack();
41 
42 
44  virtual ~CbmStsTrack();
45 
46 
50  void AddMvdHit(Int_t hitIndex) { fMvdHitIndex.push_back(hitIndex); }
51 
52 
56  void AddStsHit(Int_t hitIndex) { AddHit(hitIndex, kSTSHIT); }
57 
58 
62  Double_t GetB() const { return fB; }
63 
64 
70  Int_t GetMvdHitIndex(Int_t iHit) const { return fMvdHitIndex.at(iHit); }
71 
72 
76  virtual Int_t GetNofHits() const {
77  return (GetNofStsHits() + GetNofMvdHits());
78  }
79 
80 
84  Int_t GetNofMvdHits() const { return fMvdHitIndex.size(); }
85 
86 
90  Int_t GetNofStsHits() const { return CbmTrack::GetNofHits(); }
91 
92 
98  Int_t GetStsHitIndex(Int_t iHit) const {
99  assert(iHit < GetNofStsHits());
100  return GetHitIndex(iHit);
101  }
102 
103 
107  void SetB(Double_t b) { fB = b; }
108 
109 
111  virtual std::string ToString() const;
112 
113 
117  Float_t GetELoss() const { return fELoss; }
118 
122  void SetELoss(Float_t ELoss) { fELoss = ELoss; }
123 
124  constexpr static Float_t ELossOverflow() { return 1.e6; }
125 
126 private:
128  std::vector<Int_t> fMvdHitIndex;
129 
130 
132  Double32_t fB;
133 
135  Float_t fELoss {-1.f};
136 
138 };
139 
140 #endif
CbmStsTrack::fELoss
Float_t fELoss
Definition: CbmStsTrack.h:135
CbmTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmTrack.h:53
CbmStsTrack::ClassDef
ClassDef(CbmStsTrack, 3)
CbmStsTrack::fB
Double32_t fB
Definition: CbmStsTrack.h:132
CbmStsTrack::GetB
Double_t GetB() const
Definition: CbmStsTrack.h:62
CbmStsTrack::~CbmStsTrack
virtual ~CbmStsTrack()
Definition: CbmStsTrack.cxx:22
CbmStsTrack::GetNofHits
virtual Int_t GetNofHits() const
Definition: CbmStsTrack.h:76
CbmStsTrack::GetNofMvdHits
Int_t GetNofMvdHits() const
Definition: CbmStsTrack.h:84
CbmTrack
Definition: CbmTrack.h:32
CbmHit.h
CbmStsTrack::SetELoss
void SetELoss(Float_t ELoss)
Definition: CbmStsTrack.h:122
CbmStsTrack::CbmStsTrack
CbmStsTrack()
Definition: CbmStsTrack.cxx:17
CbmTrack.h
CbmTrack::GetHitIndex
Int_t GetHitIndex(Int_t iHit) const
Definition: CbmTrack.h:54
CbmStsTrack::SetB
void SetB(Double_t b)
Definition: CbmStsTrack.h:107
CbmStsTrack::ELossOverflow
constexpr static Float_t ELossOverflow()
Definition: CbmStsTrack.h:124
kSTSHIT
@ kSTSHIT
Definition: CbmHit.h:20
CbmStsTrack::GetMvdHitIndex
Int_t GetMvdHitIndex(Int_t iHit) const
Definition: CbmStsTrack.h:70
CbmStsTrack::AddStsHit
void AddStsHit(Int_t hitIndex)
Definition: CbmStsTrack.h:56
CbmStsTrack::GetELoss
Float_t GetELoss() const
Definition: CbmStsTrack.h:117
CbmStsTrack::GetStsHitIndex
Int_t GetStsHitIndex(Int_t iHit) const
Definition: CbmStsTrack.h:98
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmTrack::AddHit
void AddHit(Int_t index, HitType type)
Definition: CbmTrack.cxx:75
CbmStsTrack::ToString
virtual std::string ToString() const
Definition: CbmStsTrack.cxx:27
CbmStsTrack::fMvdHitIndex
std::vector< Int_t > fMvdHitIndex
Definition: CbmStsTrack.h:128
CbmStsTrack::GetNofStsHits
Int_t GetNofStsHits() const
Definition: CbmStsTrack.h:90
CbmStsTrack::AddMvdHit
void AddMvdHit(Int_t hitIndex)
Definition: CbmStsTrack.h:50