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 52 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 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 = fmt::sprintf(histogramNameTemplate, "et");
59  histTitle = fmt::sprintf(histogramTitleTemplate, "E_{T}");
61  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, parent->plotPtMin, parent->plotPtMax);
62 
63  // eta
64  histName = fmt::sprintf(histogramNameTemplate, "eta");
65  histTitle = fmt::sprintf(histogramTitleTemplate, "#eta");
67  iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotEtaMax, parent->plotEtaMax);
68 
69  // phi
70  histName = fmt::sprintf(histogramNameTemplate, "phi");
71  histTitle = fmt::sprintf(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, B2GTnPMonitor_cfi::histTitle, parent, phiMonitorElement, EmDQMReco::plotBins, EmDQMReco::plotEtaMax, EmDQMReco::plotPhiMax, EmDQMReco::plotPtMax, EmDQMReco::plotPtMin, 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 75 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 74 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

◆ parent

EmDQMReco* EmDQMReco::FourVectorMonitorElements::parent
private

for accessing the histogramming parameters

Definition at line 71 of file EmDQMReco.h.

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

◆ phiMonitorElement

MonitorElement* EmDQMReco::FourVectorMonitorElements::phiMonitorElement
private

Definition at line 76 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

EmDQMReco::plotEtaMax
double plotEtaMax
Definition: EmDQMReco.h:124
EmDQMReco::FourVectorMonitorElements::phiMonitorElement
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:76
EmDQMReco::FourVectorMonitorElements::parent
EmDQMReco * parent
Definition: EmDQMReco.h:71
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
EmDQMReco::FourVectorMonitorElements::etMonitorElement
MonitorElement * etMonitorElement
Definition: EmDQMReco.h:74
EmDQMReco::plotPhiMax
double plotPhiMax
Definition: EmDQMReco.h:127
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EmDQMReco::plotPtMin
double plotPtMin
Definition: EmDQMReco.h:125
EmDQMReco::plotPtMax
double plotPtMax
Definition: EmDQMReco.h:126
B2GTnPMonitor_cfi.histTitle
histTitle
Definition: B2GTnPMonitor_cfi.py:112
EmDQMReco::plotBins
unsigned int plotBins
Definition: EmDQMReco.h:130
EmDQMReco::FourVectorMonitorElements::etaMonitorElement
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:75
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98