CMS 3D CMS Logo

HMesonGammaDQM.cc
Go to the documentation of this file.
3 
5 
7 
10  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("gammaptBinning");
12  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<std::vector<double> >("mesonptBinning");
13 
14  eta_binning_ =
15  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("hmgetaPSet"));
16  ls_binning_ =
17  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("hmglsPSet"));
18 }
19 
21  std::string histname, histtitle;
22 
23  histname = "gammapt";
24  histtitle = "Gamma pT";
25  bookME(ibooker, gammaptME_, histname, histtitle, gammapt_variable_binning_);
26  setMETitle(gammaptME_, "Gamma p_{T} [GeV]", "events / [GeV]");
27 
28  histname = "mesonpt";
29  histtitle = "Meson pT";
30  bookME(ibooker, mesonptME_, histname, histtitle, mesonpt_variable_binning_);
31  setMETitle(mesonptME_, "Meson p_{T} [GeV]", "events / [GeV]");
32 
33  histname = "gammaeta";
34  histtitle = "Gamma eta";
35  bookME(ibooker, gammaetaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
36  setMETitle(gammaetaME_, "Gamma #eta", "events");
37 
38  histname = "mesoneta";
39  histtitle = "Meson eta";
40  bookME(ibooker, mesonetaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
41  setMETitle(mesonetaME_, "Meson #eta", "events");
42 
43  histname = "gammaetaVsLS";
44  histtitle = "Gamma eta vs LS";
45  bookME(ibooker,
47  histname,
48  histtitle,
54  setMETitle(gammaetaVsLS_, "LS", "Gamma #eta");
55 }
56 
58  std::vector<TLorentzVector> mesons,
59  const int& ls,
60  const bool passCond) {
61  // filling histograms (denominator)
62  if (!photons.empty()) {
63  double eta1 = photons[0].eta();
64  gammaptME_.denominator->Fill(photons[0].pt());
66  gammaetaVsLS_.denominator->Fill(ls, eta1);
67  }
68  if (!mesons.empty()) {
69  double eta2 = mesons[0].Eta();
70  mesonptME_.denominator->Fill(mesons[0].Pt());
72  }
73 
74  // applying selection for numerator
75  if (passCond) {
76  if (!photons.empty()) {
77  double eta1 = photons[0].eta();
78  gammaptME_.numerator->Fill(photons[0].pt());
79  gammaetaME_.numerator->Fill(eta1);
80  gammaetaVsLS_.numerator->Fill(ls, eta1);
81  }
82  if (!mesons.empty()) {
83  double eta2 = mesons[0].Eta();
84  mesonptME_.numerator->Fill(mesons[0].Pt());
85  mesonetaME_.numerator->Fill(eta2);
86  }
87  }
88 }
89 
92  fillHistoPSetDescription(hmgetaPSet);
93  histoPSet.add<edm::ParameterSetDescription>("hmgetaPSet", hmgetaPSet);
94 
95  std::vector<double> pt1bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
96  180., 210., 240., 270., 300., 330., 360., 400., 450., 500., 750., 1000., 1500.};
97  histoPSet.add<std::vector<double> >("gammaptBinning", pt1bins);
98 
99  std::vector<double> pt2bins = {0., 20., 40., 45., 50., 55., 60., 65., 70., 80., 90., 100.,
100  110., 120., 150., 180., 210., 240., 270., 300., 350., 400., 1000.};
101  histoPSet.add<std::vector<double> >("mesonptBinning", pt2bins);
102 
105  histoPSet.add<edm::ParameterSetDescription>("hmglsPSet", lsPSet);
106 }
T getParameter(std::string const &) const
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 Fill(long long x)
void initialise(const edm::ParameterSet &iConfig)
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MonitorElement * denominator
MonitorElement * numerator
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)