CMS 3D CMS Logo

Public Member Functions | Private Attributes

EmDQMReco::FourVectorMonitorElements Class Reference

List of all members.

Public Member Functions

void fill (const math::XYZTLorentzVector &momentum)
 FourVectorMonitorElements (EmDQMReco *_parent, 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 33 of file EmDQMReco.h.


Constructor & Destructor Documentation

EmDQMReco::FourVectorMonitorElements::FourVectorMonitorElements ( EmDQMReco _parent,
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.

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);
}

Member Function Documentation

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() );
}

Member Data Documentation

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