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) {
9  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("htBinning");
11  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("metBinning2");
12  ht_binning_ =
14  ls_binning_ =
15  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("htlsPSet"));
16 }
17 
19  std::string histname, histtitle;
20 
21  histname = "ht_variable";
22  histtitle = "PFHT";
23  bookME(ibooker, htME_variableBinning_, histname, histtitle, ht_variable_binning_);
24  setMETitle(htME_variableBinning_, "PF HT [GeV]", "events / [GeV]");
25 
26  histname = "htVsMET";
27  histtitle = "PFHT vs PFMET";
28  bookME(ibooker, htVsMET_, histname, histtitle, met_variable_binning_, ht_variable_binning_);
29  setMETitle(htVsMET_, "PF MET [GeV]", "PF HT [GeV]");
30 
31  histname = "htVsLS";
32  histtitle = "PFHT vs LS";
33  bookME(ibooker,
34  htVsLS_,
35  histname,
36  histtitle,
42  setMETitle(htVsLS_, "LS", "PF HT [GeV]");
43 }
44 
45 void HTDQM::fillHistograms(const std::vector<reco::PFJet>& htjets,
46  const double& met,
47  const int& ls,
48  const bool passCond) {
49  // filling histograms (denominator)
50  double htSum = 0;
51  for (auto const& htjet : htjets) {
52  htSum += htjet.pt();
53  }
54 
56 
57  htVsMET_.denominator->Fill(met, htSum);
58  htVsLS_.denominator->Fill(ls, htSum);
59 
60  // applying selection for numerator
61  if (passCond) {
62  // filling histograms (num_genTriggerEventFlag_)
64  htVsMET_.numerator->Fill(met, htSum);
65  htVsLS_.numerator->Fill(ls, htSum);
66  }
67 }
68 
73 
74  std::vector<double> bins = {0., 50., 100., 150., 200., 250., 300., 350., 400., 450., 500.,
75  550., 600., 650., 700., 750., 800., 900., 1000., 1200., 1500., 2000.};
76  histoPSet.add<std::vector<double> >("htBinning", bins);
77 
78  std::vector<double> metbins = {0., 20., 40., 60., 80., 100., 120., 140., 160., 180., 200., 220.,
79  240., 260., 280., 300., 320., 340., 360., 380., 400., 450., 500., 1000.};
80  histoPSet.add<std::vector<double> >("metBinning2", metbins);
81 
85 }
HTDQM::fillHistograms
void fillHistograms(const std::vector< reco::PFJet > &htjets, const double &met, const int &ls, const bool passCond)
Definition: HTDQM.cc:45
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
HTDQM.h
HTDQM::~HTDQM
~HTDQM() override
HTDQM::htVsLS_
ObjME htVsLS_
Definition: HTDQM.h:27
HTDQM::htME_variableBinning_
ObjME htME_variableBinning_
Definition: HTDQM.h:25
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
TriggerDQMBase::ObjME::numerator
MonitorElement * numerator
Definition: TriggerDQMBase.h:27
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
BTaggingMonitor_cfi.htPSet
htPSet
Definition: BTaggingMonitor_cfi.py:35
HTDQM::bookHistograms
void bookHistograms(DQMStore::IBooker &)
Definition: HTDQM.cc:18
HTDQM::ht_variable_binning_
std::vector< double > ht_variable_binning_
Definition: HTDQM.h:20
LumiMonitor_cff.lsPSet
lsPSet
Definition: LumiMonitor_cff.py:33
HTDQM::met_variable_binning_
std::vector< double > met_variable_binning_
Definition: HTDQM.h:21
TriggerDQMBase::setMETitle
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
Definition: TriggerDQMBase.cc:3
TriggerDQMBase::MEbinning::xmax
double xmax
Definition: TriggerDQMBase.h:19
HTDQM::ht_binning_
MEbinning ht_binning_
Definition: HTDQM.h:22
HTDQM::HTDQM
HTDQM()
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HTDQM::initialise
void initialise(const edm::ParameterSet &iConfig)
Definition: HTDQM.cc:7
TriggerDQMBase::bookME
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)
Definition: TriggerDQMBase.cc:15
HTDQM::htVsMET_
ObjME htVsMET_
Definition: HTDQM.h:26
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerDQMBase::fillHistoPSetDescription
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: TriggerDQMBase.cc:108
edm::ParameterSet
Definition: ParameterSet.h:36
HTDQM::fillHtDescription
static void fillHtDescription(edm::ParameterSetDescription &histoPSet)
Definition: HTDQM.cc:69
LumiMonitor_cff.histoPSet
histoPSet
Definition: LumiMonitor_cff.py:12
TriggerDQMBase::getHistoPSet
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: TriggerDQMBase.cc:120
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HTDQM::ls_binning_
MEbinning ls_binning_
Definition: HTDQM.h:23
TriggerDQMBase::ObjME::denominator
MonitorElement * denominator
Definition: TriggerDQMBase.h:28
TriggerDQMBase::MEbinning::nbins
uint nbins
Definition: TriggerDQMBase.h:17
TriggerDQMBase::MEbinning::xmin
double xmin
Definition: TriggerDQMBase.h:18
dqm::implementation::IBooker
Definition: DQMStore.h:43
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
TriggerDQMBase::fillHistoLSPSetDescription
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: TriggerDQMBase.cc:114