CMS 3D CMS Logo

HGCalTriggerGeometryV9Imp2.cc
Go to the documentation of this file.
2 
10 
11 #include <vector>
12 #include <iostream>
13 #include <fstream>
14 #include <regex>
15 
17 public:
19 
20  void initialize(const edm::ESHandle<CaloGeometry>&) final;
23  const edm::ESHandle<HGCalGeometry>&) final;
24  void reset() final;
25 
26  unsigned getTriggerCellFromCell(const unsigned) const final;
27  unsigned getModuleFromCell(const unsigned) const final;
28  unsigned getModuleFromTriggerCell(const unsigned) const final;
29 
30  geom_set getCellsFromTriggerCell(const unsigned) const final;
31  geom_set getCellsFromModule(const unsigned) const final;
32  geom_set getTriggerCellsFromModule(const unsigned) const final;
33 
34  geom_ordered_set getOrderedCellsFromModule(const unsigned) const final;
35  geom_ordered_set getOrderedTriggerCellsFromModule(const unsigned) const final;
36 
37  geom_set getNeighborsFromTriggerCell(const unsigned) const final;
38 
39  GlobalPoint getTriggerCellPosition(const unsigned) const final;
40  GlobalPoint getModulePosition(const unsigned) const final;
41 
42  bool validTriggerCell(const unsigned) const final;
43  bool disconnectedModule(const unsigned) const final;
44  unsigned triggerLayer(const unsigned) const final;
45 
46 private:
47  // HSc trigger cell grouping
48  unsigned hSc_triggercell_size_ = 2;
49  unsigned hSc_module_size_ = 12; // in TC units (144 TC / panel = 36 e-links)
50 
52 
53  // module related maps
54  std::unordered_map<unsigned, unsigned> wafer_to_module_;
55  std::unordered_multimap<unsigned, unsigned> module_to_wafers_;
56 
57  // Disconnected modules and layers
58  std::unordered_set<unsigned> disconnected_layers_;
59  std::vector<unsigned> trigger_layers_;
60 
61  // layer offsets
62  unsigned heOffset_;
63  unsigned totalLayers_;
64 
65  void fillMaps();
66  bool validCellId(unsigned det, unsigned cell_id) const;
67  bool validTriggerCellFromCells(const unsigned) const;
68 
69  int detIdWaferType(unsigned det, unsigned layer, short waferU, short waferV) const;
70  unsigned packWaferId(int waferU, int waferV) const;
71  void unpackWaferId(unsigned wafer, int& waferU, int& waferV) const;
72 
73  unsigned layerWithOffset(unsigned) const;
74 };
75 
78  hSc_triggercell_size_(conf.getParameter<unsigned>("ScintillatorTriggerCellSize")),
79  hSc_module_size_(conf.getParameter<unsigned>("ScintillatorModuleSize")),
80  l1tModulesMapping_(conf.getParameter<edm::FileInPath>("L1TModulesMapping")),
81  disconnected_layers_(conf.getParameter<std::vector<unsigned>>("DisconnectedLayers").begin(),
82  conf.getParameter<std::vector<unsigned>>("DisconnectedLayers").end()) {}
83 
85  wafer_to_module_.clear();
86  module_to_wafers_.clear();
87 }
88 
90  throw cms::Exception("BadGeometry")
91  << "HGCalTriggerGeometryV9Imp2 geometry cannot be initialized with the V7/V8 HGCAL geometry";
92 }
93 
95  const edm::ESHandle<HGCalGeometry>& hgc_hsi_geometry,
96  const edm::ESHandle<HGCalGeometry>& hgc_hsc_geometry) {
97  setEEGeometry(hgc_ee_geometry);
98  setHSiGeometry(hgc_hsi_geometry);
99  setHScGeometry(hgc_hsc_geometry);
102  trigger_layers_.resize(totalLayers_ + 1);
103  trigger_layers_[0] = 0; // layer number 0 doesn't exist
104  unsigned trigger_layer = 1;
105  for (unsigned layer = 1; layer < trigger_layers_.size(); layer++) {
106  if (disconnected_layers_.find(layer) == disconnected_layers_.end()) {
107  // Increase trigger layer number if the layer is not disconnected
108  trigger_layers_[layer] = trigger_layer;
109  trigger_layer++;
110  } else {
111  trigger_layers_[layer] = 0;
112  }
113  }
114  fillMaps();
115 }
116 
117 unsigned HGCalTriggerGeometryV9Imp2::getTriggerCellFromCell(const unsigned cell_id) const {
118  unsigned det = DetId(cell_id).det();
119  unsigned trigger_cell_id = 0;
120  // Scintillator
121  if (det == DetId::HGCalHSc) {
122  // Very rough mapping from cells to TC
123  HGCScintillatorDetId cell_sc_id(cell_id);
124  int ieta = ((cell_sc_id.ietaAbs() - 1) / hSc_triggercell_size_ + 1) * cell_sc_id.zside();
125  int iphi = (cell_sc_id.iphi() - 1) / hSc_triggercell_size_ + 1;
126  trigger_cell_id = HGCScintillatorDetId(cell_sc_id.type(), cell_sc_id.layer(), ieta, iphi);
127  }
128  // Silicon
129  else if (det == DetId::HGCalEE || det == DetId::HGCalHSi) {
130  HGCSiliconDetId cell_si_id(cell_id);
131  trigger_cell_id = HGCalTriggerDetId(
133  cell_si_id.zside(),
134  cell_si_id.type(),
135  cell_si_id.layer(),
136  cell_si_id.waferU(),
137  cell_si_id.waferV(),
138  cell_si_id.triggerCellU(),
139  cell_si_id.triggerCellV());
140  }
141  return trigger_cell_id;
142 }
143 
144 unsigned HGCalTriggerGeometryV9Imp2::getModuleFromCell(const unsigned cell_id) const {
146 }
147 
148 unsigned HGCalTriggerGeometryV9Imp2::getModuleFromTriggerCell(const unsigned trigger_cell_id) const {
149  unsigned det = DetId(trigger_cell_id).det();
150  unsigned module = 0;
151  unsigned subdet_old = 0;
152  int zside = 0;
153  unsigned tc_type = 1;
154  unsigned layer = 0;
155  unsigned module_id = 0;
156  // Scintillator
157  if (det == DetId::HGCalHSc) {
158  HGCScintillatorDetId trigger_cell_sc_id(trigger_cell_id);
159  tc_type = trigger_cell_sc_id.type();
160  layer = trigger_cell_sc_id.layer();
161  zside = trigger_cell_sc_id.zside();
162  int ieta = ((trigger_cell_sc_id.ietaAbs() - 1) / hSc_module_size_ + 1) * zside;
163  int iphi = (trigger_cell_sc_id.iphi() - 1) / hSc_module_size_ + 1;
164  module_id = HGCScintillatorDetId(tc_type, layer, ieta, iphi);
165  }
166  // Silicon
167  else {
168  HGCalTriggerDetId trigger_cell_trig_id(trigger_cell_id);
169  unsigned subdet = trigger_cell_trig_id.subdet();
170  subdet_old =
172  layer = trigger_cell_trig_id.layer();
173  zside = trigger_cell_trig_id.zside();
175  int waferu = trigger_cell_trig_id.waferU();
176  int waferv = trigger_cell_trig_id.waferV();
177  auto module_itr = wafer_to_module_.find(packWaferId(waferu, waferv));
178  if (module_itr == wafer_to_module_.end()) {
179  throw cms::Exception("BadGeometry")
180  << trigger_cell_trig_id << "HGCalTriggerGeometry: Wafer (" << waferu << "," << waferv
181  << ") is not mapped to any trigger module. The module mapping should be modified. \n";
182  }
183  module = module_itr->second;
184  }
185  module_id =
186  HGCalDetId((ForwardSubdetector)subdet_old, zside, layer, tc_type, module, HGCalDetId::kHGCalCellMask).rawId();
187  }
188  return module_id;
189 }
190 
192  const unsigned trigger_cell_id) const {
193  DetId trigger_cell_det_id(trigger_cell_id);
194  unsigned det = trigger_cell_det_id.det();
195  geom_set cell_det_ids;
196  // Scintillator
197  if (det == DetId::HGCalHSc) {
198  HGCScintillatorDetId trigger_cell_sc_id(trigger_cell_id);
199  int ieta0 = (trigger_cell_sc_id.ietaAbs() - 1) * hSc_triggercell_size_ + 1;
200  int iphi0 = (trigger_cell_sc_id.iphi() - 1) * hSc_triggercell_size_ + 1;
201  for (int ietaAbs = ieta0; ietaAbs < ieta0 + (int)hSc_triggercell_size_; ietaAbs++) {
202  int ieta = ietaAbs * trigger_cell_sc_id.zside();
203  for (int iphi = iphi0; iphi < iphi0 + (int)hSc_triggercell_size_; iphi++) {
204  unsigned cell_id = HGCScintillatorDetId(trigger_cell_sc_id.type(), trigger_cell_sc_id.layer(), ieta, iphi);
205  if (validCellId(DetId::HGCalHSc, cell_id))
206  cell_det_ids.emplace(cell_id);
207  }
208  }
209  }
210  // Silicon
211  else {
212  HGCalTriggerDetId trigger_cell_trig_id(trigger_cell_id);
213  unsigned subdet = trigger_cell_trig_id.subdet();
216  int layer = trigger_cell_trig_id.layer();
217  int zside = trigger_cell_trig_id.zside();
218  int type = trigger_cell_trig_id.type();
219  int waferu = trigger_cell_trig_id.waferU();
220  int waferv = trigger_cell_trig_id.waferV();
221  std::vector<int> cellus = trigger_cell_trig_id.cellU();
222  std::vector<int> cellvs = trigger_cell_trig_id.cellV();
223  for (unsigned ic = 0; ic < cellus.size(); ic++) {
224  HGCSiliconDetId cell_det_id(cell_det, zside, type, layer, waferu, waferv, cellus[ic], cellvs[ic]);
225  cell_det_ids.emplace(cell_det_id.rawId());
226  }
227  }
228  }
229  return cell_det_ids;
230 }
231 
233  geom_set cell_det_ids;
234  geom_set trigger_cells = getTriggerCellsFromModule(module_id);
235  for (auto trigger_cell_id : trigger_cells) {
236  geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
237  cell_det_ids.insert(cells.begin(), cells.end());
238  }
239  return cell_det_ids;
240 }
241 
243  const unsigned module_id) const {
244  geom_ordered_set cell_det_ids;
245  geom_ordered_set trigger_cells = getOrderedTriggerCellsFromModule(module_id);
246  for (auto trigger_cell_id : trigger_cells) {
247  geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
248  cell_det_ids.insert(cells.begin(), cells.end());
249  }
250  return cell_det_ids;
251 }
252 
254  const unsigned module_id) const {
255  DetId module_det_id(module_id);
256  unsigned det = module_det_id.det();
257  geom_set trigger_cell_det_ids;
258  // Scintillator
259  if (det == DetId::HGCalHSc) {
260  HGCScintillatorDetId module_sc_id(module_id);
261  int ieta0 = (module_sc_id.ietaAbs() - 1) * hSc_module_size_ + 1;
262  int iphi0 = (module_sc_id.iphi() - 1) * hSc_module_size_ + 1;
263  for (int ietaAbs = ieta0; ietaAbs < ieta0 + (int)hSc_module_size_; ietaAbs++) {
264  int ieta = ietaAbs * module_sc_id.zside();
265  for (int iphi = iphi0; iphi < iphi0 + (int)hSc_module_size_; iphi++) {
266  unsigned trigger_cell_id = HGCScintillatorDetId(module_sc_id.type(), module_sc_id.layer(), ieta, iphi);
267  if (validTriggerCellFromCells(trigger_cell_id))
268  trigger_cell_det_ids.emplace(trigger_cell_id);
269  }
270  }
271  }
272  // Silicon
273  else {
274  HGCalDetId module_si_id(module_id);
275  unsigned module = module_si_id.wafer();
276  HGCSiliconDetIdToROC tc2roc;
277  auto wafer_itrs = module_to_wafers_.equal_range(module);
278  // loop on the wafers included in the module
279  for (auto wafer_itr = wafer_itrs.first; wafer_itr != wafer_itrs.second; wafer_itr++) {
280  int waferu = 0;
281  int waferv = 0;
282  unpackWaferId(wafer_itr->second, waferu, waferv);
284  HGCalTriggerSubdetector subdet =
287  unsigned layer = module_si_id.layer();
288  unsigned wafer_type = detIdWaferType(det, layer, waferu, waferv);
289  int nroc = (wafer_type == HGCSiliconDetId::HGCalFine ? 6 : 3);
290  // Loop on ROCs in wafer
291  for (int roc = 1; roc <= nroc; roc++) {
292  // loop on TCs in ROC
293  auto tc_uvs = tc2roc.getTriggerId(roc, wafer_type);
294  for (const auto& tc_uv : tc_uvs) {
295  HGCalTriggerDetId trigger_cell_id(
296  subdet, module_si_id.zside(), wafer_type, layer, waferu, waferv, tc_uv.first, tc_uv.second);
297  if (validTriggerCellFromCells(trigger_cell_id))
298  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
299  }
300  }
301  }
302  }
303  return trigger_cell_det_ids;
304 }
305 
307  const unsigned module_id) const {
308  DetId module_det_id(module_id);
309  unsigned det = module_det_id.det();
310  geom_ordered_set trigger_cell_det_ids;
311  // Scintillator
312  if (det == DetId::HGCalHSc) {
313  HGCScintillatorDetId module_sc_id(module_id);
314  int ieta0 = (module_sc_id.ietaAbs() - 1) * hSc_module_size_ + 1;
315  int iphi0 = (module_sc_id.iphi() - 1) * hSc_module_size_ + 1;
316  for (int ietaAbs = ieta0; ietaAbs < ieta0 + (int)hSc_module_size_; ietaAbs++) {
317  int ieta = ietaAbs * module_sc_id.zside();
318  for (int iphi = iphi0; iphi < iphi0 + (int)hSc_module_size_; iphi++) {
319  unsigned trigger_cell_id = HGCScintillatorDetId(module_sc_id.type(), module_sc_id.layer(), ieta, iphi);
320  if (validTriggerCellFromCells(trigger_cell_id))
321  trigger_cell_det_ids.emplace(trigger_cell_id);
322  }
323  }
324  }
325  // EE or FH
326  else {
327  HGCalDetId module_si_id(module_id);
328  unsigned module = module_si_id.wafer();
329  HGCSiliconDetIdToROC tc2roc;
330  auto wafer_itrs = module_to_wafers_.equal_range(module);
331  // loop on the wafers included in the module
332  for (auto wafer_itr = wafer_itrs.first; wafer_itr != wafer_itrs.second; wafer_itr++) {
333  int waferu = 0;
334  int waferv = 0;
335  unpackWaferId(wafer_itr->second, waferu, waferv);
337  HGCalTriggerSubdetector subdet =
340  unsigned layer = module_si_id.layer();
341  unsigned wafer_type = detIdWaferType(det, layer, waferu, waferv);
342  int nroc = (wafer_type == HGCSiliconDetId::HGCalFine ? 6 : 3);
343  // Loop on ROCs in wafer
344  for (int roc = 1; roc <= nroc; roc++) {
345  // loop on TCs in ROC
346  auto tc_uvs = tc2roc.getTriggerId(roc, wafer_type);
347  for (const auto& tc_uv : tc_uvs) {
348  HGCalTriggerDetId trigger_cell_id(
349  subdet, module_si_id.zside(), wafer_type, layer, waferu, waferv, tc_uv.first, tc_uv.second);
350  trigger_cell_det_ids.emplace(trigger_cell_id.rawId());
351  }
352  }
353  }
354  }
355  return trigger_cell_det_ids;
356 }
357 
359  const unsigned trigger_cell_id) const {
360  HGCalDetId trigger_cell_det_id(trigger_cell_id);
361  geom_set neighbor_detids;
362  return neighbor_detids;
363 }
364 
365 GlobalPoint HGCalTriggerGeometryV9Imp2::getTriggerCellPosition(const unsigned trigger_cell_det_id) const {
366  unsigned det = DetId(trigger_cell_det_id).det();
367  // Position: barycenter of the trigger cell.
368  Basic3DVector<float> triggerCellVector(0., 0., 0.);
369  const auto cell_ids = getCellsFromTriggerCell(trigger_cell_det_id);
370  // Scintillator
371  if (det == DetId::HGCalHSc) {
372  for (const auto& cell : cell_ids) {
373  HGCScintillatorDetId cellDetId(cell);
374  triggerCellVector += hscGeometry()->getPosition(cellDetId).basicVector();
375  }
376  }
377  // Silicon
378  else {
379  for (const auto& cell : cell_ids) {
380  HGCSiliconDetId cellDetId(cell);
381  triggerCellVector += (cellDetId.det() == DetId::HGCalEE ? eeGeometry()->getPosition(cellDetId)
382  : hsiGeometry()->getPosition(cellDetId))
383  .basicVector();
384  }
385  }
386  return GlobalPoint(triggerCellVector / cell_ids.size());
387 }
388 
389 GlobalPoint HGCalTriggerGeometryV9Imp2::getModulePosition(const unsigned module_det_id) const {
390  unsigned det = DetId(module_det_id).det();
391  // Position: barycenter of the module.
392  Basic3DVector<float> moduleVector(0., 0., 0.);
393  const auto cell_ids = getCellsFromModule(module_det_id);
394  // Scintillator
395  if (det == DetId::HGCalHSc) {
396  for (const auto& cell : cell_ids) {
397  HGCScintillatorDetId cellDetId(cell);
398  moduleVector += hscGeometry()->getPosition(cellDetId).basicVector();
399  }
400  }
401  // Silicon
402  else {
403  for (const auto& cell : cell_ids) {
404  HGCSiliconDetId cellDetId(cell);
405  moduleVector += (cellDetId.det() == DetId::HGCalEE ? eeGeometry()->getPosition(cellDetId)
406  : hsiGeometry()->getPosition(cellDetId))
407  .basicVector();
408  }
409  }
410  return GlobalPoint(moduleVector / cell_ids.size());
411 }
412 
414  // read module mapping file
415  std::ifstream l1tModulesMappingStream(l1tModulesMapping_.fullPath());
416  if (!l1tModulesMappingStream.is_open()) {
417  throw cms::Exception("MissingDataFile") << "Cannot open HGCalTriggerGeometry L1TModulesMapping file\n";
418  }
419  short waferu = 0;
420  short waferv = 0;
421  short module = 0;
422  for (; l1tModulesMappingStream >> waferu >> waferv >> module;) {
423  unsigned wafer_key = packWaferId(waferu, waferv);
424  wafer_to_module_.emplace(wafer_key, module);
425  module_to_wafers_.emplace(module, wafer_key);
426  }
427  if (!l1tModulesMappingStream.eof()) {
428  throw cms::Exception("BadGeometryFile")
429  << "Error reading L1TModulesMapping '" << waferu << " " << waferv << " " << module << "' \n";
430  }
431  l1tModulesMappingStream.close();
432 }
433 
434 unsigned HGCalTriggerGeometryV9Imp2::packWaferId(int waferU, int waferV) const {
435  unsigned packed_value = 0;
436  unsigned waferUsign = (waferU >= 0) ? 0 : 1;
437  unsigned waferVsign = (waferV >= 0) ? 0 : 1;
442  return packed_value;
443 }
444 
445 void HGCalTriggerGeometryV9Imp2::unpackWaferId(unsigned wafer, int& waferU, int& waferV) const {
449  : waferUAbs);
451  : waferVAbs);
452 }
453 
454 bool HGCalTriggerGeometryV9Imp2::validTriggerCell(const unsigned trigger_cell_id) const {
455  return validTriggerCellFromCells(trigger_cell_id);
456 }
457 
458 bool HGCalTriggerGeometryV9Imp2::disconnectedModule(const unsigned module_id) const {
459  bool disconnected = false;
460  if (disconnected_layers_.find(layerWithOffset(module_id)) != disconnected_layers_.end())
461  disconnected = true;
462  return disconnected;
463 }
464 
465 unsigned HGCalTriggerGeometryV9Imp2::triggerLayer(const unsigned id) const {
466  unsigned layer = layerWithOffset(id);
467  if (layer >= trigger_layers_.size())
468  return 0;
469  return trigger_layers_[layer];
470 }
471 
472 bool HGCalTriggerGeometryV9Imp2::validTriggerCellFromCells(const unsigned trigger_cell_id) const {
473  // Check the validity of a trigger cell with the
474  // validity of the cells. One valid cell in the
475  // trigger cell is enough to make the trigger cell
476  // valid.
477  const geom_set cells = getCellsFromTriggerCell(trigger_cell_id);
478  bool is_valid = false;
479  for (const auto cell_id : cells) {
480  unsigned det = DetId(cell_id).det();
481  is_valid |= validCellId(det, cell_id);
482  if (is_valid)
483  break;
484  }
485  return is_valid;
486 }
487 
488 bool HGCalTriggerGeometryV9Imp2::validCellId(unsigned subdet, unsigned cell_id) const {
489  bool is_valid = false;
490  switch (subdet) {
491  case DetId::HGCalEE:
492  is_valid = eeTopology().valid(cell_id);
493  break;
494  case DetId::HGCalHSi:
495  is_valid = hsiTopology().valid(cell_id);
496  break;
497  case DetId::HGCalHSc:
498  is_valid = hscTopology().valid(cell_id);
499  break;
500  default:
501  is_valid = false;
502  break;
503  }
504  return is_valid;
505 }
506 
507 int HGCalTriggerGeometryV9Imp2::detIdWaferType(unsigned det, unsigned layer, short waferU, short waferV) const {
508  int wafer_type = 0;
509  switch (det) {
510  case DetId::HGCalEE:
511  wafer_type = eeTopology().dddConstants().getTypeHex(layer, waferU, waferV);
512  break;
513  case DetId::HGCalHSi:
514  wafer_type = hsiTopology().dddConstants().getTypeHex(layer, waferU, waferV);
515  break;
516  default:
517  break;
518  };
519  return wafer_type;
520 }
521 
522 unsigned HGCalTriggerGeometryV9Imp2::layerWithOffset(unsigned id) const {
523  unsigned det = DetId(id).det();
524  unsigned layer = 0;
525  if (det == DetId::HGCalTrigger) {
526  unsigned subdet = HGCalTriggerDetId(id).subdet();
528  layer = HGCalTriggerDetId(id).layer();
529  } else if (subdet == HGCalTriggerSubdetector::HGCalHSiTrigger) {
530  layer = heOffset_ + HGCalTriggerDetId(id).layer();
531  }
532  } else if (det == DetId::HGCalHSc) {
533  layer = heOffset_ + HGCScintillatorDetId(id).layer();
534  } else if (det == DetId::Forward) {
535  unsigned subdet = HGCalDetId(id).subdetId();
536  if (subdet == ForwardSubdetector::HGCEE) {
537  layer = HGCalDetId(id).layer();
538  } else if (subdet == ForwardSubdetector::HGCHEF || subdet == ForwardSubdetector::HGCHEB) {
539  layer = heOffset_ + HGCalTriggerDetId(id).layer();
540  }
541  }
542  return layer;
543 }
544 
HGCalTriggerSubdetector
unsigned getModuleFromCell(const unsigned) const final
type
Definition: HCALResponse.h:21
static const int kHGCalWaferVOffset
bool validCellId(unsigned det, unsigned cell_id) const
geom_set getNeighborsFromTriggerCell(const unsigned) const final
unsigned packWaferId(int waferU, int waferV) const
HGCalTriggerSubdetector subdet() const
get the subdetector
int detIdWaferType(unsigned det, unsigned layer, short waferU, short waferV) const
unsigned triggerLayer(const unsigned) const final
bool is_valid(const Digi &d)
Definition: GenericDigi.h:64
GlobalPoint getTriggerCellPosition(const unsigned) const final
int waferU() const
std::vector< unsigned > trigger_layers_
const HGCalGeometry * eeGeometry() const
const HGCalTopology & eeTopology() const
static const int kHGCalWaferVSignOffset
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
int getTypeHex(int layer, int waferU, int waferV) const
int type() const
get the type
GlobalPoint getPosition(const DetId &id) const
int zside() const
get the z-side of the cell (1/-1)
std::unordered_map< unsigned, unsigned > wafer_to_module_
int zside() const
get the z-side of the cell (1/-1)
int zside(DetId const &)
const HGCalTopology & hsiTopology() const
void setEEGeometry(const edm::ESHandle< HGCalGeometry > &geom)
ForwardSubdetector
int type() const
get the type
unsigned getTriggerCellFromCell(const unsigned) const final
std::vector< std::pair< int, int > > getTriggerId(int roc, int type) const
int layer() const
get the layer #
static const int kHGCalCellMask
Definition: HGCalDetId.h:13
unsigned int layers(bool reco) const
int zside() const
get the z-side of the cell (1/-1)
Definition: HGCalDetId.h:51
int type() const
get the type
geom_set getCellsFromModule(const unsigned) const final
int layer() const
get the layer #
void unpackWaferId(unsigned wafer, int &waferU, int &waferV) const
int waferV() const
geom_set getCellsFromTriggerCell(const unsigned) const final
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGCalTriggerGeometryV9Imp2(const edm::ParameterSet &conf)
std::vector< int > cellV() const
geom_set getTriggerCellsFromModule(const unsigned) const final
int iphi() const
get the phi index
#define end
Definition: vmac.h:39
int wafer() const
get the wafer #
Definition: HGCalDetId.h:42
geom_ordered_set getOrderedTriggerCellsFromModule(const unsigned) const final
unsigned getModuleFromTriggerCell(const unsigned) const final
bool disconnectedModule(const unsigned) const final
const HGCalGeometry * hsiGeometry() const
GlobalPoint getModulePosition(const unsigned) const final
Definition: DetId.h:18
static const int kHGCalWaferVMask
static const int kHGCalWaferUSignMask
static const int kHGCalWaferUMask
const HGCalDDDConstants & dddConstants() const
const HGCalGeometry * hscGeometry() const
const HGCalTopology & hscTopology() const
static const int kHGCalWaferVSignMask
Detector
Definition: DetId.h:26
geom_ordered_set getOrderedCellsFromModule(const unsigned) const final
std::set< unsigned > geom_ordered_set
void setHScGeometry(const edm::ESHandle< HGCalGeometry > &geom)
int layer() const
get the layer #
int triggerCellU() const
std::unordered_set< unsigned > disconnected_layers_
bool validTriggerCell(const unsigned) const final
std::vector< int > cellU() const
#define begin
Definition: vmac.h:32
HLT enums.
int zside() const
get the z-side of the cell (1/-1)
std::unordered_set< unsigned > geom_set
std::unordered_multimap< unsigned, unsigned > module_to_wafers_
int triggerCellV() const
std::string fullPath() const
Definition: FileInPath.cc:163
unsigned layerWithOffset(unsigned) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
static const int kHGCalWaferUOffset
bool valid(const DetId &id) const override
Is this a valid cell id.
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
Definition: vlib.h:208
static const int kHGCalWaferUSignOffset
void setHSiGeometry(const edm::ESHandle< HGCalGeometry > &geom)
bool validTriggerCellFromCells(const unsigned) const
int layer() const
get the layer #
Definition: HGCalDetId.h:48
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
void initialize(const edm::ESHandle< CaloGeometry > &) final