CbmRoot
Loading...
Searching...
No Matches
CbmLitHitData.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2017 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer] */
4
12#ifndef CBMLITHITDATA_H_
13#define CBMLITHITDATA_H_
14
15#include "base/CbmLitTypes.h"
16
17#include <map>
18#include <set>
19#include <string>
20#include <utility>
21#include <vector>
22
23using std::map;
24using std::set;
25using std::vector;
26
27class CbmLitHit;
28
30 public:
35
39 virtual ~CbmLitHitData();
40
44 void SetNofStations(Int_t nofStations);
45
50 void AddHit(CbmLitHit* hit);
51
58 const CbmLitHit* GetHit(Int_t station, Int_t hitId) const;
59
65 const HitPtrVector& GetHits(Int_t station);
66
72 Int_t GetNofHits(Int_t station) const;
73
79 litfloat GetMaxErrX(Int_t station) const;
80
86 litfloat GetMaxErrY(Int_t station) const;
87
93 litfloat GetMaxErrT(Int_t station) const;
94
95 // /**
96 // * \brief Return Z positions of hits.
97 // * \param[in] station Index of station.
98 // * \return Z positions of hits
99 // */
100 // const vector<litfloat>& GetZPos(
101 // Int_t station) const;
102
108 const vector<Int_t>& GetZPosBins(Int_t station) const;
109
116 litfloat GetZPosByBin(Int_t station, Int_t bin) const;
117
124 Int_t GetBinByZPos(Int_t station, litfloat zPos) const;
125
131 litfloat GetMinZPos(Int_t station) const;
132
136 void Clear();
137
141 void Arrange();
142
147 virtual string ToString() const;
148
149 private:
150 static const litfloat EPSILON;
151 vector<HitPtrVector> fHits; // Array of hits for each station
152 vector<litfloat> fMaxErrX; // Array of maximum X position errors for each station
153 vector<litfloat> fMaxErrY; // Array of maximum Y position errors for each station
154 vector<litfloat> fMaxErrT; // Array of maximum time measurement errors for each station
155 Int_t fNofStations; // Number of stations
156 vector<set<litfloat>> fZPosSet; // Set of Z positions of hits in each station
157 // Temporarily used for Z different Z positions calculation
158 //vector<vector<litfloat> > fZPos; // Array of Z positions of hits in each station
159 vector<vector<Int_t>> fZPosBins; // Array of Z positions bin number of hits in each station
160};
161
162#endif /*CBMLITHITDATA_H_*/
double litfloat
Definition CbmLitFloat.h:19
Typedefs for data structures used in littrack.
std::vector< CbmTofHit * > HitPtrVector
Definition CbmTofTypes.h:20
void Clear()
Clear array of hits.
virtual ~CbmLitHitData()
Destructor.
void Arrange()
Must be called after all hits are added.
static const litfloat EPSILON
vector< litfloat > fMaxErrT
virtual string ToString() const
Return string representation of this class.
void SetNofStations(Int_t nofStations)
Set number of stations.
const CbmLitHit * GetHit(Int_t station, Int_t hitId) const
Return hit pointer.
Int_t GetNofHits(Int_t station) const
Return number of hits for the specified station index.
void AddHit(CbmLitHit *hit)
Add hit.
vector< vector< Int_t > > fZPosBins
vector< litfloat > fMaxErrX
litfloat GetZPosByBin(Int_t station, Int_t bin) const
Return Z positions of hit.
litfloat GetMinZPos(Int_t station) const
Return minimum Z position of hits.
const vector< Int_t > & GetZPosBins(Int_t station) const
Return Z positions of hits.
litfloat GetMaxErrY(Int_t station) const
Int_t GetBinByZPos(Int_t station, litfloat zPos) const
Return bin number for hit Z position.
vector< HitPtrVector > fHits
CbmLitHitData()
Constructor.
vector< litfloat > fMaxErrY
litfloat GetMaxErrX(Int_t station) const
litfloat GetMaxErrT(Int_t station) const
const HitPtrVector & GetHits(Int_t station)
Return array of hits.
vector< set< litfloat > > fZPosSet
Base data class for hits.
Definition CbmLitHit.h:29