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 {
59 public:
61  ~RazorMonitor() override;
62  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
63 
64  static double CalcMR(const math::XYZTLorentzVector& ja, const math::XYZTLorentzVector& jb);
65  static double CalcR(double MR, const math::XYZTLorentzVector& ja, const math::XYZTLorentzVector& jb, const edm::Handle<std::vector<reco::PFMET> >& met);
66 
67 protected:
68 
69  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
70  void bookME(DQMStore::IBooker &, RazorME& me, const std::string& histname, const std::string& histtitle, int nbins, double xmin, double xmax);
71  void bookME(DQMStore::IBooker &, RazorME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX);
72  void bookME(DQMStore::IBooker &, RazorME& me, const std::string& histname, const std::string& histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax);
73  void bookME(DQMStore::IBooker &, RazorME& me, const std::string& histname, const std::string& histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax);
74  void bookME(DQMStore::IBooker &, RazorME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX, const std::vector<double>& binningY);
75  void setMETitle(RazorME& me, const std::string& titleX, const std::string& titleY);
76 
77  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
78 
79 private:
80 
83 
87 
88  std::vector<double> rsq_binning_;
89  std::vector<double> mr_binning_;
90  std::vector<double> dphiR_binning_;
91 
96 
97  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
98  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
99 
102  unsigned int njets_;
103  float rsqCut_;
104  float mrCut_;
105 
106 };
107 
108 #endif // DQMOFFLINE_TRIGGER_RAZORMONITOR_H
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: RazorMonitor.h:85
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: RazorMonitor.h:84
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: RazorMonitor.h:97
def analyze(function, filename, filter=None)
Definition: Profiling.py:11
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
void bookHistograms(fwlite::EventContainer &eventCont)
MonitorElement * numerator
Definition: RazorMonitor.h:50
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
edm::EDGetTokenT< std::vector< math::XYZTLorentzVector > > theHemispheres_
Definition: RazorMonitor.h:86
unsigned int njets_
Definition: RazorMonitor.h:102
int iEvent
Definition: GenABIO.cc:230
std::string histoSuffix_
Definition: RazorMonitor.h:82
std::vector< double > mr_binning_
Definition: RazorMonitor.h:89
std::vector< double > dphiR_binning_
Definition: RazorMonitor.h:90
RazorME Rsq_ME_
Definition: RazorMonitor.h:93
RazorME dPhiR_ME_
Definition: RazorMonitor.h:94
double CalcMR(const LorentzVector &ja, const LorentzVector &jb)
std::vector< double > rsq_binning_
Definition: RazorMonitor.h:88
met
===> hadronic RAZOR
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: RazorMonitor.h:100
RazorME MR_ME_
Definition: RazorMonitor.h:92
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: RazorMonitor.h:98
MonitorElement * denominator
Definition: RazorMonitor.h:51
RazorME MRVsRsq_ME_
Definition: RazorMonitor.h:95
std::string folderName_
Definition: RazorMonitor.h:81
Definition: Run.h:42
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: RazorMonitor.h:101