CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ZdcTopology Class Reference

#include <ZdcTopology.h>

Inheritance diagram for ZdcTopology:
CaloSubdetectorTopology

Public Member Functions

std::vector< DetIddown (const DetId &id) const override
 
std::vector< DetIdeast (const DetId &id) const override
 
void exclude (const HcalZDCDetId &id)
 
void exclude (int zside)
 
void exclude (int zside, HcalZDCDetId::Section section)
 
int exclude (int zside, HcalZDCDetId::Section section, int ich1, int ich2)
 
int firstCell (HcalZDCDetId::Section section) const
 
int lastCell (HcalZDCDetId::Section section) const
 
virtual std::vector< DetIdlongitudinal (const DetId &id) const
 
int ncells (HcalZDCDetId::Section section) const
 
std::vector< DetIdnorth (const DetId &id) const override
 
std::vector< DetIdsouth (const DetId &id) const override
 
virtual std::vector< DetIdtransverse (const DetId &id) const
 
std::vector< DetIdup (const DetId &id) const override
 
virtual bool valid (const HcalZDCDetId &id) const
 
std::vector< DetIdwest (const DetId &id) const override
 
 ZdcTopology ()
 
- Public Member Functions inherited from CaloSubdetectorTopology
 CaloSubdetectorTopology ()
 standard constructor More...
 
virtual DetId denseId2detId (unsigned int) const
 return a linear packed id More...
 
virtual bool denseIdConsistent (int topoVer) const
 return whether this topology is consistent with the numbering in the given topology More...
 
virtual unsigned int detId2denseId (const DetId &) const
 return a linear packed id More...
 
virtual std::vector< DetIdgetAllNeighbours (const DetId &id) const
 
virtual std::vector< DetIdgetNeighbours (const DetId &id, const CaloDirection &dir) const
 
virtual std::vector< DetIdgetWindow (const DetId &id, const int &northSouthSize, const int &eastWestSize) const
 
virtual DetId goDown (const DetId &id) const
 
virtual DetId goEast (const DetId &id) const
 
virtual DetId goNorth (const DetId &id) const
 
virtual DetId goSouth (const DetId &id) const
 
virtual DetId goUp (const DetId &id) const
 
virtual DetId goWest (const DetId &id) const
 
virtual unsigned int ncells () const
 return a count of valid cells (for dense indexing use) More...
 
virtual int topoVersion () const
 return a version which identifies the given topology More...
 
virtual bool valid (const DetId &) const
 is this detid present in the Topology? More...
 
virtual ~CaloSubdetectorTopology ()
 virtual destructor More...
 

Private Member Functions

int firstEMModule () const
 
int firstHADModule () const
 
int firstLUMModule () const
 
int firstRPDModule () const
 
bool isExcluded (const HcalZDCDetId &id) const
 
int lastEMModule () const
 
int lastHADModule () const
 
int lastLUMModule () const
 
int lastRPDModule () const
 
bool validRaw (const HcalZDCDetId &id) const
 

Private Attributes

bool excludeEM_
 
bool excludeHAD_
 
bool excludeLUM_
 
bool excludeRPD_
 
bool excludeZN_
 
bool excludeZP_
 
std::vector< HcalZDCDetIdexclusionList_
 
int firstEMModule_
 
int firstHADModule_
 
int firstLUMModule_
 
int firstRPDModule_
 
int lastEMModule_
 
int lastHADModule_
 
int lastLUMModule_
 
int lastRPDModule_
 

Additional Inherited Members

- Protected Types inherited from CaloSubdetectorTopology
typedef std::pair< int, int > Coordinate
 
- Protected Member Functions inherited from CaloSubdetectorTopology
Coordinate getNeighbourIndex (const Coordinate &coord, const CaloDirection &dir) const
 

Detailed Description

Definition at line 14 of file ZdcTopology.h.

Constructor & Destructor Documentation

ZdcTopology::ZdcTopology ( )

Definition at line 11 of file ZdcTopology.cc.

