CMS 3D CMS Logo

CastorTopology.h
Go to the documentation of this file.
1 #ifndef GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H
2 #define GEOMETRY_CALOTOPOLOGY_CASTORTOPOLOGY_H 1
3 
4 #include <vector>
7 
14 public:
17  void exclude(const HcalCastorDetId& id);
19  void exclude(int zside);
21  void exclude(int zside, HcalCastorDetId::Section section);
23  int exclude(int zside,
24  HcalCastorDetId::Section section1,
25  int isec1,
26  int imod1,
27  HcalCastorDetId::Section section2,
28  int isec2,
29  int imod2);
30 
33  virtual bool valid(const HcalCastorDetId& id) const;
34 
36  virtual bool validRaw(const HcalCastorDetId& id) const;
37 
39  virtual std::vector<DetId> incSector(const DetId& id) const;
40 
42  virtual std::vector<DetId> incModule(const DetId& id) const;
43 
44  //** I have to put this here since they inherit from CaloSubdetectorTopology
45  std::vector<DetId> east(const DetId& id) const override;
46  std::vector<DetId> west(const DetId& id) const override;
47  std::vector<DetId> north(const DetId& id) const override;
48  std::vector<DetId> south(const DetId& id) const override;
49  std::vector<DetId> up(const DetId& id) const override;
50  std::vector<DetId> down(const DetId& id) const override;
51 
52  // how many channels (deph) for a given section
54  int ncells(HcalCastorDetId::Section section) const;
55 
56  //return first and last cell of each section
57  int firstCell(HcalCastorDetId::Section section) const;
58  int lastCell(HcalCastorDetId::Section section) const;
59 
60 private:
61  std::vector<HcalCastorDetId> exclusionList_;
62 
64 
66 
67  bool isExcluded(const HcalCastorDetId& id) const;
68 
69  int firstEMModule() const { return firstEMModule_; }
70  int firstHADModule() const { return firstHADModule_; }
71  int lastEMModule() const { return lastEMModule_; }
72  int lastHADModule() const { return lastHADModule_; }
73 };
74 
75 #endif
virtual std::vector< DetId > incModule(const DetId &id) const
std::vector< DetId > north(const DetId &id) const override
virtual bool validRaw(const HcalCastorDetId &id) const
int zside(DetId const &)
std::vector< DetId > up(const DetId &id) const override
std::vector< DetId > south(const DetId &id) const override
std::vector< DetId > west(const DetId &id) const override
int lastHADModule() const
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
virtual bool valid(const HcalCastorDetId &id) const
Definition: DetId.h:17
int lastEMModule() const
virtual std::vector< DetId > incSector(const DetId &id) const
virtual bool valid(const DetId &) const
is this detid present in the Topology?
std::vector< DetId > east(const DetId &id) const override
std::vector< DetId > down(const DetId &id) const override
int firstCell(HcalCastorDetId::Section section) const
bool isExcluded(const HcalCastorDetId &id) const
int firstEMModule() const
int lastCell(HcalCastorDetId::Section section) const
int firstHADModule() const
void exclude(const HcalCastorDetId &id)
std::vector< HcalCastorDetId > exclusionList_