CMS 3D CMS Logo

DetectorQuantity.cc
Go to the documentation of this file.
1 
3 
4 namespace hcaldqm {
5  namespace quantity {
6  int getValue_iphi(HcalDetId const &did) { return did.iphi(); }
7 
8  int getValue_ieta(HcalDetId const &did) {
9  int x = did.ieta();
10  if (x < 0)
11  x = did.subdet() == HcalForward ? x + 41 : x + 42;
12  else
13  x = did.subdet() == HcalForward ? x + 42 : x + 41;
14  return x;
15  }
16 
17  int getValue_depth(HcalDetId const &did) { return did.depth(); }
18 
19  int getValue_Subdet(HcalDetId const &did) { return did.subdet() - 1; }
20 
21  int getValue_SubdetPM(HcalDetId const &did) {
22  return did.ieta() < 0 ? 2 * (did.subdet() - 1) : 2 * (did.subdet() - 1) + 1;
23  }
24 
25  uint32_t getBin_iphi(HcalDetId const &did) { return (uint32_t)(did.iphi()); }
26 
27  uint32_t getBin_ieta(HcalDetId const &did) { return (uint32_t)(getValue_ieta(did) + 1); }
28 
29  uint32_t getBin_depth(HcalDetId const &did) { //return (uint32_t)(did.depth());}
30  return (uint32_t)(did.subdet() == HcalOuter ? 7 : did.depth());
31  }
32 
33  uint32_t getBin_Subdet(HcalDetId const &did) { return (uint32_t)(did.subdet()); }
34 
35  uint32_t getBin_SubdetPM(HcalDetId const &did) { return (uint32_t)(getValue_SubdetPM(did) + 1); }
36 
37  HcalDetId getDid_iphi(int v) { return HcalDetId(HcalBarrel, v, 1, 1); }
38 
40  return HcalDetId(HcalBarrel, v <= 41 ? (v <= 12 ? v - 41 : v - 42) : (v >= 71 ? v - 42 : v - 41), 1, 1);
41  }
42 
43  HcalDetId getDid_depth(int v) { return HcalDetId(HcalBarrel, 1, 1, v); }
44 
45  HcalDetId getDid_Subdet(int v) { return HcalDetId((HcalSubdetector)(v + 1), 1, 1, 1); }
46 
47  HcalDetId getDid_SubdetPM(int v) { return HcalDetId((HcalSubdetector)(v / 2 + 1), v % 2 == 0 ? 1 : -1, 1, 1); }
48 
49  std::vector<std::string> getLabels_iphi() { return std::vector<std::string>(); }
50 
51  std::vector<std::string> getLabels_ieta() {
52  std::vector<std::string> labels;
53  char name[10];
54  for (int i = 0; i < 84; i++) {
55  sprintf(name, "%d", getDid_ieta(i).ieta());
56  labels.push_back(std::string(name));
57  }
58  return labels;
59  }
60 
61  std::vector<std::string> getLabels_depth() { return std::vector<std::string>(); }
62 
63  std::vector<std::string> getLabels_Subdet() {
64  std::vector<std::string> labels;
65  for (int i = 0; i < 4; i++)
66  labels.push_back(constants::SUBDET_NAME[i]);
67  return labels;
68  }
69 
70  std::vector<std::string> getLabels_SubdetPM() {
71  std::vector<std::string> labels;
72  for (int i = 0; i < 8; i++)
73  labels.push_back(constants::SUBDETPM_NAME[i]);
74  return labels;
75  }
76  } // namespace quantity
77 } // namespace hcaldqm
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
hcaldqm::quantity::getValue_SubdetPM
int getValue_SubdetPM(HcalDetId const &)
Definition: DetectorQuantity.cc:21
mps_fire.i
i
Definition: mps_fire.py:355
hcaldqm::quantity::getValue_Subdet
int getValue_Subdet(HcalDetId const &)
Definition: DetectorQuantity.cc:19
hcaldqm::constants::SUBDETPM_NAME
const std::string SUBDETPM_NAME[2 *SUBDET_NUM]
Definition: Constants.h:165
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
hcaldqm
Definition: Constants.h:8
hcaldqm::quantity::getLabels_ieta
std::vector< std::string > getLabels_ieta()
Definition: DetectorQuantity.cc:51
hcaldqm::quantity::getBin_ieta
uint32_t getBin_ieta(HcalDetId const &)
Definition: DetectorQuantity.cc:27
hcaldqm::quantity::getBin_SubdetPM
uint32_t getBin_SubdetPM(HcalDetId const &)
Definition: DetectorQuantity.cc:35
hcaldqm::quantity::getLabels_Subdet
std::vector< std::string > getLabels_Subdet()
Definition: DetectorQuantity.cc:63
hcaldqm::quantity::getLabels_SubdetPM
std::vector< std::string > getLabels_SubdetPM()
Definition: DetectorQuantity.cc:70
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
HcalBarrel
Definition: HcalAssistant.h:33
findQualityFiles.v
v
Definition: findQualityFiles.py:179
hcaldqm::quantity::getDid_ieta
HcalDetId getDid_ieta(int)
Definition: DetectorQuantity.cc:39
hcaldqm::quantity::getDid_depth
HcalDetId getDid_depth(int)
Definition: DetectorQuantity.cc:43
HcalOuter
Definition: HcalAssistant.h:35
hcaldqm::quantity::getValue_ieta
int getValue_ieta(HcalDetId const &)
Definition: DetectorQuantity.cc:8
hcaldqm::quantity::getBin_Subdet
uint32_t getBin_Subdet(HcalDetId const &)
Definition: DetectorQuantity.cc:33
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MjjMonitor_cfi.quantity
quantity
Definition: MjjMonitor_cfi.py:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
hcaldqm::quantity::getDid_iphi
HcalDetId getDid_iphi(int)
Definition: DetectorQuantity.cc:37
hcaldqm::quantity::getValue_iphi
int getValue_iphi(HcalDetId const &)
Definition: DetectorQuantity.cc:6
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
hcaldqm::quantity::getLabels_depth
std::vector< std::string > getLabels_depth()
Definition: DetectorQuantity.cc:61
hcaldqm::quantity::getBin_depth
uint32_t getBin_depth(HcalDetId const &)
Definition: DetectorQuantity.cc:29
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
hcaldqm::quantity::getDid_SubdetPM
HcalDetId getDid_SubdetPM(int)
Definition: DetectorQuantity.cc:47
hcaldqm::constants::SUBDET_NAME
const std::string SUBDET_NAME[SUBDET_NUM]
Definition: Constants.h:164
hcaldqm::quantity::getDid_Subdet
HcalDetId getDid_Subdet(int)
Definition: DetectorQuantity.cc:45
hcaldqm::quantity::getLabels_iphi
std::vector< std::string > getLabels_iphi()
Definition: DetectorQuantity.cc:49
hcaldqm::quantity::getBin_iphi
uint32_t getBin_iphi(HcalDetId const &)
Definition: DetectorQuantity.cc:25
DetectorQuantity.h
hcaldqm::quantity::getValue_depth
int getValue_depth(HcalDetId const &)
Definition: DetectorQuantity.cc:17