CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EmDQMReco::FourVectorMonitorElements Class Reference

Public Member Functions

void fill (const math::XYZTLorentzVector &momentum)
 
 FourVectorMonitorElements (EmDQMReco *_parent, DQMStore::IBooker &iBooker, const std::string &histogramNameTemplate, const std::string &histogramTitleTemplate)
 

Private Attributes

MonitorElementetaMonitorElement
 
MonitorElementetMonitorElement
 
EmDQMRecoparent
 
MonitorElementphiMonitorElement
 

Detailed Description

a class managing a set of MonitorElements for quantities of a fourvector we want to histogram.

Definition at line 53 of file EmDQMReco.h.

Constructor & Destructor Documentation

◆ FourVectorMonitorElements()

EmDQMReco::FourVectorMonitorElements::FourVectorMonitorElements ( EmDQMReco _parent,
DQMStore::IBooker iBooker,
const std::string &  histogramNameTemplate,
const std::string &  histogramTitleTemplate 
)
Parameters
histogramNameTemplateshould be a format string (like used in printf(..) or boost::format(..) for the histogram NAME where the first s is replaced with et,eta or phi.
histogramTitleTemplateshould be a format string (see histogramNameTemplate) for the histogram TITLE where the first s is replaced with et,eta or phi.

Definition at line 48 of file EmDQMReco.cc.

52  : parent(_parent) {
53  // introducing variables for better code readability later on
54  std::string histName;
56 
57  // et
58  histName = boost::str(boost::format(histogramNameTemplate) % "et");
59  histTitle = boost::str(boost::format(histogramTitleTemplate) % "E_{T}");
61  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, parent->plotPtMin, parent->plotPtMax);
62 
63  // eta
64  histName = boost::str(boost::format(histogramNameTemplate) % "eta");
65  histTitle = boost::str(boost::format(histogramTitleTemplate) % "#eta");
67  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotEtaMax, parent->plotEtaMax);
68 
69  // phi
70  histName = boost::str(boost::format(histogramNameTemplate) % "phi");
71  histTitle = boost::str(boost::format(histogramTitleTemplate) % "#phi");
73  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotPhiMax, parent->plotPhiMax);
74 }

References dqm::implementation::IBooker::book1D(), etaMonitorElement, etMonitorElement, dqm-mbProfile::format, B2GTnPMonitor_cfi::histTitle, parent, phiMonitorElement, EmDQMReco::plotBins, EmDQMReco::plotEtaMax, EmDQMReco::plotPhiMax, EmDQMReco::plotPtMax, EmDQMReco::plotPtMin, str, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Function Documentation

◆ fill()

void EmDQMReco::FourVectorMonitorElements::fill ( const math::XYZTLorentzVector momentum)

Definition at line 78 of file EmDQMReco.cc.

78  {
79  etMonitorElement->Fill(momentum.Et());
80  etaMonitorElement->Fill(momentum.eta());
81  phiMonitorElement->Fill(momentum.phi());
82 }

Member Data Documentation

◆ etaMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::etaMonitorElement
private

Definition at line 76 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

◆ etMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::etMonitorElement
private

DQM objects (histograms) for the variables to be plotted

Definition at line 75 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

◆ parent

EmDQMReco* EmDQMReco::FourVectorMonitorElements::parent
private

for accessing the histogramming parameters

Definition at line 72 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements(), edmIntegrityCheck.PublishToFileSystem::get(), and edmIntegrityCheck.PublishToFileSystem::publish().

◆ phiMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::phiMonitorElement
private

Definition at line 77 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

EmDQMReco::plotEtaMax
double plotEtaMax
Definition: EmDQMReco.h:125
EmDQMReco::FourVectorMonitorElements::phiMonitorElement
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:77
EmDQMReco::FourVectorMonitorElements::parent
EmDQMReco * parent
Definition: EmDQMReco.h:72
dqm-mbProfile.format
format
Definition: dqm-mbProfile.py:16
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
EmDQMReco::FourVectorMonitorElements::etMonitorElement
MonitorElement * etMonitorElement
Definition: EmDQMReco.h:75
str
#define str(s)
Definition: TestProcessor.cc:48
EmDQMReco::plotPhiMax
double plotPhiMax
Definition: EmDQMReco.h:128
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EmDQMReco::plotPtMin
double plotPtMin
Definition: EmDQMReco.h:126
EmDQMReco::plotPtMax
double plotPtMax
Definition: EmDQMReco.h:127
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
EmDQMReco::plotBins
unsigned int plotBins
Definition: EmDQMReco.h:131
EmDQMReco::FourVectorMonitorElements::etaMonitorElement
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:76