CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
METDQM.cc
Go to the documentation of this file.
2 
3 METDQM::METDQM() = default;
4 
5 METDQM::~METDQM() = default;
6 
9  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning");
10  met_binning_ =
12  phi_binning_ =
14  ls_binning_ =
16 }
17 
19  std::string histname, histtitle;
20 
21  histname = "met";
22  histtitle = "PFMET";
23  bookME(ibooker, metME_, histname, histtitle, met_binning_.nbins, met_binning_.xmin, met_binning_.xmax);
24  setMETitle(metME_, "PF MET [GeV]", "events / [GeV]");
25 
26  histname = "met_variable";
27  histtitle = "PFMET";
28  bookME(ibooker, metME_variableBinning_, histname, histtitle, met_variable_binning_);
29  setMETitle(metME_variableBinning_, "PF MET [GeV]", "events / [GeV]");
30 
31  histname = "metVsLS";
32  histtitle = "PFMET vs LS";
33  bookME(ibooker,
34  metVsLS_,
35  histname,
36  histtitle,
42  setMETitle(metVsLS_, "LS", "PF MET [GeV]");
43 
44  histname = "metPhi";
45  histtitle = "PFMET phi";
46  bookME(ibooker, metPhiME_, histname, histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
47  setMETitle(metPhiME_, "PF MET #phi", "events / 0.1 rad");
48 }
49 
50 void METDQM::fillHistograms(const double& met, const double& phi, const int& ls, const bool passCond) {
51  // filling histograms (denominator)
52  metME_.denominator->Fill(met);
55 
56  metVsLS_.denominator->Fill(ls, met);
57 
58  // applying selection for numerator
59  if (passCond) {
60  // filling histograms (num_genTriggerEventFlag_)
61  metME_.numerator->Fill(met);
63  metPhiME_.numerator->Fill(phi);
64  metVsLS_.numerator->Fill(ls, met);
65  }
66 }
67 
70  fillHistoPSetDescription(metPSet);
71  histoPSet.add<edm::ParameterSetDescription>("metPSet", metPSet);
72 
73  std::vector<double> bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
74  170., 180., 190., 200., 220., 240., 260., 280., 300., 350., 400., 450., 1000.};
75  histoPSet.add<std::vector<double> >("metBinning", bins);
76 
78  fillHistoPSetDescription(phiPSet);
79  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
80 
83  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
84 }
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
Definition: METDQM.cc:50
void bookHistograms(DQMStore::IBooker &)
Definition: METDQM.cc:18
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
~METDQM() override
ObjME metME_
Definition: METDQM.h:25
def ls
Definition: eostools.py:349
static void fillMetDescription(edm::ParameterSetDescription &histoPSet)
Definition: METDQM.cc:68
MEbinning ls_binning_
Definition: METDQM.h:23
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
void Fill(long long x)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
void initialise(const edm::ParameterSet &iConfig)
Definition: METDQM.cc:7
MEbinning met_binning_
Definition: METDQM.h:21
MEbinning phi_binning_
Definition: METDQM.h:22
MonitorElement * denominator
MonitorElement * numerator
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > met_variable_binning_
Definition: METDQM.h:20
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
ObjME metME_variableBinning_
Definition: METDQM.h:26
ObjME metPhiME_
Definition: METDQM.h:28
ObjME metVsLS_
Definition: METDQM.h:27