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) {
37  if (did.subdet() == HcalOuter)
38  return 9; // key of map, can be any uint32_t valure that is not a raw hcal detid
39  else
40  return utilities::hash(HcalDetId(HcalBarrel, 1, 1, did.depth()));
41  }
42 
43  uint32_t hash_HFPMiphi(HcalDetId const &did) {
44  return utilities::hash(HcalDetId(HcalForward, did.ieta() > 0 ? 1 : -1, did.iphi(), 1));
45  }
46 
47  uint32_t hash_HBHEPartition(HcalDetId const &did) {
48  int iphi = did.iphi();
49  uint32_t hash = 0;
50  if (iphi >= 3 && iphi <= 26)
52  else if (iphi >= 27 && iphi <= 50)
54  else
56 
57  return hash;
58  }
59 
60  uint32_t hash_DChannel(HcalDetId const &did) { return utilities::hash(did); }
61 
62  std::string name_Subdet(HcalDetId const &did) { return constants::SUBDET_NAME[did.subdet() - 1]; }
63 
64  uint32_t hash_Subdet(std::string const &name) {
65  for (int i = 0; i < constants::SUBDET_NUM; i++)
67  return (HcalDetId((HcalSubdetector)(i + 1), 1, 1, 1).rawId());
68 
69  return HcalDetId().rawId();
70  }
71 
73  char name[10];
74  sprintf(name, "%s%s", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M");
75  return std::string(name);
76  }
77 
78  uint32_t hash_SubdetPM(std::string const &name) {
79  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
81  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, 1, 1).rawId();
82 
83  return HcalDetId().rawId();
84  }
85 
87  char name[10];
88  sprintf(name, "%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.iphi());
89  return std::string(name);
90  }
91 
92  uint32_t hash_Subdetiphi(std::string const &name) {
93  std::string sub = name.substr(0, 2);
94  int iphi = std::stoi(name.substr(6, name.length() - 6), nullptr);
95  for (int i = 0; i < constants::SUBDET_NUM; i++)
96  if (constants::SUBDET_NAME[i] == sub)
97  return HcalDetId((HcalSubdetector)(i + 1), 1, iphi, 1).rawId();
98 
99  // default
100  return HcalDetId().rawId();
101  }
102 
104  char name[20];
105  sprintf(name, "%sieta%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta());
106  return std::string(name);
107  }
108 
109  uint32_t hash_Subdetieta(std::string const &name) {
110  std::string sub = name.substr(0, 2);
111  int ieta = std::stoi(name.substr(6, name.length() - 6), nullptr);
112  for (int i = 0; i < constants::SUBDET_NUM; i++)
113  if (constants::SUBDET_NAME[i] == sub)
114  return HcalDetId((HcalSubdetector)(i + 1), ieta, 1, 1).rawId();
115 
116  // default
117  return HcalDetId().rawId();
118  }
119 
121  char name[20];
122  sprintf(name, "%sdepth%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.depth());
123  return std::string(name);
124  }
125 
126  uint32_t hash_Subdetdepth(std::string const &name) {
127  std::string sub = name.substr(0, 2);
128  int depth = std::stoi(name.substr(7, name.length() - 7), nullptr);
129  for (int i = 0; i < constants::SUBDET_NUM; i++)
130  if (constants::SUBDET_NAME[i] == sub)
131  return HcalDetId((HcalSubdetector)(i + 1), 1, 1, depth).rawId();
132 
133  return HcalDetId().rawId();
134  }
135 
137  char name[20];
138  sprintf(
139  name, "%s%siphi%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta() > 0 ? "P" : "M", did.iphi());
140  return std::string(name);
141  }
142 
143  uint32_t hash_SubdetPMiphi(std::string const &name) {
144  std::string sub = name.substr(0, 3);
145  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
146  for (int i = 0; i < constants::SUBDET_NUM * 2; i++)
147  if (constants::SUBDETPM_NAME[i] == sub)
148  return HcalDetId((HcalSubdetector)(i / 2 + 1), i % 2 == 0 ? -1 : 1, iphi, 1).rawId();
149 
150  return HcalDetId().rawId();
151  }
152 
154  char name[10];
155  sprintf(name, "iphi%d", did.iphi());
156  return std::string(name);
157  }
158 
159  uint32_t hash_iphi(std::string const &name) {
160  int iphi = std::stoi(name.substr(4, name.length() - 4), nullptr);
161  return HcalDetId(HcalBarrel, 1, iphi, 1).rawId();
162  }
163 
165  char name[10];
166  sprintf(name, "ieta%d", did.ieta());
167  return std::string(name);
168  }
169 
170  uint32_t hash_ieta(std::string const &name) {
171  int ieta = std::stoi(name.substr(4, name.length() - 4), nullptr);
172  return HcalDetId(HcalBarrel, ieta, 1, 1).rawId();
173  }
174 
176  char name[10];
177  if (did.subdet() == HcalOuter)
178  sprintf(name, "depthHO");
179  else
180  sprintf(name, "depth%d", did.depth());
181  return std::string(name);
182  }
183 
184  uint32_t hash_depth(std::string const &name) {
185  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
186  if (name.find("HO") != std::string::npos)
187  return 9; // must match the value in method hash_depth(& digi)
188  else
189  return HcalDetId(HcalBarrel, 1, 1, depth).rawId();
190  }
191 
193  char name[12];
194  snprintf(name, sizeof(name), "HF%ciphi%d", did.ieta() > 0 ? 'P' : 'M', did.iphi());
195  return std::string(name);
196  }
197 
198  uint32_t hash_HFPMiphi(std::string const &name) {
199  int iphi = std::stoi(name.substr(7, name.length() - 7), nullptr);
200  int ieta = name[2] == 'P' ? 1 : -1;
201  return HcalDetId(HcalForward, ieta, iphi, 1).rawId();
202  }
203 
205  char c;
206  if (did.iphi() >= 3 && did.iphi() <= 26)
207  c = 'a';
208  else if (did.iphi() >= 27 && did.iphi() <= 50)
209  c = 'b';
210  else
211  c = 'c';
212  char name[10];
213  sprintf(name, "HBHE%c", c);
214  return std::string(name);
215  }
216 
218  if (name[4] == 'a')
219  return HcalDetId(HcalBarrel, 1, 5, 1).rawId();
220  else if (name[4] == 'b')
221  return HcalDetId(HcalBarrel, 1, 29, 1).rawId();
222  else
223  return HcalDetId(HcalBarrel, 1, 55, 1).rawId();
224 
225  return HcalDetId().rawId();
226  }
227 
229  char name[40];
230  sprintf(
231  name, "%s-%d-%d-%d", constants::SUBDET_NAME[did.subdet() - 1].c_str(), did.ieta(), did.iphi(), did.depth());
232  return std::string(name);
233  }
234 
235  // TODO: Make it work here
236  // Not neccessary right now!
237  uint32_t hash_DChannel(std::string const &name) { return HcalDetId(HcalBarrel, 1, 1, 1).rawId(); }
238 
242  uint32_t hash_FED(HcalElectronicsId const &eid) {
243  if (eid.isVMEid())
245  else {
246  // HO and HO are dual-FED
247  bool isHF = eid.crateId() == 22 || eid.crateId() == 29 || eid.crateId() == 32;
248  bool isHO = eid.crateId() == 23 || eid.crateId() == 27 || eid.crateId() == 26 || eid.crateId() == 38;
249  // for HF, slot number is either
250  int slotToUse = 1;
251  if (isHF || isHO)
252  slotToUse = eid.slot() > 6 ? SLOT_uTCA_MIN + 6 : SLOT_uTCA_MIN;
253  else
254  slotToUse = eid.slot() > 8 ? SLOT_uTCA_MIN + 8 : (eid.slot() > 4 ? SLOT_uTCA_MIN + 4 : SLOT_uTCA_MIN);
255  return utilities::hash(HcalElectronicsId(eid.crateId(), slotToUse, FIBER_uTCA_MIN1, FIBERCH_MIN, false));
256  }
257  }
258 
260  // note that hashing of uTCA is done by FED-Slot...
261  return eid.isVMEid()
263  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
264  }
265 
266  uint32_t hash_FEDSlot(HcalElectronicsId const &eid) {
267  // note that hashing of VME is done with
268  return eid.isVMEid()
270  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
271  }
272 
273  uint32_t hash_Crate(HcalElectronicsId const &eid) {
274  // note hashing of VME is done with dccId
275  // note 2: there are two dccids per crate, <even> and <even+1>. We don't
276  // care about this, so use the even one.
277  return eid.isVMEid()
279  FIBERCH_MIN, FIBER_VME_MIN, SPIGOT_MIN, (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
280  : utilities::hash(
282  }
283 
285  // note hashing of VME is done with dccid and
286  // uTCA with Slots
287  return eid.isVMEid()
289  FIBERCH_MIN, FIBER_VME_MIN, eid.spigot(), (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
290  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
291  }
292 
294  return eid.isVMEid()
296  FIBERCH_MIN, FIBER_VME_MIN, eid.spigot(), (eid.dccid() % 2 == 0 ? eid.dccid() : eid.dccid() - 1)))
297  : utilities::hash(HcalElectronicsId(eid.crateId(), eid.slot(), FIBER_uTCA_MIN1, FIBERCH_MIN, false));
298  }
299 
300  uint32_t hash_Fiber(HcalElectronicsId const &) { return 0; }
301 
302  uint32_t hash_FiberFiberCh(HcalElectronicsId const &) { return 0; }
303 
304  uint32_t hash_FiberCh(HcalElectronicsId const &eid) { return 0; }
305 
308  : utilities::hash(
310  /* NOTE: as an update - should separate Trigger Eid and Det
311  Eid * return eid.isVMEid() ? eid.isTriggerChainId()?
312  utilities::hash(HcalElectronicsId(SLBCH_MIN,
313  SLB_MIN, SPIGOT_MIN,
314  CRATE_VME_MIN, CRATE_VME_MIN, SLOT_VME_MIN1, 0)):
315  utilities::hash(HcalElectronicsId(FIBERCH_MIN,
316  FIBER_VME_MIN, SPIGOT_MIN,
317  CRATE_VME_MIN))
318  :
319  eid.isTriggerChainId()?
320  utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
321  SLOT_uTCA_MIN, TPFIBER_MIN,
322  TPFIBERCH_MIN, true)): utilities::hash(HcalElectronicsId(CRATE_uTCA_MIN,
323  SLOT_uTCA_MIN, FIBER_uTCA_MIN1,
324  FIBERCH_MIN, false));
325  */
326  }
327 
329  return eid.isVMEid()
330  ? utilities::hash(HcalElectronicsId(eid.fiberChanId(), eid.fiberIndex(), eid.spigot(), eid.dccid()))
331  : utilities::hash(
332  HcalElectronicsId(eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId(), false));
333  }
334 
336  char name[15];
337  sprintf(name, "FED%d", eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()));
338  return std::string(name);
339  }
340 
341  uint32_t hash_FED(std::string const &name) {
342  int fed = std::stoi(name.substr(3, name.length() - 3), nullptr);
343  if (fed >= constants::FED_uTCA_MIN) {
344  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
345  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
346  } else
348 
349  return HcalElectronicsId().rawId();
350  }
351 
353  char name[20];
354  sprintf(name,
355  "FED%dS%d",
356  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
357  eid.isVMEid() ? eid.spigot() : eid.slot());
358  return std::string(name);
359  }
360 
361  uint32_t hash_FEDSpigot(std::string const &name) {
362  int pos = name.find('S');
363  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
364  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
365  if (fed >= FED_uTCA_MIN) {
366  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
367  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
368  } else
370 
371  return HcalElectronicsId().rawId();
372  }
373 
375  char name[20];
376  sprintf(name,
377  "FED%dS%d",
378  eid.isVMEid() ? eid.dccid() + 700 : utilities::crate2fed(eid.crateId(), eid.slot()),
379  eid.isVMEid() ? eid.spigot() : eid.slot());
380  return std::string(name);
381  }
382 
383  uint32_t hash_FEDSlot(std::string const &name) {
384  int pos = name.find('S');
385  int fed = std::stoi(name.substr(3, pos - 3), nullptr);
386  int s = std::stoi(name.substr(pos + 1, name.length() - pos - 1), nullptr);
387  if (fed >= FED_uTCA_MIN) {
388  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
389  return HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId();
390  } else
392 
393  return HcalElectronicsId().rawId();
394  }
395 
397  char name[16];
398  sprintf(name, "Crate%d", eid.crateId());
399 
400  // Note: previous, different hashes were returned for the two dccids in a VME
401  // crate. These now count as one crate.
402  // if (eid.isVMEid()) {
403  // sprintf(name, "Crate%d_VME_DCC%d", eid.crateId(), eid.dccid());
404  //} else {
405  // sprintf(name, "Crate%d", eid.crateId());
406  //}
407  return std::string(name);
408  }
409 
410  // TODO: implement - not used at this point
411  uint32_t hash_Crate(std::string const &) { return HcalElectronicsId().rawId(); }
412 
414  char name[20];
415  sprintf(name, "Crate%dS%d", eid.crateId(), eid.isVMEid() ? eid.spigot() : eid.slot());
416  return std::string(name);
417  }
418 
419  // TODO: implement - not used at this point
420  uint32_t hash_CrateSpigot(std::string const &) { return HcalElectronicsId().rawId(); }
421 
423  char name[20];
424  sprintf(name, "Crate%dS%d", eid.crateId(), eid.isVMEid() ? eid.spigot() : eid.slot());
425  return std::string(name);
426  }
427 
428  // TODO: implement - not used at this point
429  uint32_t hash_CrateSlot(std::string const &) { return HcalElectronicsId().rawId(); }
430 
431  std::string name_Fiber(HcalElectronicsId const &) { return "None"; }
432 
433  // TODO: implement - not used at this point
434  uint32_t hash_Fiber(std::string const &) { return HcalElectronicsId().rawId(); }
435 
436  std::string name_FiberFiberCh(HcalElectronicsId const &) { return "None"; }
437 
438  // TODO: implement - not used at this point
439  uint32_t hash_FiberFiberCh(std::string const &) { return HcalElectronicsId().rawId(); }
440 
441  std::string name_FiberCh(HcalElectronicsId const &) { return "None"; }
442 
443  // TODO: implement - not used at this point
444  uint32_t hash_FiberCh(std::string const &) { return HcalElectronicsId().rawId(); }
445 
447  return eid.isVMEid() ? std::string("VME") : std::string("uTCA");
448  }
449 
450  uint32_t hash_Electronics(std::string const &name) {
451  if (name == "VME")
453  else
455 
456  return HcalElectronicsId().rawId();
457  }
458 
460  char name[20];
461  if (eid.isVMEid())
462  sprintf(name, "%d-%d-%d-%d", eid.dccid(), eid.spigot(), eid.fiberIndex(), eid.fiberChanId());
463  else
464  sprintf(name, "%d-%d-%d-%d", eid.crateId(), eid.slot(), eid.fiberIndex(), eid.fiberChanId());
465  return std::string(name);
466  }
467 
468  // TODO: implement - not used at this point
469  uint32_t hash_EChannel(std::string const &) { return HcalElectronicsId().rawId(); }
470 
474  uint32_t hash_TTSubdet(HcalTrigTowerDetId const &tid) {
475  return utilities::hash(HcalTrigTowerDetId(tid.ietaAbs() >= 29 ? 29 : 1, 1));
476  }
477 
478  uint32_t hash_TTSubdetPM(HcalTrigTowerDetId const &tid) {
479  return utilities::hash(
480  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? -1 : 1) : (tid.ieta() < 0 ? -29 : 29), 1));
481  }
482 
484  return utilities::hash(
485  HcalTrigTowerDetId(tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3), tid.iphi()));
486  }
487 
488  uint32_t hash_TTSubdetieta(HcalTrigTowerDetId const &tid) { return 0; }
489 
490  uint32_t hash_TTdepth(HcalTrigTowerDetId const &tid) {
491  return utilities::hash(HcalTrigTowerDetId(1, 1, tid.depth()));
492  }
493 
494  uint32_t hash_TChannel(HcalTrigTowerDetId const &tid) {
495  return utilities::hash(HcalTrigTowerDetId(tid.ieta(), tid.iphi(), tid.depth()));
496  }
497 
499  return constants::TPSUBDET_NAME[tid.ietaAbs() < 29 ? 0 : 1];
500  }
501 
502  uint32_t hash_TTSubdet(std::string const &name) {
503  if (name == "HBHE")
504  return HcalTrigTowerDetId(1, 1).rawId();
505  else
506  return HcalTrigTowerDetId(29, 1).rawId();
507 
508  return HcalTrigTowerDetId().rawId();
509  }
510 
512  return constants::TPSUBDETPM_NAME[tid.ietaAbs() < 29 ? (tid.ieta() < 0 ? 0 : 1) : (tid.ieta() < 0 ? 2 : 3)];
513  }
514 
515  uint32_t hash_TTSubdetPM(std::string const &name) {
516  if (name == "HBHEM")
517  return HcalTrigTowerDetId(-1, 1).rawId();
518  else if (name == "HBHEP")
519  return HcalTrigTowerDetId(1, 1).rawId();
520  else if (name == "HFM")
521  return HcalTrigTowerDetId(-29, 1).rawId();
522  else
523  return HcalTrigTowerDetId(29, 1).rawId();
524 
525  return HcalTrigTowerDetId().rawId();
526  }
527 
529  char name[10];
530  sprintf(name, "%siphi%d", name_TTSubdetPM(tid).c_str(), tid.iphi());
531  return std::string(name);
532  }
533 
535  int pos = name.find("iphi");
536  std::string sub = name.substr(0, pos);
537  int iphi = std::stoi(name.substr(pos + 4, name.length() - pos - 4), nullptr);
538  if (name == "HBHEM")
539  return HcalTrigTowerDetId(-1, iphi).rawId();
540  else if (name == "HBHEP")
541  return HcalTrigTowerDetId(1, iphi).rawId();
542  else if (name == "HFM")
543  return HcalTrigTowerDetId(-29, iphi).rawId();
544  else
545  return HcalTrigTowerDetId(29, iphi).rawId();
546 
547  return HcalTrigTowerDetId().rawId();
548  }
549 
550  std::string name_TTSubdetieta(HcalTrigTowerDetId const &tid) { return "None"; }
551 
552  // TODO: implement - not used right now
553  uint32_t hash_TTSubdetieta(std::string const &) { return HcalTrigTowerDetId().rawId(); }
554 
556  char name[10];
557  sprintf(name, "depth%d", tid.depth());
558  return std::string(name);
559  }
560 
561  uint32_t hash_TTdepth(std::string const &name) {
562  int depth = std::stoi(name.substr(5, name.length() - 5), nullptr);
563  return HcalTrigTowerDetId(1, 1, depth);
564  }
565 
567  std::ostringstream stream;
568  stream << tid;
569  return std::string(stream.str());
570  }
571 
572  // TODO: implement - not used right now
573  uint32_t hash_TChannel(std::string const &) { return HcalTrigTowerDetId().rawId(); }
574 
579  if (tid.ietaAbs() < 29) {
580  if (eid.slot() % 3 == 1)
581  return utilities::hash(HcalTrigTowerDetId(1, 1));
582  else if (eid.slot() % 3 == 2)
583  return utilities::hash(HcalTrigTowerDetId(17, 1));
584  else if (eid.slot() % 3 == 0)
585  return utilities::hash(HcalTrigTowerDetId(19, 1));
586  } else
587  return utilities::hash(HcalTrigTowerDetId(29, 1));
588 
589  return HcalTrigTowerDetId().rawId();
590  }
591 
593  int idx = -1;
594  if (tid.ietaAbs() < 29) {
595  if (eid.slot() % 3 == 1)
596  idx = 0;
597  else if (eid.slot() % 3 == 2)
598  idx = 1;
599  else if (eid.slot() % 3 == 0)
600  idx = 2;
601  } else
602  idx = 3;
604  }
605 
606  uint32_t hash_TTSubdetFW(std::string const &name) {
607  if (name == "HB")
608  return HcalTrigTowerDetId(1, 1).rawId();
609  else if (name == "HBHE")
610  return HcalTrigTowerDetId(17, 1).rawId();
611  else if (name == "HE")
612  return HcalTrigTowerDetId(19, 1).rawId();
613  else
614  return HcalTrigTowerDetId(29, 1).rawId();
615 
616  return HcalTrigTowerDetId().rawId();
617  }
618 
619  } // namespace hashfunctions
620 } // namespace hcaldqm
std::string name_CrateSpigot(HcalElectronicsId const &)
uint32_t hash_TTSubdetFW(HcalTrigTowerDetId const &, HcalElectronicsId 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:99
uint32_t hash_SubdetPMiphi(HcalDetId const &)
int const SUBDET_NUM
Definition: Constants.h:168
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:174
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:29
uint32_t hash_FED(HcalElectronicsId const &)
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:124
std::string name_EChannel(HcalElectronicsId const &)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
int const FIBER_VME_MIN
Definition: Constants.h:129
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:91
std::string name_TTSubdet(HcalTrigTowerDetId const &)
std::string name_SubdetPM(HcalDetId const &)
int const FIBERCH_MIN
Definition: Constants.h:138
int iphi() const
get the tower iphi
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
std::string name_TTSubdetieta(HcalTrigTowerDetId const &)
std::string const SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:170
uint32_t hash_TChannel(HcalTrigTowerDetId const &)
uint32_t hash(HcalDetId const &)
Definition: Utilities.cc:62
int depth() const
get the depth (zero for LHC Run 1, may be nonzero for later runs)
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
int const FED_VME_MIN
Definition: Constants.h:86
uint32_t hash_FEDSpigot(HcalElectronicsId const &)
uint32_t hash_depth(HcalDetId const &)
std::string name_DChannel(HcalDetId const &)
std::string const SUBDETPM_NAME[2 *SUBDET_NUM]
Definition: Constants.h:171
HcalSubdetector
Definition: HcalAssistant.h:31
int const FIBER_uTCA_MIN1
Definition: Constants.h:132
std::string name_HFPMiphi(HcalDetId const &)
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:104
int ieta() const
get the tower ieta
std::string name_TTSubdetPMiphi(HcalTrigTowerDetId const &)
std::string const TPSUBDETFW_NAME[2 *TPSUBDET_NUM]
Definition: Constants.h:175
std::string name_SubdetPMiphi(HcalDetId const &)
uint32_t hash_HFPMiphi(HcalDetId const &)
std::string const TPSUBDET_NAME[TPSUBDET_NUM]
Definition: Constants.h:173
uint32_t hash_CrateSlot(HcalElectronicsId const &)
uint32_t hash_CrateSpigot(HcalElectronicsId const &)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::string name_FED(HcalElectronicsId const &)
bool isHF(int etabin, int depth)
constexpr uint32_t rawId() const
int ietaAbs() const
get the absolute value of the tower ieta
std::string name_TTSubdetFW(HcalTrigTowerDetId const &, HcalElectronicsId const &)
std::string name_ieta(HcalDetId const &)
std::string name_HBHEPartition(HcalDetId const &)
bool isHO(int etabin, int depth)
std::string name_depth(HcalDetId const &)
std::string name_iphi(HcalDetId const &)
uint32_t hash_Electronics(HcalElectronicsId const &)
uint32_t hash_EChannel(HcalElectronicsId const &)
Readout chain identification for Hcal.
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
uint32_t hash_TTdepth(HcalTrigTowerDetId const &)
int const SLOT_uTCA_MIN
Definition: Constants.h:111
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 &)
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164