11  :
12  excludeEM_(false),
13  excludeHAD_(false),
14  excludeLUM_(false),
15  excludeRPD_(false),
16  excludeZP_(false),
17  excludeZN_(false),
18  firstEMModule_(1),
19  lastEMModule_(5),
20  firstHADModule_(1),
21  lastHADModule_(4),
22  firstLUMModule_(1),
23  lastLUMModule_(2),
24  firstRPDModule_(1),
25  lastRPDModule_(16)
26 {
27 }
int firstEMModule_
Definition: ZdcTopology.h:62
bool excludeEM_
Definition: ZdcTopology.h:60
int lastLUMModule_
Definition: ZdcTopology.h:62
bool excludeRPD_
Definition: ZdcTopology.h:60
bool excludeHAD_
Definition: ZdcTopology.h:60
int firstRPDModule_
Definition: ZdcTopology.h:62
bool excludeZN_
Definition: ZdcTopology.h:60
int firstHADModule_
Definition: ZdcTopology.h:62
bool excludeLUM_
Definition: ZdcTopology.h:60
int lastRPDModule_
Definition: ZdcTopology.h:62
bool excludeZP_
Definition: ZdcTopology.h:60
int lastEMModule_
Definition: ZdcTopology.h:62
int firstLUMModule_
Definition: ZdcTopology.h:62
int lastHADModule_
Definition: ZdcTopology.h:62

Member Function Documentation

std::vector< DetId > ZdcTopology::down ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in down direction (inward)

Implements CaloSubdetectorTopology.

Definition at line 251 of file ZdcTopology.cc.

References gather_cfg::cout.

252 {
253  std::cout << "ZdcTopology::down() not yet implemented" << std::endl;
254  std::vector<DetId> vNeighborsDetId;
255  return vNeighborsDetId;
256 }
std::vector< DetId > ZdcTopology::east ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in east direction

Implements CaloSubdetectorTopology.

Definition at line 219 of file ZdcTopology.cc.

References gather_cfg::cout.

220 {
221  std::cout << "ZdcTopology::east() not yet implemented" << std::endl;
222  std::vector<DetId> vNeighborsDetId;
223  return vNeighborsDetId;
224 }
void ZdcTopology::exclude ( const HcalZDCDetId id)

Exlucde a cell

Definition at line 57 of file ZdcTopology.cc.

References exclusionList_, mps_fire::i, and triggerObjects_cff::id.

Referenced by exclude().

57  {
58  std::vector<HcalZDCDetId>::iterator
59  i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
60  if (i==exclusionList_.end() || *i!=id) {
61  exclusionList_.insert(i,id);
62  }
63 }
std::vector< HcalZDCDetId > exclusionList_
Definition: ZdcTopology.h:58
void ZdcTopology::exclude ( int  zside)

Exclude a side

Definition at line 65 of file ZdcTopology.cc.

References excludeZN_, and excludeZP_.

65  {
66  switch(zside){
67  case( 1): excludeZP_ = true; break;
68  case(-1): excludeZN_ = true; break;
69  default: break;
70  }
71 }
bool excludeZN_
Definition: ZdcTopology.h:60
bool excludeZP_
Definition: ZdcTopology.h:60
void ZdcTopology::exclude ( int  zside,
HcalZDCDetId::Section  section 
)

Exclude a section, in either side (+1 positive, -1 negative)

Definition at line 73 of file ZdcTopology.cc.

References HcalZDCDetId::EM, excludeEM_, excludeHAD_, excludeLUM_, excludeRPD_, excludeZN_, excludeZP_, HcalZDCDetId::HAD, HcalZDCDetId::LUM, and HcalZDCDetId::RPD.

73  {
74  switch(zside){
75  case( 1): excludeZP_ = true; break;
76  case(-1): excludeZN_ = true; break;
77  default: break;
78  }
79  switch (section) {
80  case(HcalZDCDetId::EM) : excludeEM_ = true; break;
81  case(HcalZDCDetId::HAD) : excludeHAD_ = true; break;
82  case(HcalZDCDetId::LUM) : excludeLUM_ = true; break;
83  case(HcalZDCDetId::RPD) : excludeRPD_ = true; break;
84  default: break;
85  }
86 }
bool excludeEM_
Definition: ZdcTopology.h:60
bool excludeRPD_
Definition: ZdcTopology.h:60
bool excludeHAD_
Definition: ZdcTopology.h:60
bool excludeZN_
Definition: ZdcTopology.h:60
bool excludeLUM_
Definition: ZdcTopology.h:60
bool excludeZP_
Definition: ZdcTopology.h:60
int ZdcTopology::exclude ( int  zside,
HcalZDCDetId::Section  section,
int  ich1,
int  ich2 
)

