CMS 3D CMS Logo

ZdcTopology.h
Go to the documentation of this file.
1 #ifndef Geometry_ForwardGeometry_ZdcTopology_H
2 #define Geometry_ForwardGeometry_ZdcTopology_H 1
3 
4 #include <vector>
9 
17 public:
18  ZdcTopology(const HcalDDDRecConstants* hcons);
19 
20  HcalTopologyMode::Mode mode() const { return mode_; }
22  void exclude(const HcalZDCDetId& id);
24  void exclude(int zside);
28  int exclude(int zside, HcalZDCDetId::Section section, int ich1, int ich2);
29 
32  virtual bool valid(const HcalZDCDetId& id) const;
33 
35  virtual std::vector<DetId> transverse(const DetId& id) const;
36 
38  virtual std::vector<DetId> longitudinal(const DetId& id) const;
39 
40  //** I have to put this here since they inherit from CaloSubdetectorTopology
41  std::vector<DetId> east(const DetId& id) const override;
42  std::vector<DetId> west(const DetId& id) const override;
43  std::vector<DetId> north(const DetId& id) const override;
44  std::vector<DetId> south(const DetId& id) const override;
45  std::vector<DetId> up(const DetId& id) const override;
46  std::vector<DetId> down(const DetId& id) const override;
47 
48  // how many channels (deph) for a given section
51 
52  //return first and last cell of each section
55 
56  uint32_t kSizeForDenseIndexing() const;
57  bool validDenseIndex(uint32_t din) const { return (din < kSizeForDenseIndexing()); }
58 
59  DetId denseId2detId(uint32_t di) const override;
60  uint32_t detId2DenseIndex(const DetId& id) const;
61 
62 private:
63  bool validRaw(const HcalZDCDetId& id) const;
64 
65  bool isExcluded(const HcalZDCDetId& id) const;
66 
67  int firstEMModule() const { return firstEMModule_; }
68  int firstHADModule() const { return firstHADModule_; }
69  int firstLUMModule() const { return firstLUMModule_; }
70  int firstRPDModule() const { return firstRPDModule_; }
71  int lastEMModule() const { return lastEMModule_; }
72  int lastHADModule() const { return lastHADModule_; }
73  int lastLUMModule() const { return lastLUMModule_; }
74  int lastRPDModule() const { return lastRPDModule_; }
75 
78 
79  std::vector<HcalZDCDetId> exclusionList_;
80 
82 
85 };
86 
87 #endif
int firstEMModule_
Definition: ZdcTopology.h:83
std::vector< DetId > down(const DetId &id) const override
Definition: ZdcTopology.cc:295
bool excludeEM_
Definition: ZdcTopology.h:81
int lastRPDModule() const
Definition: ZdcTopology.h:74
void exclude(const HcalZDCDetId &id)
Definition: ZdcTopology.cc:67
int firstLUMModule() const
Definition: ZdcTopology.h:69
int lastLUMModule_
Definition: ZdcTopology.h:83
uint32_t kSizeForDenseIndexing() const
Definition: ZdcTopology.cc:367
bool excludeRPD_
Definition: ZdcTopology.h:81
int firstHADModule() const
Definition: ZdcTopology.h:68
bool excludeHAD_
Definition: ZdcTopology.h:81
int firstRPDModule() const
Definition: ZdcTopology.h:70
int zside(DetId const &)
ZdcTopology(const HcalDDDRecConstants *hcons)
Definition: ZdcTopology.cc:8
std::vector< DetId > up(const DetId &id) const override
Definition: ZdcTopology.cc:290
const HcalDDDRecConstants * hcons_
Definition: ZdcTopology.h:76
virtual bool valid(const DetId &) const
is this detid present in the Topology?
HcalTopologyMode::Mode mode_
Definition: ZdcTopology.h:77
std::vector< DetId > north(const DetId &id) const override
Definition: ZdcTopology.cc:280
int firstRPDModule_
Definition: ZdcTopology.h:83
bool excludeZN_
Definition: ZdcTopology.h:81
int lastLUMModule() const
Definition: ZdcTopology.h:73
HcalTopologyMode::Mode mode() const
Definition: ZdcTopology.h:20
uint32_t detId2DenseIndex(const DetId &id) const
Definition: ZdcTopology.cc:396
std::vector< DetId > south(const DetId &id) const override
Definition: ZdcTopology.cc:285
int firstHADModule_
Definition: ZdcTopology.h:83
DetId denseId2detId(uint32_t di) const override
Definition: ZdcTopology.cc:372
virtual std::vector< DetId > transverse(const DetId &id) const
Definition: ZdcTopology.cc:186
std::vector< HcalZDCDetId > exclusionList_
Definition: ZdcTopology.h:79
bool excludeLUM_
Definition: ZdcTopology.h:81
int lastRPDModule_
Definition: ZdcTopology.h:83
int lastHADModule() const
Definition: ZdcTopology.h:72
virtual bool valid(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:30
int firstCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:323
std::vector< DetId > east(const DetId &id) const override
Definition: ZdcTopology.cc:268
Definition: DetId.h:17
int lastEMModule() const
Definition: ZdcTopology.h:71
std::vector< DetId > west(const DetId &id) const override
Definition: ZdcTopology.cc:274
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
int lastCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:345
bool validRaw(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:164
bool validDenseIndex(uint32_t din) const
Definition: ZdcTopology.h:57
bool excludeZP_
Definition: ZdcTopology.h:81
int lastEMModule_
Definition: ZdcTopology.h:83
bool isExcluded(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:37
int firstLUMModule_
Definition: ZdcTopology.h:83
int firstEMModule() const
Definition: ZdcTopology.h:67
virtual std::vector< DetId > longitudinal(const DetId &id) const
Definition: ZdcTopology.cc:212
int lastHADModule_
Definition: ZdcTopology.h:83