File indexing completed on 2024-04-06 12:14:38
0001 #ifndef GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H
0002 #define GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H 1
0003
0004 #include <vector>
0005 #include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
0006 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
0007
0008
0009
0010
0011
0012
0013 class CastorTopology : public CaloSubdetectorTopology {
0014 public:
0015 CastorTopology();
0016
0017 void exclude(const HcalCastorDetId& id);
0018
0019 void exclude(int zside);
0020
0021 void exclude(int zside, HcalCastorDetId::Section section);
0022
0023 int exclude(int zside,
0024 HcalCastorDetId::Section section1,
0025 int isec1,
0026 int imod1,
0027 HcalCastorDetId::Section section2,
0028 int isec2,
0029 int imod2);
0030
0031
0032 using CaloSubdetectorTopology::valid;
0033 virtual bool valid(const HcalCastorDetId& id) const;
0034
0035
0036 virtual bool validRaw(const HcalCastorDetId& id) const;
0037
0038
0039 virtual std::vector<DetId> incSector(const DetId& id) const;
0040
0041
0042 virtual std::vector<DetId> incModule(const DetId& id) const;
0043
0044
0045 std::vector<DetId> east(const DetId& id) const override;
0046 std::vector<DetId> west(const DetId& id) const override;
0047 std::vector<DetId> north(const DetId& id) const override;
0048 std::vector<DetId> south(const DetId& id) const override;
0049 std::vector<DetId> up(const DetId& id) const override;
0050 std::vector<DetId> down(const DetId& id) const override;
0051
0052
0053 using CaloSubdetectorTopology::ncells;
0054 int ncells(HcalCastorDetId::Section section) const;
0055
0056
0057 int firstCell(HcalCastorDetId::Section section) const;
0058 int lastCell(HcalCastorDetId::Section section) const;
0059
0060 private:
0061 std::vector<HcalCastorDetId> exclusionList_;
0062
0063 bool excludeEM_, excludeHAD_, excludeZP_, excludeZN_;
0064
0065 int firstEMModule_, lastEMModule_, firstHADModule_, lastHADModule_;
0066
0067 bool isExcluded(const HcalCastorDetId& id) const;
0068
0069 int firstEMModule() const { return firstEMModule_; }
0070 int firstHADModule() const { return firstHADModule_; }
0071 int lastEMModule() const { return lastEMModule_; }
0072 int lastHADModule() const { return lastHADModule_; }
0073 };
0074
0075 #endif