Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:50

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