CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TICLLayerTileT< T > Class Template Reference

#include <TICLLayerTile.h>

Public Member Functions

void clear ()
 
int etaBin (float eta) const
 
void fill (double eta, double phi, unsigned int layerClusterId)
 
int globalBin (double eta, double phi) const
 
int globalBin (int etaBin, int phiBin) const
 
const std::vector< unsigned int > & operator[] (int globalBinId) const
 
int phiBin (float phi) const
 

Private Attributes

std::array< std::vector< unsigned int >, T::nBins > tile_
 

Detailed Description

template<typename T>
class TICLLayerTileT< T >

Definition at line 11 of file TICLLayerTile.h.

Member Function Documentation

◆ clear()

template<typename T >
void TICLLayerTileT< T >::clear ( void  )
inline

◆ etaBin()

template<typename T >
int TICLLayerTileT< T >::etaBin ( float  eta) const
inline

Definition at line 17 of file TICLLayerTile.h.

17  {
18  constexpr float etaRange = T::maxEta - T::minEta;
19  static_assert(etaRange >= 0.f);
20  float r = T::nEtaBins / etaRange;
21  int etaBin = (std::abs(eta) - T::minEta) * r;
22  etaBin = std::clamp(etaBin, 0, T::nEtaBins - 1);
23  return etaBin;
24  }

References funct::abs(), PVValHelper::eta, generateTowerEtThresholdLUT::etaRange, f, maxEta, EgHLTOffEleSelection_cfi::minEta, L1TMuonDQMOffline_cfi::nEtaBins, and alignCSCRings::r.

Referenced by TICLLayerTileT< T >::globalBin().

◆ fill()

template<typename T >
void TICLLayerTileT< T >::fill ( double  eta,
double  phi,
unsigned int  layerClusterId 
)
inline

Definition at line 13 of file TICLLayerTile.h.

13  {
14  tile_[globalBin(eta, phi)].push_back(layerClusterId);
15  }

References PVValHelper::eta, TICLLayerTileT< T >::globalBin(), phi, and TICLLayerTileT< T >::tile_.

◆ globalBin() [1/2]

template<typename T >
int TICLLayerTileT< T >::globalBin ( double  eta,
double  phi 
) const
inline

◆ globalBin() [2/2]

template<typename T >
int TICLLayerTileT< T >::globalBin ( int  etaBin,
int  phiBin 
) const
inline

◆ operator[]()

template<typename T >
const std::vector<unsigned int>& TICLLayerTileT< T >::operator[] ( int  globalBinId) const
inline

Definition at line 44 of file TICLLayerTile.h.

44 { return tile_[globalBinId]; }

References TICLLayerTileT< T >::tile_.

◆ phiBin()

template<typename T >
int TICLLayerTileT< T >::phiBin ( float  phi) const
inline

Definition at line 26 of file TICLLayerTile.h.

26  {
27  auto normPhi = normalizedPhi(phi);
28  float r = T::nPhiBins * M_1_PI * 0.5f;
29  int phiBin = (normPhi + M_PI) * r;
30 
31  return phiBin;
32  }

References M_PI, normalizedPhi(), ecaldqm::binning::nPhiBins, phi, and alignCSCRings::r.

Referenced by TICLLayerTileT< T >::globalBin().

Member Data Documentation

◆ tile_

template<typename T >
std::array<std::vector<unsigned int>, T::nBins> TICLLayerTileT< T >::tile_
private
TICLLayerTileT::globalBin
int globalBin(int etaBin, int phiBin) const
Definition: TICLLayerTile.h:34
generateTowerEtThresholdLUT.etaRange
etaRange
Definition: generateTowerEtThresholdLUT.py:55
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PVValHelper::eta
Definition: PVValidationHelpers.h:69
maxEta
double maxEta
Definition: PFJetBenchmarkAnalyzer.cc:76
normalizedPhi
constexpr T normalizedPhi(T phi)
Definition: normalizedPhi.h:8
TICLLayerTileT::phiBin
int phiBin(float phi) const
Definition: TICLLayerTile.h:26
seedmultiplicitymonitor_newtracking_cfi.nBins
nBins
Definition: seedmultiplicitymonitor_newtracking_cfi.py:8
TICLLayerTileT::etaBin
int etaBin(float eta) const
Definition: TICLLayerTile.h:17
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
alignCSCRings.r
r
Definition: alignCSCRings.py:93
TICLLayerTileT::tile_
std::array< std::vector< unsigned int >, T::nBins > tile_
Definition: TICLLayerTile.h:47
DDAxes::phi
L1TMuonDQMOffline_cfi.nEtaBins
nEtaBins
Definition: L1TMuonDQMOffline_cfi.py:21
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ecaldqm::binning::nPhiBins
Definition: MESetBinningUtils.h:69
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EgHLTOffEleSelection_cfi.minEta
minEta
Definition: EgHLTOffEleSelection_cfi.py:11
TICLLayerTileT::clear
void clear()
Definition: TICLLayerTile.h:38