CMS 3D CMS Logo

RazorMonitor.h
Go to the documentation of this file.
1 // -----------------------------
2 //
3 // Offline DQM for razor triggers. The razor inclusive analysis measures trigger efficiency
4 // in SingleElectron events (orthogonal to analysis), as a 2D function of the razor variables
5 // M_R and R^2. Also monitor dPhi_R, used offline for QCD and/or detector-related MET tail
6 // rejection.
7 // Based on DQMOffline/Trigger/plugins/METMonitor.*
8 //
9 // -----------------------------
10 #ifndef DQMOFFLINE_TRIGGER_RAZORMONITOR_H
11 #define DQMOFFLINE_TRIGGER_RAZORMONITOR_H
12 
13 #include <string>
14 #include <vector>
15 #include <map>
16 
25 
29 
31 
32 //DataFormats
35 
40 
41 //Hemispheres
45 #include "TLorentzVector.h"
46 
48 
49 struct RazorME {
52 };
53 //
54 // class declaration
55 //
56 
57 class RazorMonitor : public DQMEDAnalyzer {
58 public:
60  ~RazorMonitor() override;
61  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
62 
63  static double CalcMR(const math::XYZTLorentzVector& ja, const math::XYZTLorentzVector& jb);
64  static double CalcR(double MR,
65  const math::XYZTLorentzVector& ja,
66  const math::XYZTLorentzVector& jb,
67  const edm::Handle<std::vector<reco::PFMET> >& met);
68 
69 protected:
70  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
71  void bookME(DQMStore::IBooker&,
72  RazorME& me,
73  const std::string& histname,
74  const std::string& histtitle,
75  int nbins,
76  double xmin,
77  double xmax);
78  void bookME(DQMStore::IBooker&,
79  RazorME& me,
80  const std::string& histname,
81  const std::string& histtitle,
82  const std::vector<double>& binningX);
83  void bookME(DQMStore::IBooker&,
84  RazorME& me,
85  const std::string& histname,
86  const std::string& histtitle,
87  int nbinsX,
88  double xmin,
89  double xmax,
90  double ymin,
91  double ymax);
92  void bookME(DQMStore::IBooker&,
93  RazorME& me,
94  const std::string& histname,
95  const std::string& histtitle,
96  int nbinsX,
97  double xmin,
98  double xmax,
99  int nbinsY,
100  double ymin,
101  double ymax);
102  void bookME(DQMStore::IBooker&,
103  RazorME& me,
104  const std::string& histname,
105  const std::string& histtitle,
106  const std::vector<double>& binningX,
107  const std::vector<double>& binningY);
108  void setMETitle(RazorME& me, const std::string& titleX, const std::string& titleY);
109 
110  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
111 
112 private:
115 
119 
120  std::vector<double> rsq_binning_;
121  std::vector<double> mr_binning_;
122  std::vector<double> dphiR_binning_;
123 
128 
129  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
130  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
131 
134  unsigned int njets_;
135  float rsqCut_;
136  float mrCut_;
137 };
138 
139 #endif // DQMOFFLINE_TRIGGER_RAZORMONITOR_H
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: RazorMonitor.h:117
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: RazorMonitor.h:116
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: RazorMonitor.h:129
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: RazorMonitor.h:132
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
Definition: RazorMonitor.h:118
unsigned int njets_
Definition: RazorMonitor.h:134
int iEvent
Definition: GenABIO.cc:224
std::string histoSuffix_
Definition: RazorMonitor.h:114
std::vector< double > mr_binning_
Definition: RazorMonitor.h:121
std::vector< double > dphiR_binning_
Definition: RazorMonitor.h:122
RazorME Rsq_ME_
Definition: RazorMonitor.h:125
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: RazorMonitor.h:133
RazorME dPhiR_ME_
Definition: RazorMonitor.h:126
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
std::vector< double > rsq_binning_
Definition: RazorMonitor.h:120
RazorME MR_ME_
Definition: RazorMonitor.h:124
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: RazorMonitor.h:130
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
dqm::reco::MonitorElement * numerator
Definition: RazorMonitor.h:50
RazorME MRVsRsq_ME_
Definition: RazorMonitor.h:127
std::string folderName_
Definition: RazorMonitor.h:113
Definition: Run.h:45
dqm::reco::MonitorElement * denominator
Definition: RazorMonitor.h:51