CMS 3D CMS Logo

MuonMonitor.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Trigger_MuonMonitor_h
2 #define DQMOffline_Trigger_MuonMonitor_h
3 
4 #include <string>
5 #include <vector>
6 #include <map>
7 
16 
20 
22 
23 //DataFormats
26 
41 
43 
44 struct MEbinning {
45  unsigned int nbins;
46  double xmin;
47  double xmax;
48 };
49 
50 struct MuonME {
53 };
54 //
55 // class declaration
56 //
57 
58 class MuonMonitor : public DQMEDAnalyzer
59 {
60 public:
62  ~MuonMonitor() override;
63  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
64  static void fillHistoPSetDescription(edm::ParameterSetDescription & pset);
65  static void fillHistoLSPSetDescription(edm::ParameterSetDescription & pset);
66 
67 protected:
68 
69  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
70  void bookME(DQMStore::IBooker &, MuonME& me, const std::string& histname, const std::string& histtitle, int nbins, double xmin, double xmax);
71  void bookME(DQMStore::IBooker &, MuonME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX);
72  void bookME(DQMStore::IBooker &, MuonME& me, const std::string& histname, const std::string& histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax);
73  void bookME(DQMStore::IBooker &, MuonME& 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 &, MuonME& me, const std::string& histname, const std::string& histtitle, const std::vector<double>& binningX, const std::vector<double>& binningY);
75  void setTitle(MuonME& 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  static MEbinning getHistoPSet (edm::ParameterSet const& pset);
81  static MEbinning getHistoLSPSet (edm::ParameterSet const& pset);
82 
85 
90 
91  static constexpr double MAX_PHI = 3.2;
92  static constexpr int N_PHI = 64;
93  const MEbinning phi_binning_{
94  N_PHI, -MAX_PHI, MAX_PHI
95  };
96 
97  static constexpr double MAX_dxy = 2.5;
98  static constexpr int N_dxy = 50;
99  const MEbinning dxy_binning_{
100  N_dxy, -MAX_dxy, MAX_dxy
101  };
102 
103  static constexpr double MAX_ETA = 2.4;
104  static constexpr int N_ETA = 68;
105  const MEbinning eta_binning_{
106  N_ETA, -MAX_ETA, MAX_ETA
107  };
108 
109  std::vector<double> muon_variable_binning_;
110  std::vector<double> muoneta_variable_binning_;
111  MEbinning muon_binning_;
112  MEbinning ls_binning_;
113  std::vector<double> muPt_variable_binning_2D_;
114  std::vector<double> elePt_variable_binning_2D_;
115  std::vector<double> muEta_variable_binning_2D_;
116  std::vector<double> eleEta_variable_binning_2D_;
117 
131 
132  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
133  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
134 
138  unsigned int njets_;
139  unsigned int nmuons_;
140  unsigned int nelectrons_;
141 };
142 
143 #endif // DQMOffline_Trigger_MuonMonitor_h
std::vector< double > muPt_variable_binning_2D_
Definition: MuonMonitor.h:113
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: MuonMonitor.h:86
MuonME elePt_muPt_
Definition: MuonMonitor.h:130
StringCutObjectSelector< reco::MET, true > metSelection_
Definition: MuonMonitor.h:135
MuonME muonEtaPhiME_
Definition: MuonMonitor.h:123
unsigned int nelectrons_
Definition: MuonMonitor.h:140
MuonME muonEtaME_variableBinning_
Definition: MuonMonitor.h:126
MuonME muonPhiME_
Definition: MuonMonitor.h:120
MuonME muonME_
Definition: MuonMonitor.h:118
std::vector< double > muoneta_variable_binning_
Definition: MuonMonitor.h:110
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: MuonMonitor.h:132
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
Definition: MuonMonitor.h:88
MonitorElement * denominator
Definition: MuonMonitor.h:52
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
unsigned int njets_
Definition: MuonMonitor.h:138
MuonME muondz_
Definition: MuonMonitor.h:125
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< double > muEta_variable_binning_2D_
Definition: MuonMonitor.h:115
MEbinning ls_binning_
Definition: MuonMonitor.h:112
std::string histoSuffix_
Definition: MuonMonitor.h:84
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
Definition: MuonMonitor.h:137
MuonME muonVsLS_
Definition: MuonMonitor.h:122
MuonME eleEta_muEta_
Definition: MuonMonitor.h:129
MEbinning muon_binning_
Definition: MuonMonitor.h:111
edm::EDGetTokenT< edm::View< reco::GsfElectron > > eleToken_
Definition: MuonMonitor.h:89
int iEvent
Definition: GenABIO.cc:224
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: MuonMonitor.h:133
MuonME muondxy_
Definition: MuonMonitor.h:124
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: MuonMonitor.h:87
unsigned int nbins
Definition: MuonMonitor.h:45
std::vector< double > elePt_variable_binning_2D_
Definition: MuonMonitor.h:114
std::vector< double > muon_variable_binning_
Definition: MuonMonitor.h:109
unsigned int nmuons_
Definition: MuonMonitor.h:139
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
MuonME muonME_variableBinning_
Definition: MuonMonitor.h:121
MuonME muonEtaME_
Definition: MuonMonitor.h:119
MuonME eleME_variableBinning_
Definition: MuonMonitor.h:127
StringCutObjectSelector< reco::Muon, true > muonSelection_
Definition: MuonMonitor.h:136
std::string folderName_
Definition: MuonMonitor.h:83
MonitorElement * numerator
Definition: MuonMonitor.h:51
std::vector< double > eleEta_variable_binning_2D_
Definition: MuonMonitor.h:116
#define constexpr
Definition: Run.h:45
MuonME eleEtaME_
Definition: MuonMonitor.h:128