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  eta_binning_ =
14  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("hmgetaPSet"));
15  ls_binning_ =
16  getHistoPSet(iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("hmglsPSet"));
17 }
18 
20  std::string histname, histtitle;
21 
22  histname = "gammapt";
23  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";
28  histtitle = "Meson pT";
29  bookME(ibooker, mesonptME_, histname, histtitle, mesonpt_variable_binning_);
30  setMETitle(mesonptME_, "Meson p_{T} [GeV]", "events / [GeV]");
31 
32  histname = "gammaeta";
33  histtitle = "Gamma eta";
34  bookME(ibooker, gammaetaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
35  setMETitle(gammaetaME_, "Gamma #eta", "events");
36 
37  histname = "mesoneta";
38  histtitle = "Meson eta";
39  bookME(ibooker, mesonetaME_, histname, histtitle, eta_binning_.nbins, eta_binning_.xmin, eta_binning_.xmax);
40  setMETitle(mesonetaME_, "Meson #eta", "events");
41 
42  histname = "gammaetaVsLS";
43  histtitle = "Gamma eta vs LS";
44  bookME(ibooker,
46  histname,
47  histtitle,
53  setMETitle(gammaetaVsLS_, "LS", "Gamma #eta");
54 }
55 
57  const std::vector<TLorentzVector>& mesons,
58  const int ls,
59  const bool passCond) {
60  // filling histograms (denominator)
61  if (!photons.empty()) {
62  double eta1 = photons[0].eta();
66  }
67  if (!mesons.empty()) {
68  double eta2 = mesons[0].Eta();
69  mesonptME_.denominator->Fill(mesons[0].Pt());
71  }
72 
73  // applying selection for numerator
74  if (passCond) {
75  if (!photons.empty()) {
76  double eta1 = photons[0].eta();
80  }
81  if (!mesons.empty()) {
82  double eta2 = mesons[0].Eta();
83  mesonptME_.numerator->Fill(mesons[0].Pt());
85  }
86  }
87 }
88 
93 
94  std::vector<double> pt1bins = {0., 20., 40., 60., 80., 90., 100., 110., 120., 130., 140., 150., 160.,
95  180., 210., 240., 270., 300., 330., 360., 400., 450., 500., 750., 1000., 1500.};
96  histoPSet.add<std::vector<double> >("gammaptBinning", pt1bins);
97 
98  std::vector<double> pt2bins = {0., 20., 40., 45., 50., 55., 60., 65., 70., 80., 90., 100.,
99  110., 120., 150., 180., 210., 240., 270., 300., 350., 400., 1000.};
100  histoPSet.add<std::vector<double> >("mesonptBinning", pt2bins);
101 
104  histoPSet.add<edm::ParameterSetDescription>("hmglsPSet", lsPSet);
105 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
MEbinning ls_binning_
void fillHistograms(const reco::PhotonCollection &photons, const std::vector< TLorentzVector > &mesons, const int ls, const bool passCond)
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
std::vector< double > gammapt_variable_binning_
void bookHistograms(DQMStore::IBooker &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
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)