CMS 3D CMS Logo

HMesonGammaDQM.cc
Go to the documentation of this file.
3 
5 
7 
9 
10  gammapt_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("gammaptBinning");
11  mesonpt_variable_binning_ = iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("mesonptBinning");
12 
15 
16 }
17 
19 {
20 
21  std::string histname, histtitle;
22 
23  histname = "gammapt"; histtitle = "Gamma pT";
24  bookME(ibooker,gammaptME_,histname,histtitle,gammapt_variable_binning_);
25  setMETitle(gammaptME_,"Gamma p_{T} [GeV]","events / [GeV]");
26 
27  histname = "mesonpt"; histtitle = "Meson pT";
28  bookME(ibooker,mesonptME_,histname,histtitle,mesonpt_variable_binning_);
29  setMETitle(mesonptME_,"Meson p_{T} [GeV]","events / [GeV]");
30 
31  histname = "gammaeta"; histtitle = "Gamma eta";
33  setMETitle(gammaetaME_,"Gamma #eta","events");
34 
35  histname = "mesoneta"; histtitle = "Meson eta";
37  setMETitle(mesonetaME_,"Meson #eta","events");
38 
39  histname = "gammaetaVsLS"; histtitle = "Gamma eta vs LS";
41  setMETitle(gammaetaVsLS_,"LS","Gamma #eta");
42 
43 }
44 
46  std::vector<TLorentzVector> mesons,
47  const int & ls,
48  const bool passCond){
49 
50  // filling histograms (denominator)
51  if (!photons.empty()){
52  double eta1 = photons[0].eta();
53  gammaptME_.denominator -> Fill(photons[0].pt());
54  gammaetaME_.denominator -> Fill(eta1);
55  gammaetaVsLS_.denominator -> Fill(ls, eta1);
56  }
57  if (!mesons.empty()){
58  double eta2 = mesons[0].Eta();
59  mesonptME_.denominator -> Fill(mesons[0].Pt());
60  mesonetaME_.denominator -> Fill(eta2);
61  }
62 
63 
64  // applying selection for numerator
65  if (passCond){
66  if (!photons.empty()){
67  double eta1 = photons[0].eta();
68  gammaptME_.numerator -> Fill(photons[0].pt());
69  gammaetaME_.numerator -> Fill(eta1);
70  gammaetaVsLS_.numerator -> Fill(ls, eta1);
71  }
72  if (!mesons.empty()){
73  double eta2 = mesons[0].Eta();
74  mesonptME_.numerator -> Fill(mesons[0].Pt());
75  mesonetaME_.numerator -> Fill(eta2);
76  }
77  }
78 
79 }
80 
82 
84  fillHistoPSetDescription(hmgetaPSet);
85  histoPSet.add<edm::ParameterSetDescription>("hmgetaPSet", hmgetaPSet);
86 
87  std::vector<double> pt1bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,180.,210.,240.,270.,300.,330.,360.,400.,450.,500.,750.,1000.,1500.};
88  histoPSet.add<std::vector<double> >("gammaptBinning", pt1bins);
89 
90  std::vector<double> pt2bins = {0.,20.,40.,45.,50.,55.,60.,65.,70.,80.,90.,100.,110.,120.,150.,180.,210.,240.,270.,300.,350.,400.,1000.};
91  histoPSet.add<std::vector<double> >("mesonptBinning", pt2bins);
92 
95  histoPSet.add<edm::ParameterSetDescription>("hmglsPSet", lsPSet);
96 
97 }
T getParameter(std::string const &) const
MonitorElement * numerator
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
MEbinning ls_binning_
std::vector< double > mesonpt_variable_binning_
~HMesonGammaDQM() override
MEbinning eta_binning_
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
void setMETitle(ObjME &me, const std::string &titleX, const std::string &titleY)
static void fillHmgDescription(edm::ParameterSetDescription &histoPSet)
void initialise(const edm::ParameterSet &iConfig)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< double > gammapt_variable_binning_
void bookHistograms(DQMStore::IBooker &)
def ls(path, rec=False)
Definition: eostools.py:349
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
void fillHistograms(const reco::PhotonCollection &photons, std::vector< TLorentzVector > mesons, const int &ls, const bool passCond)
void bookME(DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, unsigned nbins, double xmin, double xmax)