Exclude a range of channels (deph) for a given subdetector

Definition at line 88 of file ZdcTopology.cc.

References HcalZDCDetId::EM, exclude(), excludeEM_, excludeHAD_, excludeLUM_, excludeRPD_, excludeZN_, excludeZP_, HcalZDCDetId::HAD, triggerObjects_cff::id, HcalZDCDetId::LUM, gen::n, HcalZDCDetId::RPD, and validRaw().

88  {
89  bool exed = false;
90  switch(zside){
91  case( 1): exed = excludeZP_; break;
92  case(-1): exed = excludeZN_; break;
93  default: exed = false;
94  }
95  if (exed) return 0;
96 
97  switch (section) {
98  case(HcalZDCDetId::EM) : exed = excludeEM_; break;
99  case(HcalZDCDetId::HAD) : exed = excludeHAD_; break;
100  case(HcalZDCDetId::LUM) : exed = excludeLUM_; break;
101  case(HcalZDCDetId::RPD) : exed = excludeRPD_; break;
102  default: exed = false;
103  }
104  if (exed) return 0;
105 
106  bool isPositive = false;
107  if(zside == 1)isPositive = true;
108 
109  int n = 0;
110  for (int ich = ich1; ich < ich2; ich++){
111  HcalZDCDetId id(section, isPositive, ich);
112  if(validRaw(id))exclude(id);
113  n++;
114  }
115  return n;
116 }
bool excludeEM_
Definition: ZdcTopology.h:60
void exclude(const HcalZDCDetId &id)
Definition: ZdcTopology.cc:57
bool excludeRPD_
Definition: ZdcTopology.h:60
bool excludeHAD_
Definition: ZdcTopology.h:60
bool validRaw(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:118
bool excludeZN_
Definition: ZdcTopology.h:60
bool excludeLUM_
Definition: ZdcTopology.h:60
bool excludeZP_
Definition: ZdcTopology.h:60
int ZdcTopology::firstCell ( HcalZDCDetId::Section  section) const

Definition at line 270 of file ZdcTopology.cc.

References HcalZDCDetId::EM, firstEMModule_, firstHADModule_, firstLUMModule_, firstRPDModule_, HcalZDCDetId::HAD, HcalZDCDetId::LUM, HcalZDCDetId::RPD, and HcalZDCDetId::Unknown.

Referenced by ZdcHardcodeGeometryLoader::fill().

270  {
271  int firstCell = 0;
272  switch (section) {
273  case(HcalZDCDetId::EM) : firstCell = firstEMModule_ ; break;
274  case(HcalZDCDetId::HAD) : firstCell = firstHADModule_; break;
275  case(HcalZDCDetId::LUM) : firstCell = firstLUMModule_; break;
276  case(HcalZDCDetId::RPD) : firstCell = firstRPDModule_; break;
277  case(HcalZDCDetId::Unknown) : firstCell = 0; break;
278  }
279  return firstCell;
280 }
int firstEMModule_
Definition: ZdcTopology.h:62
int firstRPDModule_
Definition: ZdcTopology.h:62
int firstHADModule_
Definition: ZdcTopology.h:62
int firstCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:270
int firstLUMModule_
Definition: ZdcTopology.h:62
int ZdcTopology::firstEMModule ( ) const
inlineprivate

Definition at line 67 of file ZdcTopology.h.

References firstEMModule_.

67 {return firstEMModule_;}
int firstEMModule_
Definition: ZdcTopology.h:62
int ZdcTopology::firstHADModule ( ) const
inlineprivate

Definition at line 68 of file ZdcTopology.h.

References firstHADModule_.

68 {return firstHADModule_;}
int firstHADModule_
Definition: ZdcTopology.h:62
int ZdcTopology::firstLUMModule ( ) const
inlineprivate

Definition at line 69 of file ZdcTopology.h.

References firstLUMModule_.

69 {return firstLUMModule_;}
int firstLUMModule_
Definition: ZdcTopology.h:62
int ZdcTopology::firstRPDModule ( ) const
inlineprivate

Definition at line 70 of file ZdcTopology.h.

References firstRPDModule_.

70 {return firstRPDModule_;}
int firstRPDModule_
Definition: ZdcTopology.h:62
bool ZdcTopology::isExcluded ( const HcalZDCDetId id) const
private

Definition at line 36 of file ZdcTopology.cc.

References HcalZDCDetId::EM, excludeEM_, excludeHAD_, excludeLUM_, excludeRPD_, exclusionList_, HcalZDCDetId::HAD, mps_fire::i, triggerObjects_cff::id, HcalZDCDetId::LUM, HcalZDCDetId::RPD, and vertexPlots::section.

Referenced by valid().

36  {
37  bool exed=false;
38 
39  // check for section exclutions
40  switch (id.section()) {
41  case(HcalZDCDetId::EM) : exed = excludeEM_; break;
42  case(HcalZDCDetId::HAD) : exed = excludeHAD_; break;
43  case(HcalZDCDetId::LUM) : exed = excludeLUM_; break;
44  case(HcalZDCDetId::RPD) : exed = excludeRPD_; break;
45  default: exed = false;
46  }
47 
48  // check the entire list
49  if (!exed && !exclusionList_.empty()) {
50  std::vector<HcalZDCDetId>::const_iterator
51  i=std::lower_bound(exclusionList_.begin(),exclusionList_.end(),id);
52  if (i!=exclusionList_.end() && *i==id) exed=true;
53  }
54  return exed;
55 }
bool excludeEM_
Definition: ZdcTopology.h:60
bool excludeRPD_
Definition: ZdcTopology.h:60
bool excludeHAD_
Definition: ZdcTopology.h:60
std::vector< HcalZDCDetId > exclusionList_
Definition: ZdcTopology.h:58
bool excludeLUM_
Definition: ZdcTopology.h:60
int ZdcTopology::lastCell ( HcalZDCDetId::Section  section) const

Definition at line 282 of file ZdcTopology.cc.

References HcalZDCDetId::EM, HcalZDCDetId::HAD, lastEMModule_, lastHADModule_, lastLUMModule_, lastRPDModule_, HcalZDCDetId::LUM, HcalZDCDetId::RPD, and HcalZDCDetId::Unknown.

Referenced by ZdcHardcodeGeometryLoader::fill().

282  {
283  int lastCell = 0;
284  switch (section) {
285  case(HcalZDCDetId::EM) : lastCell = lastEMModule_; break;
286  case(HcalZDCDetId::HAD) : lastCell = lastHADModule_; break;
287  case(HcalZDCDetId::LUM) : lastCell = lastLUMModule_; break;
288  case(HcalZDCDetId::RPD) : lastCell = lastRPDModule_; break;
289  case(HcalZDCDetId::Unknown) : lastCell = 0; break;
290  }
291  return lastCell;
292 }
int lastLUMModule_
Definition: ZdcTopology.h:62
int lastCell(HcalZDCDetId::Section section) const
Definition: ZdcTopology.cc:282
int lastRPDModule_
Definition: ZdcTopology.h:62
int lastEMModule_
Definition: ZdcTopology.h:62
int lastHADModule_
Definition: ZdcTopology.h:62
int ZdcTopology::lastEMModule ( ) const
inlineprivate

Definition at line 71 of file ZdcTopology.h.

References lastEMModule_.

71 {return lastEMModule_;}
int lastEMModule_
Definition: ZdcTopology.h:62
int ZdcTopology::lastHADModule ( ) const
inlineprivate

Definition at line 72 of file ZdcTopology.h.

References lastHADModule_.

72 {return lastHADModule_;}
int lastHADModule_
Definition: ZdcTopology.h:62
int ZdcTopology::lastLUMModule ( ) const
inlineprivate

Definition at line 73 of file ZdcTopology.h.

References lastLUMModule_.

73 {return lastLUMModule_;}
int lastLUMModule_
Definition: ZdcTopology.h:62
int ZdcTopology::lastRPDModule ( ) const
inlineprivate

Definition at line 74 of file ZdcTopology.h.

References lastRPDModule_.

74 {return lastRPDModule_;}
int lastRPDModule_
Definition: ZdcTopology.h:62
std::vector< DetId > ZdcTopology::longitudinal ( const DetId id) const
virtual

Get the longitudinal neighbors (Z) of the given cell

Definition at line 166 of file ZdcTopology.cc.

References HcalZDCDetId::channel(), HcalZDCDetId::HAD, ICH_HAD_MAX, ICH_LUM_MAX, ICH_RPD_MAX, HcalZDCDetId::LUM, DetId::rawId(), HcalZDCDetId::RPD, HcalZDCDetId::section(), validRaw(), and HcalZDCDetId::zside().

166  {
167  std::vector<DetId> vNeighborsDetId;
168  HcalZDCDetId zdcId = HcalZDCDetId(id);
169  HcalZDCDetId zdcDetId;
170  if(validRaw(zdcId) && zdcId.section()== HcalZDCDetId::HAD){
171  bool isPositive = false;
172  if(zdcId.zside()==1)isPositive = true;
173  if(zdcId.channel()==1){
174  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
175  vNeighborsDetId.emplace_back(zdcDetId.rawId());
176  return vNeighborsDetId;
177  }
178  if(zdcId.channel()== ICH_HAD_MAX){
179  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
180  vNeighborsDetId.emplace_back(zdcDetId.rawId());
181  return vNeighborsDetId;
182  }
183  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
184  vNeighborsDetId.emplace_back(zdcDetId.rawId());
185  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
186  vNeighborsDetId.emplace_back(zdcDetId.rawId());
187  }
188  if(validRaw(zdcId) && zdcId.section()== HcalZDCDetId::LUM){
189  bool isPositive = false;
190  if(zdcId.zside()==1)isPositive = true;
191  if(zdcId.channel()==1){
192  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
193  vNeighborsDetId.emplace_back(zdcDetId.rawId());
194  return vNeighborsDetId;
195  }
196  if(zdcId.channel()== ICH_LUM_MAX){
197  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
198  vNeighborsDetId.emplace_back(zdcDetId.rawId());
199  return vNeighborsDetId;
200  }
201  }
202  if(validRaw(zdcId) && zdcId.section()== HcalZDCDetId::RPD){
203  bool isPositive = false;
204  if(zdcId.zside()==1)isPositive = true;
205  if(zdcId.channel()==1){
206  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
207  vNeighborsDetId.emplace_back(zdcDetId.rawId());
208  return vNeighborsDetId;
209  }
210  if(zdcId.channel()== ICH_RPD_MAX){
211  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
212  vNeighborsDetId.emplace_back(zdcDetId.rawId());
213  return vNeighborsDetId;
214  }
215  }
216  return vNeighborsDetId;
217 }
static const int ICH_LUM_MAX
Definition: ZdcTopology.cc:8
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
bool validRaw(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:118
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const int ICH_RPD_MAX
Definition: ZdcTopology.cc:9
int channel() const
get the channel
Definition: HcalZDCDetId.cc:62
Section section() const
get the section
Definition: HcalZDCDetId.cc:47
static const int ICH_HAD_MAX
Definition: ZdcTopology.cc:7
int ZdcTopology::ncells ( HcalZDCDetId::Section  section) const

Definition at line 258 of file ZdcTopology.cc.

References HcalZDCDetId::EM, HcalZDCDetId::HAD, ICH_EM_MAX, ICH_HAD_MAX, ICH_LUM_MAX, ICH_RPD_MAX, HcalZDCDetId::LUM, CaloSubdetectorTopology::ncells(), HcalZDCDetId::RPD, and HcalZDCDetId::Unknown.

258  {
259  int ncells = 0;
260  switch (section) {
261  case(HcalZDCDetId::EM) : ncells = ICH_EM_MAX; break;
262  case(HcalZDCDetId::HAD) : ncells = ICH_HAD_MAX; break;
263  case(HcalZDCDetId::LUM) : ncells = ICH_LUM_MAX; break;
264  case(HcalZDCDetId::RPD) : ncells = ICH_RPD_MAX; break;
265  case(HcalZDCDetId::Unknown) : ncells =0; break;
266  }
267  return ncells;
268 }
static const int ICH_LUM_MAX
Definition: ZdcTopology.cc:8
static const int ICH_EM_MAX
Definition: ZdcTopology.cc:6
static const int ICH_RPD_MAX
Definition: ZdcTopology.cc:9
virtual unsigned int ncells() const
return a count of valid cells (for dense indexing use)
static const int ICH_HAD_MAX
Definition: ZdcTopology.cc:7
std::vector< DetId > ZdcTopology::north ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in north direction

Implements CaloSubdetectorTopology.

Definition at line 233 of file ZdcTopology.cc.

References gather_cfg::cout.

234 {
235  std::cout << "ZdcTopology::north() not yet implemented" << std::endl;
236  std::vector<DetId> vNeighborsDetId;
237  return vNeighborsDetId;
238 }
std::vector< DetId > ZdcTopology::south ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in south direction

Implements CaloSubdetectorTopology.

Definition at line 239 of file ZdcTopology.cc.

References gather_cfg::cout.

240 {
241  std::cout << "ZdcTopology::south() not yet implemented" << std::endl;
242  std::vector<DetId> vNeighborsDetId;
243  return vNeighborsDetId;
244 }
std::vector< DetId > ZdcTopology::transverse ( const DetId id) const
virtual

Get the transverse (X) neighbors of the given cell

Definition at line 141 of file ZdcTopology.cc.

References HcalZDCDetId::channel(), HcalZDCDetId::EM, ICH_EM_MAX, DetId::rawId(), HcalZDCDetId::section(), validRaw(), and HcalZDCDetId::zside().

141  {
142  std::vector<DetId> vNeighborsDetId;
143  HcalZDCDetId zdcId = HcalZDCDetId(id);
144  HcalZDCDetId zdcDetId;
145  if(validRaw(zdcId) && zdcId.section()== HcalZDCDetId::EM){
146  bool isPositive = false;
147  if(zdcId.zside()==1)isPositive = true;
148  if(zdcId.channel()==1){
149  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
150  vNeighborsDetId.emplace_back(zdcDetId.rawId());
151  return vNeighborsDetId;
152  }
153  if(zdcId.channel()== ICH_EM_MAX){
154  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
155  vNeighborsDetId.emplace_back(zdcDetId.rawId());
156  return vNeighborsDetId;
157  }
158  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()-1);
159  vNeighborsDetId.emplace_back(zdcDetId.rawId());
160  zdcDetId = HcalZDCDetId(zdcId.section(), isPositive, zdcId.channel()+1);
161  vNeighborsDetId.emplace_back(zdcDetId.rawId());
162  }
163  return vNeighborsDetId;
164 }
static const int ICH_EM_MAX
Definition: ZdcTopology.cc:6
int zside() const
get the z-side of the cell (1/-1)
Definition: HcalZDCDetId.h:39
bool validRaw(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:118
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int channel() const
get the channel
Definition: HcalZDCDetId.cc:62
Section section() const
get the section
Definition: HcalZDCDetId.cc:47
std::vector< DetId > ZdcTopology::up ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in up direction (outward)

Implements CaloSubdetectorTopology.

Definition at line 245 of file ZdcTopology.cc.

References gather_cfg::cout.

246 {
247  std::cout << "ZdcTopology::up() not yet implemented" << std::endl;
248  std::vector<DetId> vNeighborsDetId;
249  return vNeighborsDetId;
250 }
bool ZdcTopology::valid ( const HcalZDCDetId id) const
virtual

Definition at line 29 of file ZdcTopology.cc.

References isExcluded(), convertSQLiteXML::ok, and validRaw().

Referenced by ZdcHardcodeGeometryLoader::fill().

29  {
30  // check the raw rules
31  bool ok=validRaw(id);
32  ok=ok && !isExcluded(id);
33  return ok;
34 }
bool validRaw(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:118
bool isExcluded(const HcalZDCDetId &id) const
Definition: ZdcTopology.cc:36
bool ZdcTopology::validRaw ( const HcalZDCDetId id) const
private

Definition at line 118 of file ZdcTopology.cc.

References funct::abs(), HcalZDCDetId::EM, HcalZDCDetId::HAD, ICH_EM_MAX, ICH_HAD_MAX, ICH_LUM_MAX, ICH_RPD_MAX, HcalZDCDetId::LUM, convertSQLiteXML::ok, HcalZDCDetId::RPD, vertexPlots::section, and HcalDigiParam_cfi::zside.

Referenced by exclude(), longitudinal(), transverse(), and valid().

118  {
119  bool ok = true;
120  if (abs(id.zside())!=1)
121  ok = false;
122  else if(id.channel() <= 0)
123  ok = false;
124  else if(!(id.section()== HcalZDCDetId::EM ||
125  id.section()== HcalZDCDetId::HAD ||
126  id.section()== HcalZDCDetId::LUM))
127 // id.section()== HcalZDCDetId::LUM ||
128 // id.section()== HcalZDCDetId::RPD))
129  ok = false;
130  else if(id.section()== HcalZDCDetId::EM && id.channel() > ICH_EM_MAX)
131  ok = false;
132  else if(id.section()== HcalZDCDetId::HAD && id.channel() > ICH_HAD_MAX)
133  ok = false;
134  else if(id.section()== HcalZDCDetId::LUM && id.channel() > ICH_LUM_MAX)
135  ok = false;
136  else if(id.section()== HcalZDCDetId::RPD && id.channel() > ICH_RPD_MAX)
137  ok = false;
138  return ok;
139 }
static const int ICH_LUM_MAX
Definition: ZdcTopology.cc:8
static const int ICH_EM_MAX
Definition: ZdcTopology.cc:6
static const int ICH_RPD_MAX
Definition: ZdcTopology.cc:9
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int ICH_HAD_MAX
Definition: ZdcTopology.cc:7
std::vector< DetId > ZdcTopology::west ( const DetId id) const
overridevirtual

Get the neighbors of the given cell in west direction

Implements CaloSubdetectorTopology.

Definition at line 226 of file ZdcTopology.cc.

References gather_cfg::cout.

227 {
228  std::cout << "ZdcTopology::west() not yet implemented" << std::endl;
229  std::vector<DetId> vNeighborsDetId;
230  return vNeighborsDetId;
231 }

Member Data Documentation

bool ZdcTopology::excludeEM_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude(), and isExcluded().

bool ZdcTopology::excludeHAD_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude(), and isExcluded().

bool ZdcTopology::excludeLUM_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude(), and isExcluded().

bool ZdcTopology::excludeRPD_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude(), and isExcluded().

bool ZdcTopology::excludeZN_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude().

bool ZdcTopology::excludeZP_
private

Definition at line 60 of file ZdcTopology.h.

Referenced by exclude().

std::vector<HcalZDCDetId> ZdcTopology::exclusionList_
private

Definition at line 58 of file ZdcTopology.h.

Referenced by exclude(), and isExcluded().

int ZdcTopology::firstEMModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by firstCell(), and firstEMModule().

int ZdcTopology::firstHADModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by firstCell(), and firstHADModule().

int ZdcTopology::firstLUMModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by firstCell(), and firstLUMModule().

int ZdcTopology::firstRPDModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by firstCell(), and firstRPDModule().

int ZdcTopology::lastEMModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by lastCell(), and lastEMModule().

int ZdcTopology::lastHADModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by lastCell(), and lastHADModule().

int ZdcTopology::lastLUMModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by lastCell(), and lastLUMModule().

int ZdcTopology::lastRPDModule_
private

Definition at line 62 of file ZdcTopology.h.

Referenced by lastCell(), and lastRPDModule().