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 (int, double=1., double=1., double=0.) override
 
void fill (double, double=1., double=0.) override
 
double getBinContent (DetId const &, int=0) const override
 
double getBinEntries (DetId const &, int=0) const override
 
double getBinError (DetId const &, int=0) const override
 
 MESetProjection (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=0)
 
 MESetProjection (MESetProjection const &)
 
void setBinContent (DetId const &, double) override
 
void setBinEntries (DetId const &, double) override
 
void setBinError (DetId const &, 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 (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
 
 MESetEcal (MESetEcal const &)
 
MESetoperator= (MESet const &) override
 
bool retrieve (DQMStore::IGetter &, std::string *=0) 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 const_iterator begin () const
 
virtual iterator begin ()
 
virtual const_iterator beginChannel () const
 
virtual iterator beginChannel ()
 
virtual void clear () const
 
virtual const_iterator end () const
 
virtual iterator end ()
 
std::string formPath (PathReplacements const &) const
 
bool getBatchMode () const
 
binning::BinningType getBinType () const
 
MonitorElement::Kind getKind () const
 
bool getLumiFlag () const
 
virtual MonitorElement const * getME (unsigned _iME) const
 
virtual MonitorElementgetME (unsigned _iME)
 
binning::ObjectType getObjType () const
 
virtual std::string const & getPath () const
 
bool isActive () const
 
virtual bool maskMatches (DetId const &, uint32_t, StatusManager const *) const
 
 MESet ()
 
 MESet (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind)
 
 MESet (MESet const &)
 
virtual void recoverStats ()
 
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 void softReset ()
 
virtual ~MESet ()
 

Additional Inherited Members

- Public Types inherited from ecaldqm::MESet
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, int, double)
 
virtual void fill_ (unsigned, int, double, double)
 
virtual void fill_ (unsigned, double, double, double)
 
void throw_ (std::string const &_message) const
 
- Protected Attributes inherited from ecaldqm::MESetEcal
unsigned logicalDimensions_
 
binning::AxisSpecs const * xaxis_
 
binning::AxisSpecs const * yaxis_
 
binning::AxisSpecs const * zaxis_
 
- 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

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

Definition at line 6 of file MESetProjection.cc.

References ecaldqm::MESet::btype_, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MESet::kind_, ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, and ecaldqm::MESet::throw_().

Referenced by clone().

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  }
MonitorElement::Kind kind_
Definition: MESet.h:129
void throw_(std::string const &_message) const
Definition: MESet.h:122
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
Definition: MESetEcal.cc:10
binning::BinningType btype_
Definition: MESet.h:128
ecaldqm::MESetProjection::MESetProjection ( MESetProjection const &  _orig)

Definition at line 29 of file MESetProjection.cc.

29 : MESetEcal(_orig) {}
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
Definition: MESetEcal.cc:10
ecaldqm::MESetProjection::~MESetProjection ( )
override

Definition at line 31 of file MESetProjection.cc.

31 {}

Member Function Documentation

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

Reimplemented from ecaldqm::MESetEcal.

Definition at line 33 of file MESetProjection.cc.

References popcon2dropbox::copy(), MESetProjection(), callgraph::path, ecaldqm::MESet::path_, and AlCaHLTBitMon_QueryRunRegistry::string.

33  {
35  if (!_path.empty())
36  path_ = _path;
37  MESet *copy(new MESetProjection(*this));
38  path_ = path;
39  return copy;
40  }
def copy(args, dbName)
MESetProjection(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=0)
std::string path_
Definition: MESet.h:126
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.

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(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
virtual void fill_(unsigned, int, double)
Definition: MESet.cc:266
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
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.

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().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESetProjection::fill ( double  _x,
double  _w = 1.,
double  = 0. 
)
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 101 of file MESetProjection.cc.

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_.

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
double const etaBound
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
double ecaldqm::MESetProjection::getBinContent ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 306 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getBinContent(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
double ecaldqm::MESetProjection::getBinEntries ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 408 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getBinEntries(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
double ecaldqm::MESetProjection::getBinError ( DetId const &  _id,
int  = 0 
) const
overridevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 357 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getBinError(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESetProjection::setBinContent ( DetId const &  _id,
double  _content 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 123 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), MonitorElement::setBinContent(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESetProjection::setBinEntries ( DetId const &  _id,
double  _entries 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 245 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), MonitorElement::setBinEntries(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESetProjection::setBinError ( DetId const &  _id,
double  _error 
)
overridevirtual

Reimplemented from ecaldqm::MESet.

Definition at line 184 of file MESetProjection.cc.

References ecaldqm::MESet::active_, stringResolutionProvider_cfi::bin, create_public_pileup_plots::bins, ecaldqm::MESet::btype_, ecaldqm::MESet::checkME_(), EBDetId::crystalUnitToEta, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::eta(), ecaldqm::binning::findPlotIndex(), MonitorElement::getTH1(), ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::ieta(), ecaldqm::isEndcapTTId(), ecaldqm::binning::kProjEta, ecaldqm::binning::kProjPhi, ecaldqm::MESet::mes_, ecaldqm::MESet::otype_, ecaldqm::phi(), MonitorElement::setBinError(), and DetId::subdetId().

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  }
virtual void checkME_(unsigned _iME) const
Definition: MESet.h:114
bool isEndcapTTId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
static const float crystalUnitToEta
Definition: EBDetId.h:153
bin
set the eta bin as selection string.
unsigned findPlotIndex(ObjectType, DetId const &)
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
double eta(EBDetId const &)
double phi(EBDetId const &)
std::vector< MonitorElement * > mes_
Definition: MESet.h:124