CMS 3D CMS Logo

List of all members | Public Member Functions
ecaldqm::MESetProjection Class Reference

#include <MESetProjection.h>

Inheritance diagram for ecaldqm::MESetProjection:
ecaldqm::MESetEcal ecaldqm::MESet

Public Member Functions

MESetclone (std::string const &="") const override
 
void fill (DetId const &, double=1., double=0., double=0.) override
 
void fill (double, double=1., double=0.) override
 
void fill (int, double=1., double=1., double=0.) override
 
double getBinContent (DetId const &, int) const override
 
double getBinContent (DetId const &, int=0) const override
 
double getBinContent (EcalElectronicsId const &, int) const override
 
double getBinContent (int, int) const override
 
double getBinEntries (DetId const &, int) const override
 
double getBinEntries (DetId const &, int=0) const override
 
double getBinEntries (EcalElectronicsId const &, int) const override
 
double getBinEntries (int, int) const override
 
double getBinError (DetId const &, int) const override
 
double getBinError (DetId const &, int=0) const override
 
double getBinError (EcalElectronicsId const &, int) const override
 
double getBinError (int, int) const override
 
 MESetProjection (MESetProjection const &)
 
 MESetProjection (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=nullptr)
 
void setBinContent (DetId const &, double) override
 
void setBinContent (DetId const &, int, double) override
 
void setBinContent (EcalElectronicsId const &, int, double) override
 
void setBinContent (int, int, double) override
 
void setBinEntries (DetId const &, double) override
 
void setBinEntries (DetId const &, int, double) override
 
void setBinEntries (EcalElectronicsId const &, int, double) override
 
void setBinEntries (int, int, double) override
 
void setBinError (DetId const &, double) override
 
void setBinError (DetId const &, int, double) override
 
void setBinError (EcalElectronicsId const &, int, double) override
 
void setBinError (int, int, double) override
 
 ~MESetProjection () override
 
- Public Member Functions inherited from ecaldqm::MESetEcal
void book (DQMStore::IBooker &) override
 
void fill (EcalElectronicsId const &, double=1., double=1., double=1.) override
 
virtual int findBin (DetId const &, double, double=0.) const
 
virtual int findBin (EcalElectronicsId const &, double, double=0.) const
 
virtual int findBin (int, double, double=0.) const
 
std::vector< std::string > generatePaths () const
 
double getBinContent (EcalElectronicsId const &, int) const override
 
double getBinContent (int, int) const override
 
double getBinEntries (EcalElectronicsId const &, int) const override
 
double getBinEntries (int, int) const override
 
double getBinError (EcalElectronicsId const &, int) const override
 
double getBinError (int, int) const override
 
bool isVariableBinning () const override
 
 MESetEcal (MESetEcal const &)
 
 MESetEcal (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr)
 
MESetoperator= (MESet const &) override
 
bool retrieve (DQMStore::IGetter &, std::string *=nullptr) const override
 
void setBinContent (DetId const &, int, double) override
 
void setBinContent (EcalElectronicsId const &, int, double) override
 
void setBinContent (int, int, double) override
 
void setBinEntries (DetId const &, int, double) override
 
void setBinEntries (EcalElectronicsId const &, int, double) override
 
void setBinEntries (int, int, double) override
 
void setBinError (DetId const &, int, double) override
 
void setBinError (EcalElectronicsId const &, int, double) override
 
void setBinError (int, int, double) override
 
 ~MESetEcal () override
 
- Public Member Functions inherited from ecaldqm::MESet
virtual iterator begin ()
 
virtual const_iterator begin () const
 
virtual iterator beginChannel ()
 
virtual const_iterator beginChannel () const
 
virtual void clear () const
 
virtual iterator end ()
 
virtual const_iterator end () const
 
std::string formPath (PathReplacements const &) const
 
bool getBatchMode () const
 
binning::BinningType getBinType () const
 
MonitorElement::Kind getKind () const
 
bool getLumiFlag () const
 
virtual MonitorElementgetME (unsigned _iME)
 
virtual const MonitorElementgetME (unsigned _iME) const
 
binning::ObjectType getObjType () const
 
virtual const std::string & getPath () const
 
bool isActive () const
 
