CMS 3D CMS Logo

METDQM.cc
Go to the documentation of this file.
2 
3 METDQM::METDQM()= default;
4 
5 METDQM::~METDQM()= default;
6 
7 void METDQM::initialise(const edm::ParameterSet& iConfig ){
8 
9  met_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning");
13 
14 }
15 
17 {
18 
19  std::string histname, histtitle;
20 
21  histname = "met"; histtitle = "PFMET";
22  bookME(ibooker,metME_,histname,histtitle,met_binning_.nbins,met_binning_.xmin, met_binning_.xmax);
23  setMETitle(metME_,"PF MET [GeV]","events / [GeV]");
24 
25  histname = "met_variable"; histtitle = "PFMET";
26  bookME(ibooker,metME_variableBinning_,histname,histtitle,met_variable_binning_);
27  setMETitle(metME_variableBinning_,"PF MET [GeV]","events / [GeV]");
28 
29  histname = "metVsLS"; histtitle = "PFMET vs LS";
31  setMETitle(metVsLS_,"LS","PF MET [GeV]");
32 
33  histname = "metPhi"; histtitle = "PFMET phi";
34  bookME(ibooker,metPhiME_,histname,histtitle, phi_binning_.nbins, phi_binning_.xmin, phi_binning_.xmax);
35  setMETitle(metPhiME_,"PF MET #phi","events / 0.1 rad");
36 
37 }
38 
39 void METDQM::fillHistograms(const double & met,
40  const double & phi,
41  const int & ls,
42  const bool passCond){
43 
44  // filling histograms (denominator)
45  metME_.denominator -> Fill(met);
47  metPhiME_.denominator -> Fill(phi);
48 
49  metVsLS_.denominator -> Fill(ls, met);
50 
51  // applying selection for numerator
52  if (passCond){
53  // filling histograms (num_genTriggerEventFlag_)
54  metME_.numerator -> Fill(met);
56  metPhiME_.numerator -> Fill(phi);
57  metVsLS_.numerator -> Fill(ls, met);
58  }
59 
60 }
61 
63 
65  fillHistoPSetDescription(metPSet);
66  histoPSet.add<edm::ParameterSetDescription>("metPSet", metPSet);
67 
68  std::vector<double> bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,1000.};
69  histoPSet.add<std::vector<double> >("metBinning", bins);
70 
72  fillHistoPSetDescription(phiPSet);
73  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
74 
77  histoPSet.add<edm::ParameterSetDescription>("lsPSet", lsPSet);
78 
79 }
void fillHistograms(const double &met, const double &phi, const int &ls, const bool passCond)
Definition: METDQM.cc:39
T getParameter(std::string const &) const
MonitorElement * numerator
void bookHistograms(DQMStore::IBooker &)
Definition: METDQM.cc:16
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
~METDQM() override
ObjME metME_
Definition: METDQM.h:31
static void fillMetDescription(edm::ParameterSetDescription &histoPSet)
Definition: METDQM.cc:62
MEbinning ls_binning_
Definition: METDQM.h:29
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
void initialise(const edm::ParameterSet &iConfig)
Definition: METDQM.cc:7
MEbinning met_binning_
Definition: METDQM.h:27
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MEbinning phi_binning_
Definition: METDQM.h:28
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > met_variable_binning_
Definition: METDQM.h:26
def ls(path, rec=False)
Definition: eostools.py:348
met
===> hadronic RAZOR
ObjME metME_variableBinning_
Definition: METDQM.h:32
ObjME metPhiME_
Definition: METDQM.h:34
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
ObjME metVsLS_
Definition: METDQM.h:33