28using std::stringstream;
61 fHits.resize(nofStations);
66 for (
unsigned char i = 0; i < nofStations; i++) {
67 fHits[i].reserve(1500);
80 fHits[station].push_back(hit);
99 const vector<LitScalPixelHit*>&
GetHits(
unsigned char station) {
return fHits[station]; }
106 unsigned int GetNofHits(
unsigned char station)
const {
return fHits[station].size(); }
140 fHits[i].reserve(1500);
153 for (
int iStation = 0; iStation <
fNofStations; iStation++) {
154 if (
fZPosSet[iStation].empty())
continue;
158 set<fscal>::const_iterator it;
159 for (it =
fZPosSet[iStation].begin(); it !=
fZPosSet[iStation].end(); it++) {
161 int bin = (z - minZ) /
EPSILON;
165 set<int>::const_iterator it2;
166 for (it2 = binSet.begin(); it2 != binSet.end(); it2++) {
182 ss <<
"LitHitData:" << endl;
183 for (
unsigned int i = 0; i <
fHits.size(); i++) {
184 ss <<
" station " << i <<
": " <<
GetNofHits(i) <<
" hits, "
187 for (set<fscal>::const_iterator it =
fZPosSet[i].begin(); it !=
fZPosSet[i].end(); it++) {
192 for (vector<int>::const_iterator it =
fZPosBins[i].begin(); it !=
fZPosBins[i].end(); it++) {
193 ss <<
"|" << *it <<
"," <<
GetZPosByBin(i, *it) <<
"| ";
212 vector<vector<LitScalPixelHit*>>
fHits;
friend fscal max(fscal x, fscal y)
Base class for scalar pixel hits.
Base class for scalar strip hits.
Class for accessing hits in track reconstruction.
const LitScalPixelHit * GetHit(unsigned char station, unsigned int hitId) const
Return hit pointer.
fscal GetZPosByBin(unsigned char station, int bin) const
string ToString() const
Returns string representation of the class.
vector< vector< int > > fZPosBins
friend ostream & operator<<(ostream &strm, const LitHitData &hitData)
Operator << for convenient output to ostream.
unsigned int GetNofHits(unsigned char station) const
Return number of hits for specified station.
void AddHit(LitScalPixelHit *hit)
Add hit.
const vector< int > & GetZPosBins(unsigned char station) const
void Clear()
Clear hit arrays.
void Arrange()
Must be called after all hits are added.
fscal GetMinZPos(unsigned char station) const
const vector< LitScalPixelHit * > & GetHits(unsigned char station)
Return vector of hits.
fscal GetMaxErrX(unsigned char station) const
Return maximum X error in [cm] for specified station.
fscal GetMaxErrY(unsigned char station) const
Return maximum Y error in [cm] for specified station.
virtual ~LitHitData()
Destructor.
unsigned char fNofStations
void SetNofStations(unsigned char nofStations)
Set number of stations.
vector< vector< LitScalPixelHit * > > fHits
vector< set< fscal > > fZPosSet
int GetBinByZPos(unsigned char station, fscal zPos) const
static const fscal EPSILON
Base class for scalar pixel hits.
class lit::parallel::LitDetectorLayout _fvecalignment