virtual bool maskMatches (DetId const &, uint32_t, StatusManager const *) const
 
 MESet ()
 
 MESet (MESet const &)
 
 MESet (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind)
 
virtual void reset (double=0., double=0., double=0.)
 
virtual void resetAll (double=0., double=0., double=0.)
 
virtual void setAxisTitle (std::string const &, int=1)
 
void setBatchMode ()
 
virtual void setBinContent (EcalElectronicsId const &, double)
 
virtual void setBinContent (int, double)
 
virtual void setBinEntries (EcalElectronicsId const &, double)
 
virtual void setBinEntries (int, double)
 
virtual void setBinError (EcalElectronicsId const &, double)
 
virtual void setBinError (int, double)
 
void setLumiFlag ()
 
virtual ~MESet ()
 

Additional Inherited Members

- Public Types inherited from ecaldqm::MESet
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
typedef std::map< std::string, std::string > PathReplacements
 
- Protected Member Functions inherited from ecaldqm::MESet
virtual void checkME_ (unsigned _iME) const
 
virtual void fill_ (unsigned, double, double, double)
 
virtual void fill_ (unsigned, int, double)
 
virtual void fill_ (unsigned, int, double, double)
 
void throw_ (std::string const &_message) const
 
- Protected Attributes inherited from ecaldqm::MESetEcal
unsigned logicalDimensions_
 
const binning::AxisSpecsxaxis_
 
const binning::AxisSpecsyaxis_
 
const binning::AxisSpecszaxis_
 
- Protected Attributes inherited from ecaldqm::MESet
bool active_
 
bool batchMode_
 
binning::BinningType btype_
 
MonitorElement::Kind kind_
 
bool lumiFlag_
 
std::vector< MonitorElement * > mes_
 
binning::ObjectType otype_
 
std::string path_
 

Detailed Description

Definition at line 12 of file MESetProjection.h.

Constructor & Destructor Documentation

◆ MESetProjection() [1/2]

ecaldqm::MESetProjection::MESetProjection ( std::string const &  _fullPath,
binning::ObjectType  _otype,
binning::BinningType  _btype,
MonitorElement::Kind  _kind,
binning::AxisSpecs const *  _yaxis = nullptr 
)

Definition at line 6 of file MESetProjection.cc.

11  : MESetEcal(_fullPath, _otype, _btype, _kind, 1, nullptr, _yaxis) {
12  switch (kind_) {
15  break;
16  default:
17  throw_("Unsupported MonitorElement kind");
18  }
19 
20  switch (btype_) {
21  case binning::kProjEta:
22  case binning::kProjPhi:
23  break;
24  default:
25  throw_("Unsupported binning");
26  }
27  }

References ecaldqm::MESet::btype_, ecaldqm::MESet::kind_, ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, MonitorElementData::TH1F, ecaldqm::MESet::throw_(), and MonitorElementData::TPROFILE.

Referenced by clone().

◆ MESetProjection() [2/2]

ecaldqm::MESetProjection::MESetProjection ( MESetProjection const &  _orig)

Definition at line 29 of file MESetProjection.cc.

29 : MESetEcal(_orig) {}

◆ ~MESetProjection()

ecaldqm::MESetProjection::~MESetProjection ( )
override

Definition at line 31 of file MESetProjection.cc.

31 {}

Member Function Documentation

◆ clone()

MESet * ecaldqm::MESetProjection::clone ( std::string const &  _path = "") const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 33 of file MESetProjection.cc.

33  {
35  if (!_path.empty())
36  path_ = _path;
37  MESet *copy(new MESetProjection(*this));
38  path_ = path;
39  return copy;
40  }

References filterCSVwithJSON::copy, MESetProjection(), castor_dqm_sourceclient_file_cfg::path, ecaldqm::MESet::path_, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ fill() [1/3]

void ecaldqm::MESetProjection::fill ( DetId const &  _id,
double  _w = 1.,
double  = 0.,
double  = 0. 
)
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 42 of file MESetProjection.cc.

