Public Member Functions | |
void | fill (const math::XYZTLorentzVector &momentum) |
FourVectorMonitorElements (EmDQMReco *_parent, const std::string &histogramNameTemplate, const std::string &histogramTitleTemplate) | |
Private Attributes | |
MonitorElement * | etaMonitorElement |
MonitorElement * | etMonitorElement |
EmDQMReco * | parent |
MonitorElement * | phiMonitorElement |
a class managing a set of MonitorElements for quantities of a fourvector we want to histogram.
Definition at line 33 of file EmDQMReco.h.
EmDQMReco::FourVectorMonitorElements::FourVectorMonitorElements | ( | EmDQMReco * | _parent, |
const std::string & | histogramNameTemplate, | ||
const std::string & | histogramTitleTemplate | ||
) |
histogramNameTemplate | should 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. |
histogramTitleTemplate | should 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 DQMStore::book1D(), EmDQMReco::dbe, etaMonitorElement, etMonitorElement, diffTreeTool::format(), parent, phiMonitorElement, EmDQMReco::plotBins, EmDQMReco::plotEtaMax, EmDQMReco::plotPhiMax, EmDQMReco::plotPtMax, and EmDQMReco::plotPtMin.
: parent(_parent) { // introducing variables for better code readability later on std::string histName; std::string histTitle; // et histName = boost::str(boost::format(histogramNameTemplate) % "et"); histTitle = boost::str(boost::format(histogramTitleTemplate) % "E_{T}"); etMonitorElement = parent->dbe->book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, parent->plotPtMin, parent->plotPtMax); // eta histName = boost::str(boost::format(histogramNameTemplate) % "eta"); histTitle= boost::str(boost::format(histogramTitleTemplate) % "#eta"); etaMonitorElement = parent->dbe->book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, - parent->plotEtaMax, parent->plotEtaMax); // phi histName = boost::str(boost::format(histogramNameTemplate) % "phi"); histTitle= boost::str(boost::format(histogramTitleTemplate) % "#phi"); phiMonitorElement = parent->dbe->book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, - parent->plotPhiMax, parent->plotPhiMax); }
void EmDQMReco::FourVectorMonitorElements::fill | ( | const math::XYZTLorentzVector & | momentum | ) |
Definition at line 89 of file EmDQMReco.cc.
{ etMonitorElement->Fill(momentum.Et()); etaMonitorElement->Fill(momentum.eta() ); phiMonitorElement->Fill(momentum.phi() ); }
Definition at line 55 of file EmDQMReco.h.
Referenced by FourVectorMonitorElements().
DQM objects (histograms) for the variables to be plotted
Definition at line 54 of file EmDQMReco.h.
Referenced by FourVectorMonitorElements().
for accessing the histogramming parameters
Definition at line 51 of file EmDQMReco.h.
Referenced by FourVectorMonitorElements().
Definition at line 56 of file EmDQMReco.h.
Referenced by FourVectorMonitorElements().