CMS 3D CMS Logo

HashFunctions.cc
Go to the documentation of this file.
3 
4 namespace hcaldqm {
5  using namespace constants;
6  namespace hashfunctions {
10  uint32_t hash_Subdet(HcalDetId const &did) { return utilities::hash(HcalDetId(did.subdet(), 1, 1, 1)); }
11 
12  uint32_t hash_Subdetiphi(HcalDetId const &did) {
13  return utilities::hash(HcalDetId(did.subdet(), 1, did.iphi(), 1));
14  }
15 
16  uint32_t hash_Subdetieta(HcalDetId const &did) {
17  return utilities::hash(HcalDetId(did.subdet(), did.ieta(), 1, 1));
18  }
19 
20  uint32_t hash_Subdetdepth(HcalDetId const &did) {
21  return utilities::hash(HcalDetId(did.subdet(), 1, 1, did.depth()));
22  }
23 
24  uint32_t hash_SubdetPM(HcalDetId const &did) {
25  return utilities::hash(HcalDetId(did.subdet(), did.ieta() > 0 ? 1 : -1, 1, 1));
26  }
27 
28  uint32_t hash_SubdetPMiphi(HcalDetId const &did) {
29  return utilities::hash(HcalDetId(did.subdet(), did.ieta() > 0 ? 1 : -1, did.iphi(), 1));
30  }
31 
32  uint32_t hash_iphi(HcalDetId const &did) { return utilities::hash(HcalDetId(HcalBarrel, 1, did.iphi(), 1)); }
33 
34  uint32_t hash_ieta(HcalDetId const &did) { return utilities::hash(HcalDetId(HcalBarrel, did.ieta(), 1, 1)); }
35 
36  uint32_t hash_depth(HcalDetId const &did) { return utilities::hash(HcalDetId(HcalBarrel, 1, 1, did.depth())); }
37 
38  uint32_t hash_HFPMiphi(HcalDetId const &did) {
39  return utilities::hash(HcalDetId(HcalForward, did.ieta() > 0 ? 1 : -1, did.iphi(), 1));
40  }
41 
42  uint32_t hash_HBHEPartition(HcalDetId const &did) {
43  int iphi = did.iphi();
44  uint32_t hash = 0;
45  if (iphi >= 3 && iphi <= 26)
46  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 3, 1));
47  else if (iphi >= 27 && iphi <= 50)
48  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 27, 1));
49  else
50  hash = utilities::hash(HcalDetId(HcalBarrel, 1, 1, 1));
51 
52  return hash;
53  }
54 
55  uint32_t hash_DChannel(HcalDetId const &did) { return utilities::hash(did); }
56 
57  std::string name_Subdet(HcalDetId const &did) { return constants::SUBDET_NAME[did.subdet() - 1]; }
58 
59  uint32_t hash_Subdet(std::string const &name) {
60  for (int i = 0; i < constants::SUBDET_NUM; i++)
61  if (constants::SUBDET_NAME[i] == name)
62  return (HcalDetId((HcalSubdetector)(i + 1), 1, 1, 1).rawId());
63 
64  return HcalDetId().rawId();
65  }
66 
68  char name[10];
69  sprintf(name, "%s%s", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M");
70  return std::string(name);
71  }
72 
73  uint32_t hash_SubdetPM(std::string const &name) {
74  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
75  if (constants::SUBDETPM_NAME[i] == name)
76  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, 1, 1).rawId();
77 
78  return HcalDetId().rawId();
79  }
80 
82  char name[10];
83  sprintf(name, "%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.iphi());
84  return std::string(name);
85  }
86 
87  uint32_t hash_Subdetiphi(std::string const &name) {
88  std::string sub = name.substr(0, 2);
89  int iphi = std::stoi(name.substr(6, name.length() - 6), nullptr);
90  for (int i = 0; i < constants::SUBDET_NUM; i++)
91  if (constants::SUBDET_NAME[i] == sub)
92  return HcalDetId((HcalSubdetector)(i + 1), 1, iphi, 1).rawId();
93 
94  // default
95  return HcalDetId().rawId();
96  }
97 
99  char name[20];
100  sprintf(name, "%sieta%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta());
101  return std::string(name);
102  }
103 
104  uint32_t hash_Subdetieta(std::string const &name) {
105  std::string sub = name.substr(0, 2);
106  int ieta = std::stoi(name.substr(6, name.length() - 6), nullptr);
107  for (int i = 0; i < constants::SUBDET_NUM; i++)
108  if (constants::SUBDET_NAME[i] == sub)
109  return HcalDetId((HcalSubdetector)(i + 1), ieta, 1, 1).rawId();
110 
111  // default
112  return HcalDetId().rawId();
113  }
114 
116  char name[20];
117  sprintf(name, "%sdepth%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.depth());
118  return std::string(name);
119  }
120 
121  uint32_t hash_Subdetdepth(std::string const &name) {
122  std::string sub = name.substr(0, 2);
123  int depth = std::stoi(name.substr(7, name.length() - 7), nullptr);
124  for (int i = 0; i < constants::SUBDET_NUM; i++)
125  if (constants::SUBDET_NAME[i] == sub)
126  return HcalDetId((HcalSubdetector)(i + 1), 1, 1, depth).rawId();
127 
128  return HcalDetId().rawId();
129  }
130 
132  char name[20];
133  sprintf(
134  name, "%s%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M", did.iphi());
135  return std::string(name);
136  }
137 
138  uint32_t hash_SubdetPMiphi(std::string const &name) {
139  std::string sub = name.substr(0, 3);
140  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
141  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
142  if (constants::SUBDETPM_NAME[i] == sub)
143  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, iphi, 1).rawId();
144 
145  return HcalDetId().rawId();
146  }
147 
149  char name[10];
150  sprintf(name, "iphi%d", did.iphi());
151  return std::string(name);
152  }
153 
154  uint32_t hash_iphi(std::string const &name) {
155  int iphi = std::stoi(name.substr(4, name.length() - 4), nullptr);
156  return HcalDetId(HcalBarrel, 1, iphi, 1).rawId();
157  }
158 
160  char name[10];
161  sprintf(name, "ieta%d", did.ieta());
162  return std::string(name);
163  }
164 
165  uint32_t hash_ieta(std::string const &name) {
166  int ieta = std::stoi(name.substr(4, name.length() - 4), nullptr);
167  return HcalDetId(HcalBarrel, ieta, 1, 1).rawId();
168  }
169 
171  char name[10];
172  sprintf(name, "depth%d", did.depth());
173  return std::string(name);
174  }
175 
176  uint32_t hash_depth(std::string const &name) {
177  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
178  return HcalDetId(HcalBarrel, 1, 1, depth).rawId();
179  }
180 
182  char name[12];
183  snprintf(name, sizeof(name), "HF%ciphi%d", did.ieta() > 0 ? 'P' : 'M', did.iphi());
184  return std::string(name);
185  }
186 
187  uint32_t hash_HFPMiphi(std::string const &name) {
188  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
189  int ieta = name[2] == 'P' ? 1 : -1;
190  return HcalDetId(HcalForward, ieta, iphi, 1).rawId();
191  }
192 
194  char c;
195  if (did.iphi() >= 3 && did.iphi() <= 26)
196  c = 'a';
197  else if (did.iphi() >= 27 && did.iphi() <= 50)
198  c = 'b';
199  else
200  c = 'c';
201  char name[10];
202  sprintf(name, "HBHE%c", c);
203  return std::string(name);
204  }
205 
207  if (name[4] == 'a')
208  return HcalDetId(HcalBarrel, 1, 5, 1).rawId();
209  else if (name[4] == 'b')
210  return HcalDetId(HcalBarrel, 1, 29, 1).rawId();
211  else
212  return HcalDetId(HcalBarrel, 1, 55, 1).rawId();
213 
214  return HcalDetId().rawId();
215  }
216 
218  char name[40];
219  sprintf(
220  name, "%s-%d-%d-%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta(), did.iphi(), did.depth());
221  return std::string(name);
222  }
223 
224  // TODO: Make it work here
225  // Not neccessary right now!
226  uint32_t hash_DChannel(std::string const &name) { return HcalDetId(HcalBarrel, 1, 1, 1).rawId(); }
227 
231  uint32_t hash_FED(HcalElectronicsId const &eid) {
232  if (eid.isVMEid())
234  else {
235  // tmp - we need to hash HF's FEDs with slot in mind
236  // bool isHF = eid.crateId()==22 || eid.crateId()==29 || eid.crateId()==32;
237  // for HF, slot number is either
238  int slotToUse = eid.slot() > 6 ? SLOT_uTCA_MIN + 6 : SLOT_uTCA_MIN;
239  return utilities::hash(HcalElectronicsId(eid.crateId(), slotToUse, FIBER_uTCA_MIN1, FIBERCH_MIN, false));
240  }
241  }
242 
244  // note that hashing of uTCA is done by FED-Slot...
245  return eid.isVMEid()
248  }
249 
250  uint32_t hash_FEDSlot(HcalElectronicsId const &eid) {
251  // note that hashing of VME is done with
252  return eid.isVMEid()
255  }
256 
257  uint32_t hash_Crate(HcalElectronicsId const &eid) {
258  // note hashing of VME is done with dccId
259  // note 2: there are two dccids per crate, <even> and <even+1>. We don't
260  // care about this, so use the even one.
261  return eid.isVMEid()
263  FIBERCH_MIN, FIBER_VME_MIN, SPIGOT_MIN, (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
264  : utilities::hash(
266  }
267 
269  // note hashing of VME is done with dccid and
270  // uTCA with Slots
271  return eid.isVMEid()
273  FIBERCH_MIN, FIBER_VME_MIN, eid.spigot(), (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
275  }
276 
278  return eid.isVMEid()
280  FIBERCH_MIN, FIBER_VME_MIN, eid.spigot(), (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
282  }
283 
284  uint32_t hash_Fiber(HcalElectronicsId const &) { return 0; }
285 
286  uint32_t hash_FiberFiberCh(HcalElectronicsId const &) { return 0; }
287 
288  uint32_t hash_FiberCh(HcalElectronicsId const &eid) { return 0; }
289 
292  : utilities::hash(
294  /* NOTE: as an update - should separate Trigger Eid and Det
295  Eid * return eid.isVMEid() ? eid.isTriggerChainId()?
296  utilities::hash(HcalElectronicsId(SLBCH_MIN,
297  SLB_MIN, SPIGOT_MIN,
298  CRATE_VME_MIN, CRATE_VME_MIN, SLOT_VME_MIN1, 0)):
299  utilities::hash(HcalElectronicsId(FIBERCH_MIN,
300  FIBER_VME_MIN, SPIGOT_MIN,
301  CRATE_VME_MIN))
302  :
303  eid.isTriggerChainId()?
304  utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
305  SLOT_uTCA_MIN, TPFIBER_MIN,
306  TPFIBERCH_MIN, true)): utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
307  SLOT_uTCA_MIN, FIBER_uTCA_MIN1,
308  FIBERCH_MIN, false));
309  */
310  }
311 
313  return eid.isVMEid()
314  ? utilities::hash(HcalElectronicsId(eid.fiberChanId(), eid.fiberIndex(), eid.spigot(), eid.dccid()))
315  : utilities::hash(
316  HcalElectronicsId(eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId(), false));
317  }
318 
320  char name[10];
321  sprintf(name, "FED%d", eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()));
322  return std::string(name);
323  }
324 
325  uint32_t hash_FED(std::string const &name) {
326  int fed = std::stoi(name.substr(3, name.length() - 3), nullptr);
327  if (fed >= constants::FED_uTCA_MIN) {
328  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
329  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
330  } else
332 
333  return HcalElectronicsId().rawId();
334  }
335 
337  char name[20];
338  sprintf(name,
339  "FED%dS%d",
340  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
341  eid.isVMEid() ? eid.spigot() : eid.slot());
342  return std::string(name);
343  }
344 
345  uint32_t hash_FEDSpigot(std::string const &name) {
346  int pos = name.find("S");
347  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
348  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
349  if (fed >= FED_uTCA_MIN) {
350  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
351  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
352  } else
354 
355  return HcalElectronicsId().rawId();
356  }
357 
359  char name[20];
360  sprintf(name,
361  "FED%dS%d",
362  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
363  eid.isVMEid() ? eid.spigot() : eid.slot());
364  return std::string(name);
365  }
366 
367  uint32_t hash_FEDSlot(std::string const &name) {
368  int pos = name.find("S");
369  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
370  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
371  if (fed >= FED_uTCA_MIN) {
372  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
373  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
374  } else
376 
377  return HcalElectronicsId().rawId();
378  }
379 
381  char name[16];
382  sprintf(name, "Crate%d", eid.crateId());
383 
384  // Note: previous, different hashes were returned for the two dccids in a VME
385  // crate. These now count as one crate.
386  // if (eid.isVMEid()) {
387  // sprintf(name, "Crate%d_VME_DCC%d", eid.crateId(), eid.dccid());
388  //} else {
389  // sprintf(name, "Crate%d", eid.crateId());
390  //}
391  return std::string(name);
392  }
393 
394  // TODO: implement - not used at this point
395  uint32_t hash_Crate(std::string const &) { return HcalElectronicsId().rawId(); }
396 
398  char name[20];
399  sprintf(name, "Crate%dS%d", eid.crateId(), eid.isVMEid() ? eid.spigot() : eid.slot());
400  return std::string(name);
401  }
402 
403  // TODO: implement - not used at this point
404  uint32_t hash_CrateSpigot(std::string const &) { return HcalElectronicsId().rawId(); }
405 
407  char name[20];
408  sprintf(name, "Crate%dS%d", eid.crateId(), eid.isVMEid() ? eid.spigot() : eid.slot());
409  return std::string(name);
410  }
411 
412  // TODO: implement - not used at this point
413  uint32_t hash_CrateSlot(std::string const &) { return HcalElectronicsId().rawId(); }
414 
415  std::string name_Fiber(HcalElectronicsId const &) { return "None"; }
416 
417  // TODO: implement - not used at this point
418  uint32_t hash_Fiber(std::string const &) { return HcalElectronicsId().rawId(); }
419 
420  std::string name_FiberFiberCh(HcalElectronicsId const &) { return "None"; }
421 
422  // TODO: implement - not used at this point
423  uint32_t hash_FiberFiberCh(std::string const &) { return HcalElectronicsId().rawId(); }
424 
425  std::string name_FiberCh(HcalElectronicsId const &) { return "None"; }
426 
427  // TODO: implement - not used at this point
428  uint32_t hash_FiberCh(std::string const &) { return HcalElectronicsId().rawId(); }
429 
431  return eid.isVMEid() ? std::string("VME") : std::string("uTCA");
432  }
433 
434  uint32_t hash_Electronics(std::string const &name) {
435  if (name == "VME")
437  else
439 
440  return HcalElectronicsId().rawId();
441  }
442 
444  char name[20];
445  if (eid.isVMEid())
446  sprintf(name, "%d-%d-%d-%d", eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId());
447  else
448  sprintf(name, "%d-%d-%d-%d", eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId());
449  return std::string(name);
450  }
451 
452  // TODO: implement - not used at this point
453  uint32_t hash_EChannel(std::string const &) { return HcalElectronicsId().rawId(); }
454 
458  uint32_t hash_TTSubdet(HcalTrigTowerDetId const &tid) {
459  return utilities::hash(HcalTrigTowerDetId(tid.ietaAbs() >= 29 ? 29 : 1, 1));
460  }
461 
462  uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &tid) {
463  return utilities::hash(
464  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? -1 : 1) : (tid.ieta() < 0 ? -29 : 29), 1));
465  }
466 
468  return utilities::hash(
469  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3), tid.iphi()));
470  }
471 
472  uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &tid) { return 0; }
473 
474  uint32_t hash_TTdepth(HcalTrigTowerDetId const &tid) {
475  return utilities::hash(HcalTrigTowerDetId(1, 1, tid.depth()));
476  }
477 
478  uint32_t hash_TChannel(HcalTrigTowerDetId const &tid) {
479  return utilities::hash(HcalTrigTowerDetId(tid.ieta(), tid.iphi(), tid.depth()));
480  }
481 
483  return constants::TPSUBDET_NAME[tid.ietaAbs() < 29 ? 0 : 1];
484  }
485 
486  uint32_t hash_TTSubdet(std::string const &name) {
487  if (name == "HBHE")
488  return HcalTrigTowerDetId(1, 1).rawId();
489  else
490  return HcalTrigTowerDetId(29, 1).rawId();
491 
492  return HcalTrigTowerDetId().rawId();
493  }
494 
496  return constants::TPSUBDETPM_NAME[tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3)];
497  }
498 
499  uint32_t hash_TTSubdetPM(std::string const &name) {
500  if (name == "HBHEM")
501  return HcalTrigTowerDetId(-1, 1).rawId();
502  else if (name == "HBHEP")
503  return HcalTrigTowerDetId(1, 1).rawId();
504  else if (name == "HFM")
505  return HcalTrigTowerDetId(-29, 1).rawId();
506  else
507  return HcalTrigTowerDetId(29, 1).rawId();
508 
509  return HcalTrigTowerDetId().rawId();
510  }
511 
513  char name[10];
514  sprintf(name, "%siphi%d", name_TTSubdetPM(tid).c_str(), tid.iphi());
515  return std::string(name);
516  }
517 
519  int pos = name.find("iphi");
520  std::string sub = name.substr(0, pos);
521  int iphi = std::stoi(name.substr(pos + 4, name.length() - pos - 4), nullptr);
522  if (name == "HBHEM")
523  return HcalTrigTowerDetId(-1, iphi).rawId();
524  else if (name == "HBHEP")
525  return HcalTrigTowerDetId(1, iphi).rawId();
526  else if (name == "HFM")
527  return HcalTrigTowerDetId(-29, iphi).rawId();
528  else
529  return HcalTrigTowerDetId(29, iphi).rawId();
530 
531  return HcalTrigTowerDetId().rawId();
532  }
533 
534  std::string name_TTSubdetieta(HcalTrigTowerDetId const &tid) { return "None"; }
535 
536  // TODO: implement - not used right now
537  uint32_t hash_TTSubdetieta(std::string const &) { return HcalTrigTowerDetId().rawId(); }
538 
540  char name[10];
541  sprintf(name, "depth%d", tid.depth());
542  return std::string(name);
543  }
544 
545  uint32_t hash_TTdepth(std::string const &name) {
546  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
547  return HcalTrigTowerDetId(1, 1, depth);
548  }
549 
551  std::ostringstream stream;
552  stream << tid;
553  return std::string(stream.str());
554  }
555 
556  // TODO: implement - not used right now
557  uint32_t hash_TChannel(std::string const &) { return HcalTrigTowerDetId().rawId(); }
558  } // namespace hashfunctions
559 } // namespace hcaldqm
std::string name_CrateSpigot(HcalElectronicsId const &)
constexpr uint32_t rawId() const
std::string name_Electronics(HcalElectronicsId const &)
uint32_t hash_Subdetdepth(HcalDetId const &)
std::string name_CrateSlot(HcalElectronicsId const &)
std::string name_Crate(HcalElectronicsId const &)
uint32_t hash_SubdetPM(HcalDetId const &)
int const CRATE_VME_MIN
Definition: Constants.h:83
uint32_t hash_SubdetPMiphi(HcalDetId const &)
int const SUBDET_NUM
Definition: Constants.h:152
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:146
std::string name_FiberFiberCh(HcalElectronicsId const &)
uint32_t hash_TTSubdet(HcalTrigTowerDetId const &)
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:10
uint32_t hash_Subdetiphi(HcalDetId const &)
std::string const TPSUBDETPM_NAME[2 *TPSUBDET_NUM]
Definition: Constants.h:158
std::string name_TTdepth(HcalTrigTowerDetId const &)
std::string name_FiberCh(HcalElectronicsId const &)
std::string name_TChannel(HcalTrigTowerDetId const &)
uint32_t hash_Subdetieta(HcalDetId const &)
std::string name_Subdetieta(HcalDetId const &)
std::string name_Subdetiphi(HcalDetId const &)
uint32_t hash_Crate(HcalElectronicsId const &)
uint32_t hash_iphi(HcalDetId const &)
uint16_t crate2fed(int crate, int slot)
Definition: Utilities.cc:27
uint32_t hash_FED(HcalElectronicsId const &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
uint32_t hash_DChannel(HcalDetId const &)
uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &)
uint32_t hash_FiberFiberCh(HcalElectronicsId const &)
int const SPIGOT_MIN
Definition: Constants.h:108
std::string name_EChannel(HcalElectronicsId const &)
constexpr int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
int const FIBER_VME_MIN
Definition: Constants.h:113
int ieta() const
get the tower ieta
std::string name_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_Fiber(HcalElectronicsId const &)
uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &)
int const FED_uTCA_MIN
Definition: Constants.h:75
std::string name_TTSubdet(HcalTrigTowerDetId const &)
std::string name_SubdetPM(HcalDetId const &)
int const FIBERCH_MIN
Definition: Constants.h:122
int depth() const
get the depth (zero for LHC Run 1, may be nonzero for later runs)
int depth() const
get the tower depth
Definition: HcalDetId.h:166
std::string name_TTSubdetieta(HcalTrigTowerDetId const &)
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:154
uint32_t hash_TChannel(HcalTrigTowerDetId const &)
uint32_t hash(HcalDetId const &)
Definition: Utilities.cc:48
constexpr bool isVMEid() const
int const FED_VME_MIN
Definition: Constants.h:70
uint32_t hash_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_depth(HcalDetId const &)
std::string name_DChannel(HcalDetId const &)
int ieta() const
get the cell ieta
Definition: HcalDetId.h:159
std::string const SUBDETPM_NAME[2 *SUBDET_NUM]
Definition: Constants.h:155
HcalSubdetector
Definition: HcalAssistant.h:31
int const FIBER_uTCA_MIN1
Definition: Constants.h:116
std::string name_HFPMiphi(HcalDetId const &)
constexpr int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
constexpr int crateId() const
get the readout VME crate number
uint32_t hash_TTSubdetPMiphi(HcalTrigTowerDetId const &)
uint32_t hash_FEDSlot(HcalElectronicsId const &)
uint32_t hash_Subdet(HcalDetId const &)
uint32_t hash_FiberCh(HcalElectronicsId const &)
uint32_t hash_ieta(HcalDetId const &)
int const CRATE_uTCA_MIN
Definition: Constants.h:88
std::string name_TTSubdetPMiphi(HcalTrigTowerDetId const &)
int iphi() const
get the cell iphi
Definition: HcalDetId.h:161
std::string name_SubdetPMiphi(HcalDetId const &)
constexpr int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
uint32_t hash_HFPMiphi(HcalDetId const &)
std::string const TPSUBDET_NAME[TPSUBDET_NUM]
Definition: Constants.h:157
uint32_t hash_CrateSlot(HcalElectronicsId const &)
uint32_t hash_CrateSpigot(HcalElectronicsId const &)
std::string name_FED(HcalElectronicsId const &)
constexpr int slot() const
get the htr or uHTR slot
std::string name_ieta(HcalDetId const &)
std::string name_HBHEPartition(HcalDetId const &)
std::string name_depth(HcalDetId const &)
constexpr int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
std::string name_iphi(HcalDetId const &)
uint32_t hash_Electronics(HcalElectronicsId const &)
uint32_t hash_EChannel(HcalElectronicsId const &)
Readout chain identification for Hcal.
uint32_t hash_TTdepth(HcalTrigTowerDetId const &)
int ietaAbs() const
get the absolute value of the tower ieta
int iphi() const
get the tower iphi
int const SLOT_uTCA_MIN
Definition: Constants.h:95
std::string name_TTSubdetPM(HcalTrigTowerDetId const &)
uint32_t hash_HBHEPartition(HcalDetId const &)
std::string name_Fiber(HcalElectronicsId const &)
std::string name_FEDSlot(HcalElectronicsId const &)
std::string name_Subdet(HcalDetId const &)
std::string name_Subdetdepth(HcalDetId const &)