CMS 3D CMS Logo

METMonitor.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Trigger_METMonitor_h
2 #define DQMOffline_Trigger_METMonitor_h
3 
4 #include <string>
5 #include <vector>
6 #include <map>
7 
16 
20 
22 
23 //DataFormats
26 
39 
42 
44 
45 //
46 // class declaration
47 //
48 
49 class METMonitor : public DQMEDAnalyzer
50 {
51  public:
52 
53  struct MEbinning {
54  unsigned nbins;
55  double xmin;
56  double xmax;
57  };
58 
59  struct METME {
62  };
63 
64 
65 public:
66  METMonitor( const edm::ParameterSet& );
67  ~METMonitor() override;
68  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
71 
72 protected:
73 
74  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
75  void bookME(DQMStore::IBooker &, METME& me, const std::string& histname, const std::string& histtitle, int nbins, double xmin, double xmax);
76  void bookME(DQMStore::IBooker &, METME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX);
77  void bookME(DQMStore::IBooker &, METME& me, const std::string& histname, const std::string& histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax);
78  void bookME(DQMStore::IBooker &, METME& me, const std::string& histname, const std::string& histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax);
79  void bookME(DQMStore::IBooker &, METME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX, const std::vector<double>& binningY);
80  void setMETitle(METME& me, const std::string& titleX, const std::string& titleY);
81 
82  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
83 
84 private:
87 
90 
96 
97  std::vector<double> met_variable_binning_;
100 
107 
108  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
109  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
110 
115 
116  unsigned njets_;
117  unsigned nelectrons_;
118  unsigned nmuons_;
119 
120  static constexpr double MAX_PHI = 3.2;
121  static constexpr int N_PHI = 64;
123  N_PHI, -MAX_PHI, MAX_PHI
124  };
125 
126 
127 };
128 
129 #endif // METMONITOR_H
void setMETitle(METME &me, const std::string &titleX, const std::string &titleY)
Definition: METMonitor.cc:57
unsigned nmuons_
Definition: METMonitor.h:118
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: METMonitor.h:109
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: METMonitor.cc:39
std::string histoSuffix_
Definition: METMonitor.h:89
static int N_PHI
Definition: METMonitor.h:121
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: METMonitor.h:95
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
StringCutObjectSelector< reco::Muon, true > muoSelection_
Definition: METMonitor.h:114
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: METMonitor.h:108
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: METMonitor.cc:48
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: METMonitor.h:113
METME metME_variableBinning_
Definition: METMonitor.h:102
~METMonitor() override
#define constexpr
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: METMonitor.cc:223
std::string folderName_
Definition: METMonitor.h:88
unsigned njets_
Definition: METMonitor.h:116
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: METMonitor.h:112
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: METMonitor.cc:230
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: METMonitor.h:93
MEbinning met_binning_
Definition: METMonitor.h:98
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: METMonitor.h:92
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: METMonitor.h:91
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: METMonitor.h:94
METME deltaphij1j2ME_
Definition: METMonitor.h:106
void bookME(DQMStore::IBooker &, METME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
Definition: METMonitor.cc:66
static MEbinning phi_binning_
Definition: METMonitor.h:122
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Definition: METMonitor.cc:146
unsigned nelectrons_
Definition: METMonitor.h:117
std::vector< double > met_variable_binning_
Definition: METMonitor.h:97
METME metPhiME_
Definition: METMonitor.h:104
METME metVsLS_
Definition: METMonitor.h:103
MEbinning ls_binning_
Definition: METMonitor.h:99
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: METMonitor.h:111
static double MAX_PHI
Definition: METMonitor.h:120
METMonitor(const edm::ParameterSet &)
Definition: METMonitor.cc:15
METME deltaphimetj1ME_
Definition: METMonitor.h:105
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: METMonitor.cc:102
METME metME_
Definition: METMonitor.h:101
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: METMonitor.cc:237
Definition: Run.h:43