CMS 3D CMS Logo

HTDQM.cc
Go to the documentation of this file.
2 
3 HTDQM::HTDQM()= default;
4 
5 HTDQM::~HTDQM()= default;
6 
7 void HTDQM::initialise(const edm::ParameterSet& iConfig ){
8 
9  ht_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("htBinning");
10  met_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning2");
13 
14 }
15 
17 {
18 
19  std::string histname, histtitle;
20 
21  histname = "ht_variable"; histtitle = "PFHT";
22  bookME(ibooker,htME_variableBinning_,histname,histtitle,ht_variable_binning_);
23  setMETitle(htME_variableBinning_,"PF HT [GeV]","events / [GeV]");
24 
25  histname = "htVsMET"; histtitle = "PFHT vs PFMET";
26  bookME(ibooker,htVsMET_,histname,histtitle,met_variable_binning_,ht_variable_binning_);
27  setMETitle(htVsMET_,"PF MET [GeV]","PF HT [GeV]");
28 
29  histname = "htVsLS"; histtitle = "PFHT vs LS";
31  setMETitle(htVsLS_,"LS","PF HT [GeV]");
32 
33 }
34 
35 void HTDQM::fillHistograms(const std::vector<reco::PFJet> & htjets,
36  const double & met,
37  const int & ls,
38  const bool passCond){
39 
40  // filling histograms (denominator)
41  double htSum = 0;
42  for (auto const & htjet : htjets){
43  htSum += htjet.pt();
44  }
45 
47 
48  htVsMET_.denominator -> Fill(met, htSum);
49  htVsLS_.denominator -> Fill(ls, htSum);
50 
51  // applying selection for numerator
52  if (passCond){
53  // filling histograms (num_genTriggerEventFlag_)
55  htVsMET_.numerator -> Fill(met, htSum);
56  htVsLS_.numerator -> Fill(ls, htSum);
57  }
58 
59 }
60 
62 
65  histoPSet.add<edm::ParameterSetDescription>("htPSet", htPSet);
66 
67  std::vector<double> bins = {0.,50.,100.,150.,200.,250.,300.,350.,400.,450.,500.,550.,600.,650.,700.,750.,800.,900.,1000.,1200.,1500.,2000.};
68  histoPSet.add<std::vector<double> >("htBinning", bins);
69 
70  std::vector<double> metbins = {0.,20.,40.,60.,80.,100.,120.,140.,160.,180.,200.,220.,240.,260.,280.,300.,320.,340.,360.,380.,400.,450.,500.,1000.};
71  histoPSet.add<std::vector<double> >("metBinning2", metbins);
72 
75  histoPSet.add<edm::ParameterSetDescription>("htlsPSet", lsPSet);
76 
77 }
T getParameter(std::string const &) const
MonitorElement * numerator
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
~HTDQM() override
void bookHistograms(DQMStore::IBooker &)
Definition: HTDQM.cc:16
void initialise(const edm::ParameterSet &iConfig)
Definition: HTDQM.cc:7
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
std::vector< double > ht_variable_binning_
Definition: HTDQM.h:28
ObjME htVsLS_
Definition: HTDQM.h:35
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
MEbinning ht_binning_
Definition: HTDQM.h:30
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
std::vector< double > met_variable_binning_
Definition: HTDQM.h:29
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static void fillHtDescription(edm::ParameterSetDescription &histoPSet)
Definition: HTDQM.cc:61
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ObjME htVsMET_
Definition: HTDQM.h:34
def ls(path, rec=False)
Definition: eostools.py:349
met
===> hadronic RAZOR
MEbinning ls_binning_
Definition: HTDQM.h:31
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
Definition: HTDQM.cc:35
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)
ObjME htME_variableBinning_
Definition: HTDQM.h:33