|
|
Go to the documentation of this file.
4 #ifndef RecoLocalCalo_HGCalRecProducers_HGCalLayerTiles_h
5 #define RecoLocalCalo_HGCalRecProducers_HGCalLayerTiles_h
19 void fill(
const std::vector<float>&
x,
20 const std::vector<float>&
y,
21 const std::vector<float>&
eta,
22 const std::vector<float>&
phi,
23 const std::vector<bool>& isSi) {
24 auto cellsSize =
x.size();
25 for (
unsigned int i = 0;
i < cellsSize; ++
i) {
43 static_assert(
xRange >= 0.);
44 constexpr
float r = T::nColumns /
xRange;
46 xBin = std::clamp(
xBin, 0, T::nColumns - 1);
52 static_assert(
yRange >= 0.);
53 constexpr
float r = T::nRows /
yRange;
55 yBin = std::clamp(
yBin, 0, T::nRows - 1);
62 constexpr
float r = T::nColumnsEta /
etaRange;
70 static_assert(phiRange >= 0.);
71 constexpr
float r = T::nRowsPhi / phiRange;
89 return T::nColumns * T::nRows +
etaBin +
phiBin * T::nColumnsEta;
97 return std::array<int, 4>({{xBinMin, xBinMax, yBinMin, yBinMax}});
105 return std::array<int, 4>({{etaBinMin, etaBinMax, phiBinMin, phiBinMax}});
116 std::array<std::vector<int>, T::nTiles>
tiles_;
int getEtaBin(float eta) const
std::array< std::vector< int >, T::nTiles > tiles_
int etaBin(const l1t::HGCalMulticluster *cl)
void fill(const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &eta, const std::vector< float > &phi, const std::vector< bool > &isSi)
std::array< int, 4 > searchBox(float xMin, float xMax, float yMin, float yMax) const
int getGlobalBin(float x, float y) const
std::array< int, 4 > searchBoxEtaPhi(float etaMin, float etaMax, float phiMin, float phiMax) const
int getGlobalBinByBin(int xBin, int yBin) const
int getXBin(float x) const
int getGlobalBinEtaPhi(float eta, float phi) const
int getPhiBin(float phi) const
const std::vector< int > & operator[](int globalBinId) const
int getYBin(float y) const
int getGlobalBinByBinEtaPhi(int etaBin, int phiBin) const