CMS 3D CMS Logo

MESetDet1D.cc
Go to the documentation of this file.
2 
4 
5 namespace ecaldqm {
6 
8  binning::ObjectType _otype,
11  binning::AxisSpecs const *_yaxis /* = 0*/)
12  : MESetEcal(_fullPath, _otype, _btype, _kind, 1, nullptr, _yaxis, nullptr) {
13  switch (kind_) {
18  break;
19  default:
20  throw_("Unsupported MonitorElement kind");
21  }
22  }
23 
24  MESetDet1D::MESetDet1D(MESetDet1D const &_orig) : MESetEcal(_orig) {}
25 
27 
28  MESet *MESetDet1D::clone(std::string const &_path /* = ""*/) const {
30  if (!_path.empty())
31  path_ = _path;
32  MESet *copy(new MESetDet1D(*this));
33  path_ = path;
34  return copy;
35  }
36 
37  void MESetDet1D::book(DQMStore::IBooker &_ibooker, const EcalElectronicsMapping *electronicsMap) {
38  MESetEcal::book(_ibooker, electronicsMap);
39 
40  if (btype_ == binning::kDCC) {
41  for (unsigned iME(0); iME < mes_.size(); iME++) {
42  MonitorElement *me(mes_[iME]);
43 
44  binning::ObjectType actualObject(binning::getObject(otype_, iME));
45  if (actualObject == binning::kEB) {
46  for (int iBin(1); iBin <= me->getNbinsX(); iBin++)
47  me->setBinLabel(iBin, binning::channelName(electronicsMap, iBin + kEBmLow));
48  } else if (actualObject == binning::kEE) {
49  for (int iBin(1); iBin <= me->getNbinsX() / 2; iBin++) {
50  me->setBinLabel(iBin, binning::channelName(electronicsMap, iBin));
51  me->setBinLabel(iBin + me->getNbinsX() / 2, binning::channelName(electronicsMap, iBin + 45));
52  }
53  } else if (actualObject == binning::kEEm) {
54  for (int iBin(1); iBin <= me->getNbinsX(); iBin++)
55  me->setBinLabel(iBin, binning::channelName(electronicsMap, iBin));
56  } else if (actualObject == binning::kEEp) {
57  for (int iBin(1); iBin <= me->getNbinsX(); iBin++)
58  me->setBinLabel(iBin, binning::channelName(electronicsMap, iBin + 45));
59  }
60  }
61  } else if (btype_ == binning::kTriggerTower) {
62  for (unsigned iME(0); iME < mes_.size(); iME++) {
63  MonitorElement *me(mes_[iME]);
64 
65  binning::ObjectType actualObject(binning::getObject(otype_, iME));
66  unsigned dccid(0);
67  if (actualObject == binning::kSM && (iME <= kEEmHigh || iME >= kEEpLow))
68  dccid = iME + 1;
69  else if (actualObject == binning::kEESM)
70  dccid = iME <= kEEmHigh ? iME + 1 : iME + 37;
71 
72  if (dccid > 0) {
73  std::stringstream ss;
74  std::pair<unsigned, unsigned> inner(innerTCCs(iME + 1));
75  std::pair<unsigned, unsigned> outer(outerTCCs(iME + 1));
76  ss << "TCC" << inner.first << " TT1";
77  me->setBinLabel(1, ss.str());
78  ss.str("");
79  ss << "TCC" << inner.second << " TT1";
80  me->setBinLabel(1 + nTTInner, ss.str());
81  ss.str("");
82  ss << "TCC" << outer.first << " TT1";
83  me->setBinLabel(1 + 2 * nTTInner, ss.str());
84  ss.str("");
85  ss << "TCC" << outer.second << " TT1";
86  me->setBinLabel(1 + 2 * nTTInner + nTTOuter, ss.str());
87  // Bins are numbered:
88  // inner1:(1)-->(nTTInner)
89  // inner2:(1+nTTInner)-->(1+nTTInner + nTTInner-1 = 2*nTTInner)
90  // outer1:(1+2*nTTInner)-->(1+2*nTTInner+nTTOuter-1=2*nTTInner+nTTOuter)
91  // outer2:(1+2*nTTInner+nTTOuter)-->(1+2*nTTInner+nTTOuter + nTTOuter-1
92  // = 2*nTTInner+2*nTTOuter)
93  int offset(0);
94  for (int iBin(4); iBin <= (2 * nTTOuter + 2 * nTTInner); iBin += 4) {
95  if (iBin == 4 + nTTInner)
96  offset = nTTInner;
97  else if (iBin == 4 + 2 * nTTInner)
98  offset = 2 * nTTInner;
99  else if (iBin == 4 + 2 * nTTInner + nTTOuter)
100  offset = 2 * nTTInner + nTTOuter;
101  ss.str("");
102  ss << iBin - offset;
103  me->setBinLabel(iBin, ss.str());
104  }
105  }
106  }
107  }
108  }
109 
111  EcalDQMSetupObjects const edso, DetId const &_id, double _wy /* = 1.*/, double _w /* = 1.*/, double) {
112  if (!active_)
113  return;
114 
115  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
116  checkME_(iME);
117 
119  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
120 
122  fill_(iME, xbin, _wy, _w);
123  else
124  fill_(iME, xbin, _wy);
125  }
126 
128  EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _wy /* = 1.*/, double _w /* = 1.*/, double) {
129  if (!active_)
130  return;
131 
132  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
133  checkME_(iME);
134 
136  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
137 
139  fill_(iME, xbin, _wy, _w);
140  else
141  fill_(iME, xbin, _wy);
142  }
143 
145  EcalDQMSetupObjects const edso, int _dcctccid, double _wy /* = 1.*/, double _w /* = 1.*/, double) {
146  if (!active_)
147  return;
148 
149  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
150  checkME_(iME);
151 
153  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
154 
156  fill_(iME, xbin, _wy, _w);
157  else
158  fill_(iME, xbin, _wy);
159  }
160 
161  void MESetDet1D::setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, double _content) {
162  if (!active_)
163  return;
164 
165  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
166  checkME_(iME);
167 
168  MonitorElement *me(mes_[iME]);
169 
171  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
172 
174  int nbinsY(me->getTH1()->GetNbinsY());
175  for (int iY(1); iY <= nbinsY; iY++)
176  me->setBinContent(xbin, iY, _content);
177  } else
178  me->setBinContent(xbin, _content);
179  }
180 
182  if (!active_)
183  return;
184 
185  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
186  checkME_(iME);
187 
188  MonitorElement *me(mes_[iME]);
189 
191  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
192 
194  int nbinsY(me->getTH1()->GetNbinsY());
195  for (int iY(1); iY <= nbinsY; iY++)
196  me->setBinContent(xbin, iY, _content);
197  } else
198  me->setBinContent(xbin, _content);
199  }
200 
201  void MESetDet1D::setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, double _content) {
202  if (!active_)
203  return;
204 
205  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
206  checkME_(iME);
207 
208  MonitorElement *me(mes_[iME]);
209 
211  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
212 
214  int nbinsY(me->getTH1()->GetNbinsY());
215  for (int iY(1); iY <= nbinsY; iY++)
216  me->setBinContent(xbin, iY, _content);
217  } else
218  me->setBinContent(xbin, _content);
219  }
220 
221  void MESetDet1D::setBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin, double _content) {
222  if (!active_)
223  return;
225  return;
226 
227  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
228  checkME_(iME);
229 
230  MonitorElement *me(mes_[iME]);
231 
233  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
234  me->setBinContent(xbin, _ybin, _content);
235  }
236 
238  EcalElectronicsId const &_id,
239  int _ybin,
240  double _content) {
241  if (!active_)
242  return;
244  return;
245 
246  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
247  checkME_(iME);
248 
249  MonitorElement *me(mes_[iME]);
250 
252  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
253  me->setBinContent(xbin, _ybin, _content);
254  }
255 
256  void MESetDet1D::setBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin, double _content) {
257  if (!active_)
258  return;
260  return;
261 
262  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid));
263  checkME_(iME);
264 
265  MonitorElement *me(mes_[iME]);
266 
268  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
269  me->setBinContent(xbin, _ybin, _content);
270  }
271 
272  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, DetId const &_id, double _error) {
273  if (!active_)
274  return;
275 
276  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
277  checkME_(iME);
278 
279  MonitorElement *me(mes_[iME]);
280 
282  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
283 
285  int nbinsY(me->getTH1()->GetNbinsY());
286  for (int iY(1); iY <= nbinsY; iY++)
287  me->setBinError(xbin, iY, _error);
288  } else
289  me->setBinError(xbin, _error);
290  }
291 
292  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _error) {
293  if (!active_)
294  return;
295 
296  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
297  checkME_(iME);
298 
299  MonitorElement *me(mes_[iME]);
300 
302  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
303 
305  int nbinsY(me->getTH1()->GetNbinsY());
306  for (int iY(1); iY <= nbinsY; iY++)
307  me->setBinError(xbin, iY, _error);
308  } else
309  me->setBinError(xbin, _error);
310  }
311 
312  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, int _dcctccid, double _error) {
313  if (!active_)
314  return;
315 
316  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
317  checkME_(iME);
318 
319  MonitorElement *me(mes_[iME]);
320 
322  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
323 
325  int nbinsY(me->getTH1()->GetNbinsY());
326  for (int iY(1); iY <= nbinsY; iY++)
327  me->setBinError(xbin, iY, _error);
328  } else
329  me->setBinError(xbin, _error);
330  }
331 
332  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin, double _error) {
333  if (!active_)
334  return;
336  return;
337 
338  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
339  checkME_(iME);
340 
341  MonitorElement *me(mes_[iME]);
342 
344  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
345  me->setBinError(xbin, _ybin, _error);
346  }
347 
348  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, int _ybin, double _error) {
349  if (!active_)
350  return;
352  return;
353 
354  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
355  checkME_(iME);
356 
357  MonitorElement *me(mes_[iME]);
358 
360  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
361  me->setBinError(xbin, _ybin, _error);
362  }
363 
364  void MESetDet1D::setBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin, double _error) {
365  if (!active_)
366  return;
368  return;
369 
370  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid));
371  checkME_(iME);
372 
373  MonitorElement *me(mes_[iME]);
374 
376  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
377  me->setBinError(xbin, _ybin, _error);
378  }
379 
380  void MESetDet1D::setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, double _entries) {
381  if (!active_)
382  return;
384  return;
385 
386  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
387  checkME_(iME);
388 
389  MonitorElement *me(mes_[iME]);
390 
392  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
393 
395  int nbinsX(me->getTH1()->GetNbinsX());
396  int nbinsY(me->getTH1()->GetNbinsY());
397  for (int iY(1); iY <= nbinsY; iY++)
398  me->setBinEntries((nbinsX + 2) * iY + xbin, _entries);
399  } else
400  me->setBinEntries(xbin, _entries);
401  }
402 
403  void MESetDet1D::setBinEntries(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _entries) {
404  if (!active_)
405  return;
407  return;
408 
409  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
410  checkME_(iME);
411 
412  MonitorElement *me(mes_[iME]);
413 
415  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
416 
418  int nbinsX(me->getTH1()->GetNbinsX());
419  int nbinsY(me->getTH1()->GetNbinsY());
420  for (int iY(1); iY <= nbinsY; iY++)
421  me->setBinEntries((nbinsX + 2) * iY + xbin, _entries);
422  } else
423  me->setBinEntries(xbin, _entries);
424  }
425 
426  void MESetDet1D::setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, double _entries) {
427  if (!active_)
428  return;
430  return;
431 
432  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
433  checkME_(iME);
434 
435  MonitorElement *me(mes_[iME]);
436 
438  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
439 
441  int nbinsX(me->getTH1()->GetNbinsX());
442  int nbinsY(me->getTH1()->GetNbinsY());
443  for (int iY(1); iY <= nbinsY; iY++)
444  me->setBinEntries((nbinsX + 2) * iY + xbin, _entries);
445  } else
446  me->setBinEntries(xbin, _entries);
447  }
448 
449  void MESetDet1D::setBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin, double _entries) {
450  if (!active_)
451  return;
453  return;
454 
455  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
456  checkME_(iME);
457 
458  MonitorElement *me(mes_[iME]);
459 
461  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
462  int nbinsX(me->getTH1()->GetNbinsX());
463  me->setBinEntries((nbinsX + 2) * _ybin + xbin, _entries);
464  }
465 
467  EcalElectronicsId const &_id,
468  int _ybin,
469  double _entries) {
470  if (!active_)
471  return;
473  return;
474 
475  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
476  checkME_(iME);
477 
478  MonitorElement *me(mes_[iME]);
479 
481  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
482  int nbinsX(me->getTH1()->GetNbinsX());
483  me->setBinEntries((nbinsX + 2) * _ybin + xbin, _entries);
484  }
485 
486  void MESetDet1D::setBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin, double _entries) {
487  if (!active_)
488  return;
490  return;
491 
492  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid));
493  checkME_(iME);
494 
495  MonitorElement *me(mes_[iME]);
496 
498  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
499  int nbinsX(me->getTH1()->GetNbinsX());
500  me->setBinEntries((nbinsX + 2) * _ybin + xbin, _entries);
501  }
502 
503  double MESetDet1D::getBinContent(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin /* = 0*/) const {
504  if (!active_)
505  return 0.;
506 
507  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
508  checkME_(iME);
509 
510  MonitorElement *me(mes_[iME]);
511 
513  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
514  int nbinsX(me->getTH1()->GetNbinsX());
515 
516  return me->getBinContent((nbinsX + 2) * _ybin + xbin);
517  }
518 
520  EcalElectronicsId const &_id,
521  int _ybin /* = 0*/) const {
522  if (!active_)
523  return 0.;
524 
525  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
526  checkME_(iME);
527 
528  MonitorElement *me(mes_[iME]);
529 
531  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
532  int nbinsX(me->getTH1()->GetNbinsX());
533 
534  return me->getBinContent((nbinsX + 2) * _ybin + xbin);
535  }
536 
537  double MESetDet1D::getBinContent(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin /* = 0*/) const {
538  if (!active_)
539  return 0.;
540 
541  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
542  checkME_(iME);
543 
544  MonitorElement *me(mes_[iME]);
545 
547  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
548  int nbinsX(me->getTH1()->GetNbinsX());
549 
550  return me->getBinContent((nbinsX + 2) * _ybin + xbin);
551  }
552 
553  double MESetDet1D::getBinError(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin /* = 0*/) const {
554  if (!active_)
555  return 0.;
556 
557  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
558  checkME_(iME);
559 
560  MonitorElement *me(mes_[iME]);
561 
563  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
564  int nbinsX(me->getTH1()->GetNbinsX());
565 
566  return me->getBinError((nbinsX + 2) * _ybin + xbin);
567  }
568 
570  EcalElectronicsId const &_id,
571  int _ybin /* = 0*/) const {
572  if (!active_)
573  return 0.;
574 
575  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
576  checkME_(iME);
577 
578  MonitorElement *me(mes_[iME]);
579 
581  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
582  int nbinsX(me->getTH1()->GetNbinsX());
583 
584  return me->getBinError((nbinsX + 2) * _ybin + xbin);
585  }
586 
587  double MESetDet1D::getBinError(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin /* = 0*/) const {
588  if (!active_)
589  return 0.;
590 
591  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
592  checkME_(iME);
593 
594  MonitorElement *me(mes_[iME]);
595 
597  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
598  int nbinsX(me->getTH1()->GetNbinsX());
599 
600  return me->getBinError((nbinsX + 2) * _ybin + xbin);
601  }
602 
603  double MESetDet1D::getBinEntries(EcalDQMSetupObjects const edso, DetId const &_id, int _ybin /* = 0*/) const {
604  if (!active_)
605  return 0.;
607  return 0.;
608 
609  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
610  checkME_(iME);
611 
612  MonitorElement *me(mes_[iME]);
613 
615  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
616  int nbinsX(me->getTH1()->GetNbinsX());
617 
618  return me->getBinEntries((nbinsX + 2) * _ybin + xbin);
619  }
620 
622  EcalElectronicsId const &_id,
623  int _ybin /* = 0*/) const {
624  if (!active_)
625  return 0.;
627  return 0.;
628 
629  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
630  checkME_(iME);
631 
632  MonitorElement *me(mes_[iME]);
633 
635  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
636  int nbinsX(me->getTH1()->GetNbinsX());
637 
638  return me->getBinEntries((nbinsX + 2) * _ybin + xbin);
639  }
640 
641  double MESetDet1D::getBinEntries(EcalDQMSetupObjects const edso, int _dcctccid, int _ybin /* = 0*/) const {
642  if (!active_)
643  return 0.;
645  return 0.;
646 
647  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid, btype_));
648  checkME_(iME);
649 
650  MonitorElement *me(mes_[iME]);
651 
653  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
654  int nbinsX(me->getTH1()->GetNbinsX());
655 
656  return me->getBinEntries((nbinsX + 2) * _ybin + xbin);
657  }
658 
659  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, DetId const &_id) const {
660  if (!active_)
661  return -1;
663  return -1;
664 
665  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
666  checkME_(iME);
667 
669  return binning::findBin1D(edso.electronicsMap, obj, btype_, _id);
670  }
671 
672  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id) const {
673  if (!active_)
674  return -1;
676  return -1;
677 
678  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
679  checkME_(iME);
680 
682  return binning::findBin1D(edso.electronicsMap, obj, btype_, _id);
683  }
684 
685  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, int _dcctccid) const {
686  if (!active_)
687  return -1;
689  return -1;
690 
691  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid));
692  checkME_(iME);
693 
695  return binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid);
696  }
697 
698  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, DetId const &_id, double _y, double) const {
699  if (!active_)
700  return -1;
702  return -1;
703 
704  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
705  checkME_(iME);
706 
707  MonitorElement *me(mes_[iME]);
708 
710  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
711  int nbinsX(me->getTH1()->GetNbinsX());
712  return xbin + (nbinsX + 2) * me->getTH1()->GetYaxis()->FindBin(_y);
713  }
714 
715  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, EcalElectronicsId const &_id, double _y, double) const {
716  if (!active_)
717  return -1;
719  return -1;
720 
721  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _id));
722  checkME_(iME);
723 
724  MonitorElement *me(mes_[iME]);
725 
727  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _id));
728  int nbinsX(me->getTH1()->GetNbinsX());
729  return xbin + (nbinsX + 2) * me->getTH1()->GetYaxis()->FindBin(_y);
730  }
731 
732  int MESetDet1D::findBin(EcalDQMSetupObjects const edso, int _dcctccid, double _y, double) const {
733  if (!active_)
734  return -1;
736  return -1;
737 
738  unsigned iME(binning::findPlotIndex(edso.electronicsMap, otype_, _dcctccid));
739  checkME_(iME);
740 
741  MonitorElement *me(mes_[iME]);
742 
744  int xbin(binning::findBin1D(edso.electronicsMap, obj, btype_, _dcctccid));
745  int nbinsX(me->getTH1()->GetNbinsX());
746  return xbin + (nbinsX + 2) * me->getTH1()->GetYaxis()->FindBin(_y);
747  }
748 
750  double _content /* = 0.*/,
751  double _err /* = 0.*/,
752  double _entries /* = 0.*/) {
753  unsigned nME(binning::getNObjects(otype_));
754 
757 
758  for (unsigned iME(0); iME < nME; iME++) {
759  MonitorElement *me(mes_[iME]);
760 
761  int nbinsX(me->getTH1()->GetNbinsX());
762  int nbinsY(me->getTH1()->GetNbinsY());
763  for (int ix(1); ix <= nbinsX; ix++) {
764  for (int iy(1); iy <= nbinsY; iy++) {
765  int bin(is2D ? (nbinsX + 2) * iy + ix : ix);
766  me->setBinContent(bin, _content);
767  me->setBinError(bin, _err);
768  if (isProfile)
769  me->setBinEntries(bin, _entries);
770  }
771  }
772  }
773  }
774 } // namespace ecaldqm
MonitorElement::Kind kind_
Definition: MESet.h:158
double getBinError(EcalDQMSetupObjects const, DetId const &, int=0) const override
Definition: MESetDet1D.cc:553
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
unsigned getNObjects(ObjectType)
void throw_(std::string const &_message) const
Definition: MESet.h:149
std::pair< unsigned, unsigned > outerTCCs(unsigned)
int findBin(EcalDQMSetupObjects const, DetId const &) const
Definition: MESetDet1D.cc:659
ObjectType getObject(ObjectType, unsigned)
static constexpr int nTTOuter
void setBinContent(EcalDQMSetupObjects const, DetId const &, double) override
Definition: MESetDet1D.cc:161
void setBinEntries(EcalDQMSetupObjects const, DetId const &, double) override
Definition: MESetDet1D.cc:380
void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=0.) override
Definition: MESetDet1D.cc:110
MESetDet1D(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=nullptr)
Definition: MESetDet1D.cc:7
bool is2D(HitType hitType)
MESet * clone(std::string const &="") const override
Definition: MESetDet1D.cc:28
void setBinError(EcalDQMSetupObjects const, DetId const &, double) override
Definition: MESetDet1D.cc:272
EcalElectronicsMapping const * electronicsMap
Definition: MESet.h:34
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
Definition: MESetEcal.cc:70
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:141
virtual void fill_(unsigned, int, double)
Definition: MESet.cc:252
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
Definition: DetId.h:17
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
bool active_
Definition: MESet.h:163
double getBinEntries(EcalDQMSetupObjects const, DetId const &, int=0) const override
Definition: MESetDet1D.cc:603
static constexpr int nTTInner
std::pair< unsigned, unsigned > innerTCCs(unsigned)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
binning::ObjectType otype_
Definition: MESet.h:156
~MESetDet1D() override
Definition: MESetDet1D.cc:26
std::string channelName(EcalElectronicsMapping const *, uint32_t, BinningType _btype=kDCC)
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
Definition: MESetDet1D.cc:37
void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.) override
Definition: MESetDet1D.cc:749
binning::BinningType btype_
Definition: MESet.h:157
double getBinContent(EcalDQMSetupObjects const, DetId const &, int=0) const override
Definition: MESetDet1D.cc:503
std::string path_
Definition: MESet.h:155
int findBin1D(EcalElectronicsMapping const *, ObjectType, BinningType, DetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:153