Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:18:58

0001 #ifndef RecoLocalCalo_HGCalRecProducer_HFNoseTilesConstants_h
0002 #define RecoLocalCalo_HGCalRecProducer_HFNoseTilesConstants_h
0003 
0004 #include "DataFormats/Math/interface/constexpr_cmath.h"
0005 
0006 #include <cstdint>
0007 #include <array>
0008 
0009 struct HFNoseTilesConstants {
0010   // inner radius ~ 3cm , other radius ~ 110
0011   static constexpr float tileSize = 5.f;
0012   static constexpr float minX = -110.f;
0013   static constexpr float maxX = 110.f;
0014   static constexpr float minY = -110.f;
0015   static constexpr float maxY = 110.f;
0016   static constexpr int nColumns = reco::ceil((maxX - minX) / tileSize);
0017   static constexpr int nRows = reco::ceil((maxY - minY) / tileSize);
0018   static constexpr float tileSizeEtaPhi = 0.15f;
0019   static constexpr float minEta = -4.2f;
0020   static constexpr float maxEta = 4.2f;
0021   //To properly construct search box for cells in phi=[-3.15,-3.] and [3.,3.15], cells in phi=[3.,3.15]
0022   //are copied to the first bin and cells in phi=[-3.15,-3.] are copied to the last bin
0023   static constexpr float minPhi = -3.3f;
0024   static constexpr float maxPhi = 3.3f;
0025   static constexpr int nColumnsEta = reco::ceil((maxEta - minEta) / tileSizeEtaPhi);
0026   static constexpr int nRowsPhi = reco::ceil((maxPhi - minPhi) / tileSizeEtaPhi);
0027   static constexpr int nTiles = nColumns * nRows + nColumnsEta * nRowsPhi;
0028 };
0029 
0030 #endif