CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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.

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

52  : parent(_parent) {
53  // introducing variables for better code readability later on
54  std::string histName;
55  std::string histTitle;
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 }
unsigned int plotBins
Definition: EmDQMReco.h:130
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:75
double plotPhiMax
Definition: EmDQMReco.h:127
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:76
double plotPtMin
Definition: EmDQMReco.h:125
double plotPtMax
Definition: EmDQMReco.h:126
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:124

Member Function Documentation

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 }
void Fill(long long x)
MonitorElement * etaMonitorElement
Definition: EmDQMReco.h:75
MonitorElement * phiMonitorElement
Definition: EmDQMReco.h:76

Member Data Documentation

MonitorElement* EmDQMReco::FourVectorMonitorElements::etaMonitorElement
private

Definition at line 75 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().

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

EmDQMReco* EmDQMReco::FourVectorMonitorElements::parent
private
MonitorElement* EmDQMReco::FourVectorMonitorElements::phiMonitorElement
private

Definition at line 76 of file EmDQMReco.h.

Referenced by FourVectorMonitorElements().