42  {
43  if (!active_)
44  return;
45 
46  unsigned iME(binning::findPlotIndex(otype_, _id));
47  checkME_(iME);
48 
49  int subdet(_id.subdetId());
50 
51  if (subdet == EcalBarrel) {
52  EBDetId ebid(_id);
54  fill_(iME, eta(ebid), _w, 0.);
55  else if (btype_ == binning::kProjPhi)
56  fill_(iME, phi(ebid), _w, 0.);
57  } else if (subdet == EcalEndcap) {
58  EEDetId eeid(_id);
60  fill_(iME, eta(eeid), _w, 0.);
61  if (btype_ == binning::kProjPhi) {
62  fill_(iME, phi(eeid), _w, 0.);
63  }
64  } else if (isEndcapTTId(_id)) {
65  EcalTrigTowerDetId ttid(_id);
66  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
67  unsigned nIds(ids.size());
68  if (btype_ == binning::kProjEta) {
69  for (unsigned iId(0); iId < nIds; iId++)
70  fill_(iME, eta(EEDetId(ids[iId])), _w / nIds, 0.);
71  } else if (btype_ == binning::kProjPhi) {
72  for (unsigned iId(0); iId < nIds; iId++)
73  fill_(iME, phi(EEDetId(ids[iId])), _w / nIds, 0.);
74  }
75  } else if (subdet == EcalTriggerTower) {
76  EcalTrigTowerDetId ttid(_id);
77  if (btype_ == binning::kProjEta) {
78  int ieta(ttid.ieta());
79  if (ieta < 18 && ieta > 0)
80  fill_(iME, (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta, _w, 0.);
81  else if (ieta > -18 && ieta < 0)
82  fill_(iME, (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta, _w, 0.);
83  } else if (btype_ == binning::kProjPhi)
84  fill_(iME, phi(ttid), _w, 0.);
85  }
86  }

References ecaldqm::MESet::active_, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::MESet::fill_(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ fill() [2/3]

void ecaldqm::MESetProjection::fill ( double  _x,
double  _w = 1.,
double  = 0. 
)
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 101 of file MESetProjection.cc.

101  {
102  if (!active_)
103  return;
104  if (btype_ != binning::kProjEta)
105  return;
106 
107  unsigned iME;
108  if (_x < -etaBound)
109  iME = 0;
110  else if (_x < etaBound)
111  iME = 1;
112  else
113  iME = 2;
114 
115  if (otype_ == binning::kEcal2P && iME == 2)
116  iME = 0;
117 
118  checkME_(iME);
119 
120  mes_[iME]->Fill(_x, _w);
121  }

References ecaldqm::MESet::active_, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), ecaldqm::etaBound, ecaldqm::binning::kEcal2P, ecaldqm::binning::kProjEta, ecaldqm::MESet::mes_, and ecaldqm::MESet::otype_.

◆ fill() [3/3]

void ecaldqm::MESetProjection::fill ( int  _subdet,
double  _x = 1.,
double  _w = 1.,
double  = 0. 
)
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 88 of file MESetProjection.cc.

88  {
89  if (!active_)
90  return;
91 
92  unsigned iME(binning::findPlotIndex(otype_, _subdet, btype_));
93  checkME_(iME);
94 
96  _x = phi(_x);
97 
98  mes_[iME]->Fill(_x, _w);
99  }

References ecaldqm::MESet::active_, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), ecaldqm::binning::findPlotIndex(), ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, and ecaldqm::phi().

◆ getBinContent() [1/4]

double ecaldqm::MESetEcal::getBinContent
override

Definition at line 446 of file MESetEcal.cc.

446  {
447  if (!active_)
448  return 0.;
449 
450  unsigned iME(binning::findPlotIndex(otype_, _id));
451  checkME_(iME);
452 
453  return mes_[iME]->getBinContent(_bin);
454  }

◆ getBinContent() [2/4]

double ecaldqm::MESetProjection::getBinContent ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 306 of file MESetProjection.cc.

306  {
307  if (!active_)
308  return 0.;
309 
310  unsigned iME(binning::findPlotIndex(otype_, _id));
311  checkME_(iME);
312 
313  MonitorElement *me(mes_[iME]);
314 
315  if (isEndcapTTId(_id)) {
316  EcalTrigTowerDetId ttid(_id);
317  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
318  if (btype_ == binning::kProjEta) {
319  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[0]))));
320  return me->getBinContent(bin);
321  } else if (btype_ == binning::kProjPhi) {
322  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[0]))));
323  return me->getBinContent(bin);
324  }
325  return 0.;
326  }
327 
328  double x(0.);
329  int subdet(_id.subdetId());
330  if (subdet == EcalBarrel) {
331  EBDetId ebid(_id);
332  if (btype_ == binning::kProjEta)
333  x = eta(ebid);
334  else if (btype_ == binning::kProjPhi)
335  x = phi(ebid);
336  } else if (subdet == EcalEndcap) {
337  if (btype_ == binning::kProjEta)
338  x = eta(EEDetId(_id));
339  else if (btype_ == binning::kProjPhi)
340  x = phi(EEDetId(_id));
341  } else if (subdet == EcalTriggerTower) {
342  EcalTrigTowerDetId ttid(_id);
343  if (btype_ == binning::kProjEta) {
344  int ieta(ttid.ieta());
345  if (ieta < 18 && ieta > 0)
346  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
347  else if (ieta > -18 && ieta < 0)
348  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
349  } else if (btype_ == binning::kProjPhi)
350  x = phi(ttid);
351  }
352 
353  int bin(me->getTH1()->FindBin(x));
354  return me->getBinContent(bin);
355  }

