CMS 3D CMS Logo

GEMOfflineDQMBase.cc
Go to the documentation of this file.
2 
4  log_category_ = pset.getUntrackedParameter<std::string>("logCategory");
5 }
6 
8  const GEMSuperChamber* superchamber = gem->superChamber(gem_id);
9  if (superchamber == nullptr) {
10  return -1;
11  }
12  return getDetOccXBin(gem_id.chamber(), gem_id.layer(), superchamber->nChambers());
13 }
14 
16  if (me == nullptr) {
17  edm::LogError(log_category_) << "MonitorElement* is nullptr" << std::endl;
18  return;
19  }
20 
21  me->setAxisTitle("Superchamber / Chamber", 1);
22  for (const GEMSuperChamber* superchamber : station->superChambers()) {
23  const int num_chambers = superchamber->nChambers();
24  for (const GEMChamber* chamber : superchamber->chambers()) {
25  const int sc = chamber->id().chamber();
26  const int ch = chamber->id().layer();
27  const int xbin = getDetOccXBin(sc, ch, num_chambers);
28  const char* label = Form("%d/%d", sc, ch);
29  me->setBinLabel(xbin, label, 1);
30  }
31  }
32 
33  me->setAxisTitle("VFAT (i#eta)", 2);
34  const int max_vfat = getMaxVFAT(station->station());
35  if (max_vfat < 0) {
36  edm::LogError(log_category_) << "Wrong max VFAT: " << max_vfat << " at Station " << station->station() << std::endl;
37  return;
38  }
39 
40  const int num_etas = getNumEtaPartitions(station);
41  for (int ieta = 1; ieta <= num_etas; ieta++) {
42  for (int vfat_phi = 1; vfat_phi <= max_vfat; vfat_phi++) {
43  const int ybin = getVFATNumber(station->station(), ieta, vfat_phi);
44  const char* label = Form("%d (%d)", ybin, ieta);
45  me->setBinLabel(ybin, label, 2);
46  }
47  }
48 }
49 
51  if (me == nullptr) {
52  edm::LogError(log_category_) << "MonitorElement* is nullptr" << std::endl;
53  return;
54  }
55 
56  me->setAxisTitle("Superchamber / Chamber", 1);
57  for (const GEMSuperChamber* superchamber : station->superChambers()) {
58  const int num_chambers = superchamber->nChambers();
59 
60  for (const GEMChamber* chamber : superchamber->chambers()) {
61  const int sc = chamber->id().chamber();
62  const int ch = chamber->id().layer();
63  const int xbin = getDetOccXBin(sc, ch, num_chambers);
64  const char* label = Form("%d/%d", sc, ch);
65  me->setBinLabel(xbin, label, 1);
66  }
67  }
68 
69  const int num_etas = getNumEtaPartitions(station);
70  me->setAxisTitle("i#eta", 2);
71  for (int ieta = 1; ieta <= num_etas; ieta++) {
72  const std::string&& label = std::to_string(ieta);
73  me->setBinLabel(ieta, label, 2);
74  }
75 }
76 
78  const auto&& superchambers = station->superChambers();
79  if (not checkRefs(superchambers)) {
80  edm::LogError(log_category_) << "failed to get a valid vector of GEMSuperChamber ptrs" << std::endl;
81  return 0;
82  }
83 
84  const auto& chambers = superchambers.front()->chambers();
85  if (not checkRefs(chambers)) {
86  edm::LogError(log_category_) << "failed to get a valid vector of GEMChamber ptrs" << std::endl;
87  return 0;
88  }
89 
90  return chambers.front()->nEtaPartitions();
91 }
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
GEMSuperChamber
Definition: GEMSuperChamber.h:19
GEMDetId::layer
constexpr int layer() const
Definition: GEMDetId.h:184
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GEMSuperChamber::nChambers
int nChambers() const
Return numbers of chambers.
Definition: GEMSuperChamber.cc:25
GEMOfflineDQMBase::GEMOfflineDQMBase
GEMOfflineDQMBase(const edm::ParameterSet &)
Definition: GEMOfflineDQMBase.cc:3
GEMOfflineDQMBase::getMaxVFAT
int getMaxVFAT(const int)
Definition: GEMOfflineDQMBase.h:99
GEMOfflineDQMBase::getVFATNumber
int getVFATNumber(const int, const int, const int)
Definition: GEMOfflineDQMBase.h:108
GEMOfflineDQMBase::log_category_
std::string log_category_
Definition: GEMOfflineDQMBase.h:45
GEMOfflineDQMBase::setDetLabelsEta
void setDetLabelsEta(MonitorElement *, const GEMStation *)
Definition: GEMOfflineDQMBase.cc:50
GEMOfflineDQMBase::getNumEtaPartitions
int getNumEtaPartitions(const GEMStation *)
Definition: GEMOfflineDQMBase.cc:77
GEMStation
Definition: GEMStation.h:19
edm::ESHandle< GEMGeometry >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:177
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
GEMOfflineDQMBase::checkRefs
bool checkRefs(const std::vector< T * > &)
Definition: GEMOfflineDQMBase.h:123
GEMDetId
Definition: GEMDetId.h:17
chambers
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
GEMOfflineDQMBase::setDetLabelsVFAT
void setDetLabelsVFAT(MonitorElement *, const GEMStation *)
Definition: GEMOfflineDQMBase.cc:15
gem
Definition: AMC13Event.h:6
GEMChamber
Definition: GEMChamber.h:19
GEMOfflineDQMBase.h
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
label
const char * label
Definition: PFTauDecayModeTools.cc:11
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
GEMOfflineDQMBase::getDetOccXBin
int getDetOccXBin(const int, const int, const int)
Definition: GEMOfflineDQMBase.h:118