Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 13:03:16

0001 #ifndef HcalTrigTowerGeometry_h
0002 #define HcalTrigTowerGeometry_h
0003 
0004 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0005 #include "DataFormats/DetId/interface/DetId.h"
0006 #include <vector>
0007 class HcalTrigTowerDetId;
0008 class HcalDetId;
0009 
0010 class HcalTrigTowerGeometry {
0011 public:
0012   HcalTrigTowerGeometry(const HcalTopology* topology);
0013 
0014   /// the mapping to and from DetIds
0015   std::vector<HcalTrigTowerDetId> towerIds(const HcalDetId& cellId) const;
0016   std::vector<HcalDetId> detIds(const HcalTrigTowerDetId&) const;
0017 
0018   int firstHFTower(int version) const { return (version == 1) ? (30) : (29); }
0019 
0020   /// where this tower begins and ends in eta
0021   void towerEtaBounds(int ieta, int version, double& eta1, double& eta2) const;
0022 
0023   /// number of towers (version dependent)
0024   int nTowers(int version) const { return (version == 1) ? (41) : (32); }
0025 
0026   // get the topology pointer
0027   const HcalTopology& topology() const { return *theTopology; }
0028 
0029   // Get the useRCT and use1x1 values
0030   bool useRCT() const { return useRCT_; }
0031   bool use1x1() const { return use1x1_; }
0032 
0033 private:
0034   /// the number of phi bins in this eta ring
0035   int nPhiBins(int ieta, int version) const {
0036     int nPhiBinsHF = (18);
0037     return (abs(ieta) < firstHFTower(version)) ? 72 : nPhiBinsHF;
0038   }
0039 
0040   /// the number of HF eta rings in this trigger tower
0041   /// ieta starts at firstHFTower()
0042   int hfTowerEtaSize(int ieta) const;
0043 
0044   /// since the towers are irregular in eta in HF
0045   int firstHFRingInTower(int ietaTower) const;
0046 
0047 private:
0048   const HcalTopology* theTopology;
0049 
0050   bool useRCT_;
0051   bool use1x1_;
0052   bool use2017_;
0053 };
0054 
0055 #endif