References ecaldqm::MESet::active_, newFWLiteAna::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ getBinContent() [3/4]

double ecaldqm::MESetEcal::getBinContent
override

Definition at line 456 of file MESetEcal.cc.

456  {
457  if (!active_)
458  return 0.;
459 
460  unsigned iME(binning::findPlotIndex(otype_, _id));
461  checkME_(iME);
462 
463  return mes_[iME]->getBinContent(_bin);
464  }

◆ getBinContent() [4/4]

double ecaldqm::MESetEcal::getBinContent
override

Definition at line 466 of file MESetEcal.cc.

466  {
467  if (!active_)
468  return 0.;
469 
470  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
471  checkME_(iME);
472 
473  return mes_[iME]->getBinContent(_bin);
474  }

◆ getBinEntries() [1/4]

double ecaldqm::MESetEcal::getBinEntries
override

Definition at line 506 of file MESetEcal.cc.

506  {
507  if (!active_)
508  return 0.;
510  return 0.;
511 
512  unsigned iME(binning::findPlotIndex(otype_, _id));
513  checkME_(iME);
514 
515  return mes_[iME]->getBinEntries(_bin);
516  }

◆ getBinEntries() [2/4]

double ecaldqm::MESetProjection::getBinEntries ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 408 of file MESetProjection.cc.

408  {
409  if (!active_)
410  return 0.;
411 
412  unsigned iME(binning::findPlotIndex(otype_, _id));
413  checkME_(iME);
414 
415  MonitorElement *me(mes_[iME]);
416 
417  if (isEndcapTTId(_id)) {
418  EcalTrigTowerDetId ttid(_id);
419  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
420  if (btype_ == binning::kProjEta) {
421  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[0]))));
422  return me->getBinEntries(bin);
423  } else if (btype_ == binning::kProjPhi) {
424  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[0]))));
425  return me->getBinEntries(bin);
426  }
427  return 0.;
428  }
429 
430  double x(0.);
431  int subdet(_id.subdetId());
432  if (subdet == EcalBarrel) {
433  EBDetId ebid(_id);
434  if (btype_ == binning::kProjEta)
435  x = eta(ebid);
436  else if (btype_ == binning::kProjPhi)
437  x = phi(ebid);
438  } else if (subdet == EcalEndcap) {
439  if (btype_ == binning::kProjEta)
440  x = eta(EEDetId(_id));
441  else if (btype_ == binning::kProjPhi)
442  x = phi(EEDetId(_id));
443  } else if (subdet == EcalTriggerTower) {
444  EcalTrigTowerDetId ttid(_id);
445  if (btype_ == binning::kProjEta) {
446  int ieta(ttid.ieta());
447  if (ieta < 18 && ieta > 0)
448  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
449  else if (ieta > -18 && ieta < 0)
450  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
451  } else if (btype_ == binning::kProjPhi)
452  x = phi(ttid);
453  }
454 
455  int bin(me->getTH1()->FindBin(x));
456  return me->getBinEntries(bin);
457  }

References ecaldqm::MESet::active_, newFWLiteAna::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ getBinEntries() [3/4]

double ecaldqm::MESetEcal::getBinEntries
override

