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 51 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(..) 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 47 of file EmDQMReco.cc.

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

51  : parent(_parent) {
52  // introducing variables for better code readability later on
53  std::string histName;
55 
56  // et
57  histName = fmt::sprintf(histogramNameTemplate, "et");
58  histTitle = fmt::sprintf(histogramTitleTemplate, "E_{T}");
60  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, parent->plotPtMin, parent->plotPtMax);
61 
62  // eta
63  histName = fmt::sprintf(histogramNameTemplate, "eta");
64  histTitle = fmt::sprintf(histogramTitleTemplate, "#eta");
66  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotEtaMax, parent->plotEtaMax);
67 
68  // phi
69  histName = fmt::sprintf(histogramNameTemplate, "phi");
70  histTitle = fmt::sprintf(histogramTitleTemplate, "#phi");
72  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotPhiMax, parent->plotPhiMax);
73 }
unsigned int plotBins
Definition: EmDQMReco.h:129
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:74
double plotPhiMax
Definition: EmDQMReco.h:126
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:75
double plotPtMin
Definition: EmDQMReco.h:124
double plotPtMax
Definition: EmDQMReco.h:125
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
double plotEtaMax
Definition: EmDQMReco.h:123

Member Function Documentation

◆ fill()

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

Definition at line 77 of file EmDQMReco.cc.

77  {
78  etMonitorElement->Fill(momentum.Et());
79  etaMonitorElement->Fill(momentum.eta());
80  phiMonitorElement->Fill(momentum.phi());
81 }
void Fill(long long x)
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:74
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:75

Member Data Documentation

◆ etaMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::etaMonitorElement
private

Definition at line 74 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 73 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

◆ parent

EmDQMReco* EmDQMReco::FourVectorMonitorElements::parent
private

for accessing the histogramming parameters

Definition at line 70 of file EmDQMReco.h.

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

◆ phiMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::phiMonitorElement
private

Definition at line 75 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().