File indexing completed on 2024-04-06 12:14:17
0001 #ifndef GEOMETRY_CALOTOPOLOGY_CALOTOWERTOPOLOGY_H
0002 #define GEOMETRY_CALOTOPOLOGY_CALOTOWERTOPOLOGY_H 1
0003
0004 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
0005 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
0006 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
0007 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0008
0009
0010
0011
0012
0013 class CaloTowerTopology final : public CaloSubdetectorTopology {
0014 public:
0015
0016 CaloTowerTopology(const HcalTopology* topology);
0017
0018 ~CaloTowerTopology() override {}
0019
0020 bool valid(const DetId& id) const override;
0021 virtual bool validDetId(const CaloTowerDetId& id) const;
0022
0023 std::vector<DetId> east(const DetId& id) const override;
0024
0025 std::vector<DetId> west(const DetId& id) const override;
0026
0027 std::vector<DetId> north(const DetId& id) const override;
0028
0029 std::vector<DetId> south(const DetId& id) const override;
0030
0031 std::vector<DetId> up(const DetId& id) const override;
0032
0033 std::vector<DetId> down(const DetId& id) const override;
0034
0035
0036 int firstHBRing() const { return firstHBRing_; }
0037 int lastHBRing() const { return lastHBRing_; }
0038 int firstHERing() const { return firstHERing_; }
0039 int lastHERing() const { return lastHERing_; }
0040 int firstHFRing() const { return firstHFRing_; }
0041 int lastHFRing() const { return lastHFRing_; }
0042 int firstHORing() const { return firstHORing_; }
0043 int lastHORing() const { return lastHORing_; }
0044 int firstHEDoublePhiRing() const { return firstHEDoublePhiRing_; }
0045 int firstHEQuadPhiRing() const { return firstHEQuadPhiRing_; }
0046 int firstHFQuadPhiRing() const { return firstHFQuadPhiRing_; }
0047
0048
0049 int convertCTtoHcal(int ct_ieta) const;
0050 int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const;
0051
0052
0053 uint32_t denseIndex(const DetId& id) const;
0054 CaloTowerDetId detIdFromDenseIndex(uint32_t din) const;
0055 bool validDenseIndex(uint32_t din) const { return (din < kSizeForDenseIndexing); }
0056 uint32_t sizeForDenseIndexing() const { return kSizeForDenseIndexing; }
0057
0058 private:
0059
0060 const HcalTopology* hcaltopo;
0061 int firstHBRing_, lastHBRing_;
0062 int firstHERing_, lastHERing_;
0063 int firstHFRing_, lastHFRing_;
0064 int firstHORing_, lastHORing_;
0065 int firstHEDoublePhiRing_, firstHEQuadPhiRing_, firstHFQuadPhiRing_;
0066 int nSinglePhi_, nDoublePhi_, nQuadPhi_, nEtaHE_;
0067 uint32_t kSizeForDenseIndexing;
0068 };
0069 #endif