Definition at line 518 of file MESetEcal.cc.

518  {
519  if (!active_)
520  return 0.;
522  return 0.;
523 
524  unsigned iME(binning::findPlotIndex(otype_, _id));
525  checkME_(iME);
526 
527  return mes_[iME]->getBinEntries(_bin);
528  }

◆ getBinEntries() [4/4]

double ecaldqm::MESetEcal::getBinEntries
override

Definition at line 530 of file MESetEcal.cc.

530  {
531  if (!active_)
532  return 0.;
534  return 0.;
535 
536  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
537  checkME_(iME);
538 
539  return mes_[iME]->getBinEntries(_bin);
540  }

◆ getBinError() [1/4]

double ecaldqm::MESetEcal::getBinError
override

Definition at line 476 of file MESetEcal.cc.

476  {
477  if (!active_)
478  return 0.;
479 
480  unsigned iME(binning::findPlotIndex(otype_, _id));
481  checkME_(iME);
482 
483  return mes_[iME]->getBinError(_bin);
484  }

◆ getBinError() [2/4]

double ecaldqm::MESetProjection::getBinError ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 357 of file MESetProjection.cc.

357  {
358  if (!active_)
359  return 0.;
360 
361  unsigned iME(binning::findPlotIndex(otype_, _id));
362  checkME_(iME);
363 
364  MonitorElement *me(mes_[iME]);
365 
366  if (isEndcapTTId(_id)) {
367  EcalTrigTowerDetId ttid(_id);
368  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
369  if (btype_ == binning::kProjEta) {
370  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[0]))));
371  return me->getBinError(bin);
372  } else if (btype_ == binning::kProjPhi) {
373  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[0]))));
374  return me->getBinError(bin);
375  }
376  return 0.;
377  }
378 
379  double x(0.);
380  int subdet(_id.subdetId());
381  if (subdet == EcalBarrel) {
382  EBDetId ebid(_id);
383  if (btype_ == binning::kProjEta)
384  x = eta(ebid);
385  else if (btype_ == binning::kProjPhi)
386  x = phi(ebid);
387  } else if (subdet == EcalEndcap) {
388  if (btype_ == binning::kProjEta)
389  x = eta(EEDetId(_id));
390  else if (btype_ == binning::kProjPhi)
391  x = phi(EEDetId(_id));
392  } else if (subdet == EcalTriggerTower) {
393  EcalTrigTowerDetId ttid(_id);
394  if (btype_ == binning::kProjEta) {
395  int ieta(ttid.ieta());
396  if (ieta < 18 && ieta > 0)
397  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
398  else if (ieta > -18 && ieta < 0)
399  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
400  } else if (btype_ == binning::kProjPhi)
401  x = phi(ttid);
402  }
403 
404  int bin(me->getTH1()->FindBin(x));
405  return me->getBinError(bin);
406  }

References ecaldqm::MESet::active_, newFWLiteAna::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ getBinError() [3/4]

double ecaldqm::MESetEcal::getBinError
override

Definition at line 486 of file MESetEcal.cc.

486  {
487  if (!active_)
488  return 0.;
489 
490  unsigned iME(binning::findPlotIndex(otype_, _id));
491  checkME_(iME);
492 
493  return mes_[iME]->getBinError(_bin);
494  }

◆ getBinError() [4/4]

double ecaldqm::MESetEcal::getBinError
override

Definition at line 496 of file MESetEcal.cc.

496  {
497  if (!active_)
498  return 0.;
499 
500  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
501  checkME_(iME);
502 
503  return mes_[iME]->getBinError(_bin);
504  }

◆ setBinContent() [1/4]

