CMS 3D CMS Logo

PhotonMonitor.h
Go to the documentation of this file.
1 #ifndef DQMOFFLINE_TRIGGER_PHOTON_H
2 #define DQMOFFLINE_TRIGGER_PHOTON_H
3 
4 #include <string>
5 #include <vector>
6 
15 
19 
21 
22 //DataFormats
25 
38 
40 
41 struct MEbinning {
42  unsigned int nbins;
43  double xmin;
44  double xmax;
45 };
46 
47 struct PhotonME {
50 };
51 //
52 // class declaration
53 //
54 
55 class PhotonMonitor : public DQMEDAnalyzer {
56 public:
58  ~PhotonMonitor() override;
59  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
60  static void fillHistoPSetDescription(edm::ParameterSetDescription& pset);
61  static void fillHistoLSPSetDescription(edm::ParameterSetDescription& pset);
62 
63 protected:
64  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
65  void bookME(DQMStore::IBooker&,
66  PhotonME& me,
67  const std::string& histname,
68  const std::string& histtitle,
69  unsigned int nbins,
70  double xmin,
71  double xmax);
72  void bookME(DQMStore::IBooker&,
73  PhotonME& me,
74  const std::string& histname,
75  const std::string& histtitle,
76  const std::vector<double>& binningX);
77  void bookME(DQMStore::IBooker&,
78  PhotonME& me,
79  const std::string& histname,
80  const std::string& histtitle,
81  unsigned int nbinsX,
82  double xmin,
83  double xmax,
84  double ymin,
85  double ymax);
86  void bookME(DQMStore::IBooker&,
87  PhotonME& me,
88  const std::string& histname,
89  const std::string& histtitle,
90  unsigned int nbinsX,
91  double xmin,
92  double xmax,
93  unsigned int nbinsY,
94  double ymin,
95  double ymax);
96  void bookME(DQMStore::IBooker&,
97  PhotonME& me,
98  const std::string& histname,
99  const std::string& histtitle,
100  const std::vector<double>& binningX,
101  const std::vector<double>& binningY);
102  void setTitle(PhotonME& me, const std::string& titleX, const std::string& titleY);
103 
104  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
105 
106 private:
107  static MEbinning getHistoPSet(edm::ParameterSet const& pset);
108  static MEbinning getHistoLSPSet(edm::ParameterSet const& pset);
109 
112 
117 
118  std::vector<double> photon_variable_binning_;
119  std::vector<double> diphoton_mass_binning_;
120 
121  MEbinning photon_binning_;
122  MEbinning ls_binning_;
123 
132 
141 
142  double MAX_PHI1 = 3.2;
143  unsigned int N_PHI1 = 64;
144  const MEbinning phi_binning_1{N_PHI1, -MAX_PHI1, MAX_PHI1};
145 
146  double MAX_ETA = 1.4442;
147  unsigned int N_ETA = 34;
148  const MEbinning eta_binning_{N_ETA, -MAX_ETA, MAX_ETA};
149 
150  double MAX_r9 = 1;
151  double MIN_r9 = 0;
152  unsigned int N_r9 = 50;
153  const MEbinning r9_binning_{N_r9, MIN_r9, MAX_r9};
154 
155  double MAX_hoe = 0.02;
156  double MIN_hoe = 0;
157  const MEbinning hoe_binning_{N_r9, MIN_hoe, MAX_hoe};
158 
159  // GenericTriggerEventFlag* num_genTriggerEventFlag_;
160  //GenericTriggerEventFlag* den_genTriggerEventFlag_;
161 
162  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
163  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
164 
169  unsigned int njets_;
170  unsigned int nphotons_;
171  unsigned int nelectrons_;
172 };
173 
174 #endif // PhotonMonitor_H
dqm::reco::MonitorElement * numerator
Definition: PhotonMonitor.h:48
unsigned int nelectrons_
StringCutObjectSelector< reco::Photon, true > photonSelection_
PhotonME photonEtaPhiME_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
PhotonME subphotonME_variableBinning_
MEbinning ls_binning_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
PhotonME photonVsLS_
PhotonME subphotonPhiME_
PhotonME photonME_variableBinning_
PhotonME photonr9ME_
MEbinning photon_binning_
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
dqm::reco::MonitorElement * denominator
Definition: PhotonMonitor.h:49
StringCutObjectSelector< reco::MET, true > metSelection_
int iEvent
Definition: GenABIO.cc:224
PhotonME diphotonMassME_
std::string folderName_
edm::EDGetTokenT< reco::PhotonCollection > photonToken_
PhotonME photonHoverEME_
PhotonME photonPhiME_
std::vector< double > diphoton_mass_binning_
edm::EDGetTokenT< reco::PFMETCollection > metToken_
PhotonME subphotonHoverEME_
PhotonME subphotonME_
PhotonME photonEtaME_
PhotonME subphotonEtaME_
unsigned int nphotons_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
PhotonME subphotonr9ME_
PhotonME subphotonEtaPhiME_
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
unsigned int njets_
PhotonME photonME_
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
std::vector< double > photon_variable_binning_
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::string histoSuffix_
Definition: Run.h:45