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 
102 
103  std::vector<double> met_variable_binning_;
106 
113 
114  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
115  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
116 
121 
122  unsigned njets_;
123  unsigned nelectrons_;
124  unsigned nmuons_;
125 
126  static constexpr double MAX_PHI = 3.2;
127  static constexpr int N_PHI = 64;
129  N_PHI, -MAX_PHI, MAX_PHI
130  };
131 
132  std::vector<bool> warningPrinted4token_;
133 
134 };
135 
136 #endif // METMONITOR_H
void setMETitle(METME &me, const std::string &titleX, const std::string &titleY)
Definition: METMonitor.cc:68
unsigned nmuons_
Definition: METMonitor.h:124
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: METMonitor.h:115
edm::InputTag vtxInputTag_
Definition: METMonitor.h:95
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: METMonitor.cc:50
std::string histoSuffix_
Definition: METMonitor.h:89
static int N_PHI
Definition: METMonitor.h:127
edm::InputTag muoInputTag_
Definition: METMonitor.h:94
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: METMonitor.h:101
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:120
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: METMonitor.h:114
edm::InputTag eleInputTag_
Definition: METMonitor.h:93
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: METMonitor.cc:59
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: METMonitor.h:119
METME metME_variableBinning_
Definition: METMonitor.h:108
~METMonitor() override
#define constexpr
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: METMonitor.cc:288
std::string folderName_
Definition: METMonitor.h:88
unsigned njets_
Definition: METMonitor.h:122
StringCutObjectSelector< reco::PFJet, true > jetSelection_
Definition: METMonitor.h:118
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: METMonitor.cc:295
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: METMonitor.h:99
MEbinning met_binning_
Definition: METMonitor.h:104
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
Definition: METMonitor.h:98
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: METMonitor.h:97
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: METMonitor.h:100
METME deltaphij1j2ME_
Definition: METMonitor.h:112
void bookME(DQMStore::IBooker &, METME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
Definition: METMonitor.cc:77
static MEbinning phi_binning_
Definition: METMonitor.h:128
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Definition: METMonitor.cc:157
unsigned nelectrons_
Definition: METMonitor.h:123
std::vector< double > met_variable_binning_
Definition: METMonitor.h:103
METME metPhiME_
Definition: METMonitor.h:110
METME metVsLS_
Definition: METMonitor.h:109
edm::InputTag metInputTag_
Definition: METMonitor.h:91
MEbinning ls_binning_
Definition: METMonitor.h:105
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: METMonitor.h:117
static double MAX_PHI
Definition: METMonitor.h:126
edm::InputTag jetInputTag_
Definition: METMonitor.h:92
METMonitor(const edm::ParameterSet &)
Definition: METMonitor.cc:15
METME deltaphimetj1ME_
Definition: METMonitor.h:111
std::vector< bool > warningPrinted4token_
Definition: METMonitor.h:132
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: METMonitor.cc:113
METME metME_
Definition: METMonitor.h:107
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: METMonitor.cc:302
Definition: Run.h:44