void ecaldqm::MESetProjection::setBinContent ( DetId const &  _id,
double  _content 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 123 of file MESetProjection.cc.

123  {
124  if (!active_)
125  return;
126 
127  unsigned iME(binning::findPlotIndex(otype_, _id));
128  checkME_(iME);
129 
130  MonitorElement *me(mes_[iME]);
131 
132  if (isEndcapTTId(_id)) {
133  EcalTrigTowerDetId ttid(_id);
134  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
135  unsigned nIds(ids.size());
136  std::set<int> bins;
137  if (btype_ == binning::kProjEta) {
138  for (unsigned iId(0); iId < nIds; iId++) {
139  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[iId]))));
140  if (bins.find(bin) != bins.end())
141  continue;
142  me->setBinContent(bin, _content);
143  }
144  } else if (btype_ == binning::kProjPhi) {
145  for (unsigned iId(0); iId < nIds; iId++) {
146  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[iId]))));
147  if (bins.find(bin) != bins.end())
148  continue;
149  me->setBinContent(bin, _content);
150  }
151  }
152  return;
153  }
154 
155  double x(0.);
156  int subdet(_id.subdetId());
157  if (subdet == EcalBarrel) {
158  EBDetId ebid(_id);
159  if (btype_ == binning::kProjEta)
160  x = eta(ebid);
161  else if (btype_ == binning::kProjPhi)
162  x = phi(ebid);
163  } else if (subdet == EcalEndcap) {
164  if (btype_ == binning::kProjEta)
165  x = eta(EEDetId(_id));
166  else if (btype_ == binning::kProjPhi)
167  x = phi(EEDetId(_id));
168  } else if (subdet == EcalTriggerTower) {
169  EcalTrigTowerDetId ttid(_id);
170  if (btype_ == binning::kProjEta) {
171  int ieta(ttid.ieta());
172  if (ieta < 18 && ieta > 0)
173  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
174  else if (ieta > -18 && ieta < 0)
175  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
176  } else if (btype_ == binning::kProjPhi)
177  x = phi(ttid);
178  }
179 
180  int bin(me->getTH1()->FindBin(x));
181  me->setBinContent(bin, _content);
182  }

References btvTracks_cfi::_content, ecaldqm::MESet::active_, newFWLiteAna::bin, trigObjTnPSource_cfi::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ setBinContent() [2/4]

void ecaldqm::MESetEcal::setBinContent
override

Definition at line 350 of file MESetEcal.cc.

350  {
351  if (!active_)
352  return;
353 
354  unsigned iME(binning::findPlotIndex(otype_, _id));
355  checkME_(iME);
356 
357  mes_[iME]->setBinContent(_bin, _content);
358  }

◆ setBinContent() [3/4]

void ecaldqm::MESetEcal::setBinContent
override

Definition at line 360 of file MESetEcal.cc.

360  {
361  if (!active_)
362  return;
363 
364  unsigned iME(binning::findPlotIndex(otype_, _id));
365  checkME_(iME);
366 
367  mes_[iME]->setBinContent(_bin, _content);
368  }

◆ setBinContent() [4/4]

void ecaldqm::MESetEcal::setBinContent
override

Definition at line 370 of file MESetEcal.cc.

370  {
371  if (!active_)
372  return;
373 
374  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
375  checkME_(iME);
376 
377  mes_[iME]->setBinContent(_bin, _content);
378  }

◆ setBinEntries() [1/4]

void ecaldqm::MESetProjection::setBinEntries ( DetId const &  _id,
double  _entries 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 245 of file MESetProjection.cc.

245  {
246  if (!active_)
247  return;
248 
249  unsigned iME(binning::findPlotIndex(otype_, _id));
250  checkME_(iME);
251 
252  MonitorElement *me(mes_[iME]);
253 
254  if (isEndcapTTId(_id)) {
255  EcalTrigTowerDetId ttid(_id);
256  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
257  unsigned nIds(ids.size());
258  std::set<int> bins;
259  if (btype_ == binning::kProjEta) {
260  for (unsigned iId(0); iId < nIds; iId++) {
261  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[iId]))));
262  if (bins.find(bin) != bins.end())
263  continue;
264  me->setBinEntries(bin, _entries);
265  }
266  } else if (btype_ == binning::kProjPhi) {
267  for (unsigned iId(0); iId < nIds; iId++) {
268  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[iId]))));
269  if (bins.find(bin) != bins.end())
270  continue;
271  me->setBinEntries(bin, _entries);
272  }
273  }
274  return;
275  }
276 
277  double x(0.);
278  int subdet(_id.subdetId());
279  if (subdet == EcalBarrel) {
280  EBDetId ebid(_id);
281  if (btype_ == binning::kProjEta)
282  x = eta(ebid);
283  else if (btype_ == binning::kProjPhi)
284  x = phi(ebid);
285  } else if (subdet == EcalEndcap) {
286  if (btype_ == binning::kProjEta)
287  x = eta(EEDetId(_id));
288  else if (btype_ == binning::kProjPhi)
289  x = phi(EEDetId(_id));
290  } else if (subdet == EcalTriggerTower) {
291  EcalTrigTowerDetId ttid(_id);
292  if (btype_ == binning::kProjEta) {
293  int ieta(ttid.ieta());
294  if (ieta < 18 && ieta > 0)
295  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
296  else if (ieta > -18 && ieta < 0)
297  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
298  } else if (btype_ == binning::kProjPhi)
299  x = phi(ttid);
300  }
301 
302  int bin(me->getTH1()->FindBin(x));
303  me->setBinEntries(bin, _entries);
304  }

