CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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();
63  gammaptME_.denominator->Fill(photons[0].pt());
65  gammaetaVsLS_.denominator->Fill(ls, eta1);
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();
77  gammaptME_.numerator->Fill(photons[0].pt());
78  gammaetaME_.numerator->Fill(eta1);
79  gammaetaVsLS_.numerator->Fill(ls, eta1);
80  }
81  if (!mesons.empty()) {
82  double eta2 = mesons[0].Eta();
83  mesonptME_.numerator->Fill(mesons[0].Pt());
84  mesonetaME_.numerator->Fill(eta2);
85  }
86  }
87 }
88 
91  fillHistoPSetDescription(hmgetaPSet);
92  histoPSet.add<edm::ParameterSetDescription>("hmgetaPSet", hmgetaPSet);
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 }
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_
def ls
Definition: eostools.py:349
~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 &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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)