153 "Ca::Grid::fEntries"};
167 return std::max(0, std::min(
fNx - 1, binX));
173 return std::max(0, std::min(
fNy - 1, binY));
179 return std::make_tuple(Xmin, Xmin +
fBinWidthX);
185 return std::make_tuple(Ymin, Ymin +
fBinWidthY);
A generic hit for the CA tracker (header)
static vector< vector< QAHit > > hits
Class for storing 2d objects in a grid.
std::tuple< fscal, fscal > GetBinBoundsX(int iBin) const
Get bin bounds along X.
fscal GetMinY() const
Get minimal Y value.
void StoreHits(const ca::Vector< ca::Hit > &hits, ca::HitIndex_t hitStartIndex, ca::HitIndex_t nHits, const ca::Vector< unsigned char > &hitKeyFlags)
Store objects in the grid.
fscal fMinY
minimal Y value
ca::Vector< ca::GridEntry > fEntries
grid entries with references to the hit index in fWindowHits
void RemoveUsedHits(const ca::Vector< ca::Hit > &hits, const ca::Vector< unsigned char > &hitKeyFlags)
Remove grid entries that correspond to the used hits.
fscal GetMinX() const
Get minimal X value.
std::tuple< fscal, fscal > GetBinBoundsY(int iBin) const
Get bin bounds along Y.
int GetBin(fscal X, fscal Y) const
Get bin index for (X,Y) point with boundary check.
fscal GetBinWidthX() const
Get bin width in X.
fscal GetMaxRangeY() const
Get maximal entry range in Y.
fscal GetBinWidthY() const
Get bin width in Y.
Grid()=default
Default constructor.
const ca::Vector< ca::GridEntry > & GetEntries() const
Get number of entries in the bin.
fscal fMaxRangeT
maximal entry range in T
fscal fBinWidthX
bin width in X
int GetNofBinsX() const
Get number of bins along X.
fscal GetMaxRangeX() const
Get maximal entry range in X.
void BuildBins(fscal xMin, fscal xMax, fscal yMin, fscal yMax, fscal binWidthX, fscal binWidthY)
Build the grid.
fscal fMaxRangeX
maximal entry range in X
ca::HitIndex_t GetFirstBinEntryIndex(int bin) const
Get index of the first bin entry in fHitsInBin array.
int GetNofBinsY() const
Get number of bins along Y.
fscal fBinWidthYinv
inverse bin width in Y
int GetNofBins() const
Get number of bins.
~Grid()=default
Destructor.
int GetBinY(fscal Y) const
Get bin Y index with boundary check.
fscal fMaxRangeY
maximal entry range in Y
fscal GetMaxRangeT() const
Get maximal entry range in T.
fscal fBinWidthY
bin width in Y
ca::Vector< ca::HitIndex_t > fNofBinEntries
number of hits in the bin
ca::Vector< ca::HitIndex_t > fFirstBinEntryIndex
index of the first entry in the bin
fscal fMinX
minimal X value
int GetBinX(fscal X) const
Get bin X index with boundary check.
fscal fBinWidthXinv
inverse bin width in X
TODO: SZh 8.11.2022: add selection of parameterisation.
unsigned int HitIndex_t
Index of ca::Hit.