References ecaldqm::MESet::active_, newFWLiteAna::bin, trigObjTnPSource_cfi::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ setBinEntries() [2/4]

void ecaldqm::MESetEcal::setBinEntries
override

Definition at line 410 of file MESetEcal.cc.

410  {
411  if (!active_)
412  return;
414  return;
415 
416  unsigned iME(binning::findPlotIndex(otype_, _id));
417  checkME_(iME);
418 
419  mes_[iME]->setBinEntries(_bin, _entries);
420  }

◆ setBinEntries() [3/4]

void ecaldqm::MESetEcal::setBinEntries
override

Definition at line 422 of file MESetEcal.cc.

422  {
423  if (!active_)
424  return;
426  return;
427 
428  unsigned iME(binning::findPlotIndex(otype_, _id));
429  checkME_(iME);
430 
431  mes_[iME]->setBinEntries(_bin, _entries);
432  }

◆ setBinEntries() [4/4]

void ecaldqm::MESetEcal::setBinEntries
override

Definition at line 434 of file MESetEcal.cc.

434  {
435  if (!active_)
436  return;
438  return;
439 
440  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
441  checkME_(iME);
442 
443  mes_[iME]->setBinEntries(_bin, _entries);
444  }

◆ setBinError() [1/4]

void ecaldqm::MESetProjection::setBinError ( DetId const &  _id,
double  _error 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 184 of file MESetProjection.cc.

184  {
185  if (!active_)
186  return;
187 
188  unsigned iME(binning::findPlotIndex(otype_, _id));
189  checkME_(iME);
190 
191  MonitorElement *me(mes_[iME]);
192 
193  if (isEndcapTTId(_id)) {
194  EcalTrigTowerDetId ttid(_id);
195  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttid));
196  unsigned nIds(ids.size());
197  std::set<int> bins;
198  if (btype_ == binning::kProjEta) {
199  for (unsigned iId(0); iId < nIds; iId++) {
200  int bin(me->getTH1()->FindBin(eta(EEDetId(ids[iId]))));
201  if (bins.find(bin) != bins.end())
202  continue;
203  me->setBinError(bin, _error);
204  }
205  } else if (btype_ == binning::kProjPhi) {
206  for (unsigned iId(0); iId < nIds; iId++) {
207  int bin(me->getTH1()->FindBin(phi(EEDetId(ids[iId]))));
208  if (bins.find(bin) != bins.end())
209  continue;
210  me->setBinError(bin, _error);
211  }
212  }
213  return;
214  }
215 
216  double x(0.);
217  int subdet(_id.subdetId());
218  if (subdet == EcalBarrel) {
219  EBDetId ebid(_id);
220  if (btype_ == binning::kProjEta)
221  x = eta(ebid);
222  else if (btype_ == binning::kProjPhi)
223  x = phi(ebid);
224  } else if (subdet == EcalEndcap) {
225  if (btype_ == binning::kProjEta)
226  x = eta(EEDetId(_id));
227  else if (btype_ == binning::kProjPhi)
228  x = phi(EEDetId(_id));
229  } else if (subdet == EcalTriggerTower) {
230  EcalTrigTowerDetId ttid(_id);
231  if (btype_ == binning::kProjEta) {
232  int ieta(ttid.ieta());
233  if (ieta < 18 && ieta > 0)
234  x = (ieta * 5 - 2.5) * EBDetId::crystalUnitToEta;
235  else if (ieta > -18 && ieta < 0)
236  x = (ieta * 5 + 2.5) * EBDetId::crystalUnitToEta;
237  } else if (btype_ == binning::kProjPhi)
238  x = phi(ttid);
239  }
240 
241  int bin(me->getTH1()->FindBin(x));
242  me->setBinError(bin, _error);
243  }

