CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalTilesConstants.h
Go to the documentation of this file.
1 // Authors: Felice Pantaleo - felice.pantaleo@cern.ch
2 // Date: 03/2019
3 
4 #ifndef RecoLocalCalo_HGCalRecProducer_HGCalTilesConstants_h
5 #define RecoLocalCalo_HGCalRecProducer_HGCalTilesConstants_h
6 
8 #include <cstdint>
9 #include <array>
10 
12  static constexpr float tileSize = 5.f;
13  static constexpr float minX = -285.f;
14  static constexpr float maxX = 285.f;
15  static constexpr float minY = -285.f;
16  static constexpr float maxY = 285.f;
17  static constexpr int nColumns = reco::ceil((maxX - minX) / tileSize);
18  static constexpr int nRows = reco::ceil((maxY - minY) / tileSize);
19  static constexpr float tileSizeEtaPhi = 0.15f;
20  static constexpr float minEta = -3.f;
21  static constexpr float maxEta = 3.f;
22  //To properly construct search box for cells in phi=[-3.15,-3.] and [3.,3.15], cells in phi=[3.,3.15]
23  //are copied to the first bin and cells in phi=[-3.15,-3.] are copied to the last bin
24  static constexpr float minPhi = -3.3f;
25  static constexpr float maxPhi = 3.3f;
26  static constexpr int nColumnsEta = reco::ceil((maxEta - minEta) / tileSizeEtaPhi);
27  static constexpr int nRowsPhi = reco::ceil((maxPhi - minPhi) / tileSizeEtaPhi);
28  static constexpr int nTiles = nColumns * nRows + nColumnsEta * nRowsPhi;
29 };
30 
31 #endif
constexpr int32_t ceil(float num)
static constexpr float minEta
static constexpr float maxEta
static constexpr float minPhi
static constexpr float minX
static constexpr float minY
static constexpr float maxY
static constexpr int nColumns
static constexpr int nRowsPhi
static constexpr int nTiles
static constexpr float maxX
static constexpr float tileSize
static constexpr float maxPhi
static constexpr int nColumnsEta
static constexpr int nRows
static constexpr float tileSizeEtaPhi