CbmRoot
CbmLitHitData.h
Go to the documentation of this file.
1 
8 #ifndef CBMLITHITDATA_H_
9 #define CBMLITHITDATA_H_
10 
11 #include "base/CbmLitTypes.h"
12 
13 #include <map>
14 #include <set>
15 #include <string>
16 #include <utility>
17 #include <vector>
18 
19 using std::map;
20 using std::set;
21 using std::vector;
22 
23 class CbmLitHit;
24 
26 public:
30  CbmLitHitData();
31 
35  virtual ~CbmLitHitData();
36 
40  void SetNofStations(Int_t nofStations);
41 
46  void AddHit(CbmLitHit* hit);
47 
54  const CbmLitHit* GetHit(Int_t station, Int_t hitId) const;
55 
61  const HitPtrVector& GetHits(Int_t station);
62 
68  Int_t GetNofHits(Int_t station) const;
69 
75  litfloat GetMaxErrX(Int_t station) const;
76 
82  litfloat GetMaxErrY(Int_t station) const;
83 
89  litfloat GetMaxErrT(Int_t station) const;
90 
91  // /**
92  // * \brief Return Z positions of hits.
93  // * \param[in] station Index of station.
94  // * \return Z positions of hits
95  // */
96  // const vector<litfloat>& GetZPos(
97  // Int_t station) const;
98 
104  const vector<Int_t>& GetZPosBins(Int_t station) const;
105 
112  litfloat GetZPosByBin(Int_t station, Int_t bin) const;
113 
120  Int_t GetBinByZPos(Int_t station, litfloat zPos) const;
121 
127  litfloat GetMinZPos(Int_t station) const;
128 
132  void Clear();
133 
137  void Arrange();
138 
143  virtual string ToString() const;
144 
145 private:
146  static const litfloat EPSILON;
147  vector<HitPtrVector> fHits; // Array of hits for each station
148  vector<litfloat>
149  fMaxErrX; // Array of maximum X position errors for each station
150  vector<litfloat>
151  fMaxErrY; // Array of maximum Y position errors for each station
152  vector<litfloat>
153  fMaxErrT; // Array of maximum time measurement errors for each station
154  Int_t fNofStations; // Number of stations
155  vector<set<litfloat>> fZPosSet; // Set of Z positions of hits in each station
156  // Temporarily used for Z different Z positions calculation
157  //vector<vector<litfloat> > fZPos; // Array of Z positions of hits in each station
158  vector<vector<Int_t>>
159  fZPosBins; // Array of Z positions bin number of hits in each station
160 };
161 
162 #endif /*CBMLITHITDATA_H_*/
CbmLitHitData::fMaxErrT
vector< litfloat > fMaxErrT
Definition: CbmLitHitData.h:153
CbmLitHitData::Arrange
void Arrange()
Must be called after all hits are added.
Definition: CbmLitHitData.cxx:120
litfloat
double litfloat
Definition: CbmLitFloat.h:15
CbmLitHitData::GetZPosByBin
litfloat GetZPosByBin(Int_t station, Int_t bin) const
Return Z positions of hit.
Definition: CbmLitHitData.cxx:96
CbmLitHitData::fZPosSet
vector< set< litfloat > > fZPosSet
Definition: CbmLitHitData.h:155
CbmLitHitData::fHits
vector< HitPtrVector > fHits
Definition: CbmLitHitData.h:147
CbmLitHitData::Clear
void Clear()
Clear array of hits.
Definition: CbmLitHitData.cxx:108
CbmLitHitData::GetNofHits
Int_t GetNofHits(Int_t station) const
Return number of hits for the specified station index.
Definition: CbmLitHitData.cxx:70
CbmLitHitData::CbmLitHitData
CbmLitHitData()
Constructor.
Definition: CbmLitHitData.cxx:23
CbmLitHitData::GetMaxErrY
litfloat GetMaxErrY(Int_t station) const
Definition: CbmLitHitData.cxx:78
CbmLitHitData::EPSILON
static const litfloat EPSILON
Definition: CbmLitHitData.h:146
CbmLitHitData::GetZPosBins
const vector< Int_t > & GetZPosBins(Int_t station) const
Return bin numbers for Z positions of hits.
Definition: CbmLitHitData.cxx:92
CbmLitHit
Base data class for hits.
Definition: CbmLitHit.h:26
CbmLitHitData::GetHits
const HitPtrVector & GetHits(Int_t station)
Return array of hits.
Definition: CbmLitHitData.cxx:66
CbmLitHitData::GetBinByZPos
Int_t GetBinByZPos(Int_t station, litfloat zPos) const
Return bin number for hit Z position.
Definition: CbmLitHitData.cxx:100
CbmLitHitData
Definition: CbmLitHitData.h:25
CbmLitTypes.h
Typedefs for data structures used in littrack.
CbmLitHitData::fMaxErrY
vector< litfloat > fMaxErrY
Definition: CbmLitHitData.h:151
CbmLitHitData::fMaxErrX
vector< litfloat > fMaxErrX
Definition: CbmLitHitData.h:149
CbmLitHitData::GetMaxErrT
litfloat GetMaxErrT(Int_t station) const
Definition: CbmLitHitData.cxx:82
CbmLitHitData::AddHit
void AddHit(CbmLitHit *hit)
Add hit.
Definition: CbmLitHitData.cxx:44
CbmLitHitData::fZPosBins
vector< vector< Int_t > > fZPosBins
Definition: CbmLitHitData.h:159
CbmLitHitData::fNofStations
Int_t fNofStations
Definition: CbmLitHitData.h:154
CbmLitHitData::GetHit
const CbmLitHit * GetHit(Int_t station, Int_t hitId) const
Return hit pointer.
Definition: CbmLitHitData.cxx:62
CbmLitHitData::GetMinZPos
litfloat GetMinZPos(Int_t station) const
Return minimum Z position of hits.
Definition: CbmLitHitData.cxx:104
CbmLitHitData::~CbmLitHitData
virtual ~CbmLitHitData()
Destructor.
Definition: CbmLitHitData.cxx:26
HitPtrVector
std::vector< CbmTofHit * > HitPtrVector
Definition: CbmTofTypes.h:14
CbmLitHitData::ToString
virtual string ToString() const
Return string representation of this class.
Definition: CbmLitHitData.cxx:144
CbmLitHitData::GetMaxErrX
litfloat GetMaxErrX(Int_t station) const
Definition: CbmLitHitData.cxx:74
CbmLitHitData::SetNofStations
void SetNofStations(Int_t nofStations)
Set number of stations.
Definition: CbmLitHitData.cxx:28