References ecaldqm::MESet::active_, newFWLiteAna::bin, trigObjTnPSource_cfi::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), LEDCalibrationChannels::ieta, ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, hlt_dqm_clientPB-live_cfg::me, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

◆ setBinError() [2/4]

void ecaldqm::MESetEcal::setBinError
override

Definition at line 380 of file MESetEcal.cc.

380  {
381  if (!active_)
382  return;
383 
384  unsigned iME(binning::findPlotIndex(otype_, _id));
385  checkME_(iME);
386 
387  mes_[iME]->setBinError(_bin, _error);
388  }

◆ setBinError() [3/4]

void ecaldqm::MESetEcal::setBinError
override

Definition at line 390 of file MESetEcal.cc.

390  {
391  if (!active_)
392  return;
393 
394  unsigned iME(binning::findPlotIndex(otype_, _id));
395  checkME_(iME);
396 
397  mes_[iME]->setBinError(_bin, _error);
398  }

◆ setBinError() [4/4]

void ecaldqm::MESetEcal::setBinError
override

Definition at line 400 of file MESetEcal.cc.

400  {
401  if (!active_)
402  return;
403 
404  unsigned iME(binning::findPlotIndex(otype_, _dcctccid, btype_));
405  checkME_(iME);
406 
407  mes_[iME]->setBinError(_bin, _error);
408  }
EBDetId::crystalUnitToEta
static const float crystalUnitToEta
Definition: EBDetId.h:153
ecaldqm::MESet::throw_
void throw_(std::string const &_message) const
Definition: MESet.h:121
ecaldqm::MESetProjection::MESetProjection
MESetProjection(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=nullptr)
Definition: MESetProjection.cc:6
ecaldqm::MESet::fill_
virtual void fill_(unsigned, int, double)
Definition: MESet.cc:246
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
MonitorElementData::Kind::TH1F
EBDetId
Definition: EBDetId.h:17
ecaldqm::binning::kEcal2P
Definition: MESetBinningUtils.h:32
ecaldqm::isEndcapTTId
bool isEndcapTTId(DetId const &)
Definition: EcalDQMCommonUtils.cc:270
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ecaldqm::binning::kProjEta
Definition: MESetBinningUtils.h:47
DDAxes::x
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
ecaldqm::etaBound
const double etaBound
EcalBarrel
Definition: EcalSubdetector.h:10
ecaldqm::binning::kProjPhi
Definition: MESetBinningUtils.h:48
ecaldqm::MESet::otype_
binning::ObjectType otype_
Definition: MESet.h:126
ecaldqm::MESet::active_
bool active_
Definition: MESet.h:133
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
ecaldqm::MESet::btype_
binning::BinningType btype_
Definition: MESet.h:127
ecaldqm::MESet::path_
std::string path_
Definition: MESet.h:125
ecaldqm::binning::findPlotIndex
unsigned findPlotIndex(ObjectType, DetId const &)
Definition: MESetBinningUtils.cc:299
ecaldqm::getTrigTowerMap
const EcalTrigTowerConstituentsMap * getTrigTowerMap()
Definition: EcalDQMCommonUtils.cc:458
ecaldqm::MESet::mes_
std::vector< MonitorElement * > mes_
Definition: MESet.h:123
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
EcalTriggerTower
Definition: EcalSubdetector.h:10
MonitorElementData::Kind::TPROFILE2D
ecaldqm::MESet::checkME_
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:113
ecaldqm::MESet::MESet
MESet()
Definition: MESet.cc:14
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ecaldqm::MESet::kind_
MonitorElement::Kind kind_
Definition: MESet.h:128
btvTracks_cfi._content
_content
Definition: btvTracks_cfi.py:5
MonitorElementData::Kind::TPROFILE
ecaldqm::MESetEcal::MESetEcal
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr)
Definition: MESetEcal.cc:10
ecaldqm::phi
double phi(EBDetId const &)
Definition: EcalDQMCommonUtils.cc:215
ecaldqm::eta
double eta(EBDetId const &)
Definition: EcalDQMCommonUtils.cc:209