CMS 3D CMS Logo

JetMonitor.h
Go to the documentation of this file.
1 #ifndef JETMETMONITOR_H
2 #define JETMETMONITOR_H
3 
4 #include <string>
5 #include <vector>
6 #include <map>
7 
16 
20 
22 
23 //DataFormats
26 
40 
42 
43 
44 
45 //
46 // class declaration
47 //
48 
49 class JetMonitor : public DQMEDAnalyzer
50 {
51 public:
52  struct MEbinning {
53  unsigned int nbins;
54  double xmin;
55  double xmax;
56  };
57 
58  struct JetME {
61  };
62 
63  JetMonitor( const edm::ParameterSet& );
64  ~JetMonitor() override;
65  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
68 
69 protected:
70 
71  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
72  void bookME(DQMStore::IBooker &, JetME& me, std::string& histname, std::string& histtitle, unsigned int nbins, double xmin, double xmax);
73  void bookME(DQMStore::IBooker &, JetME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX);
74  void bookME(DQMStore::IBooker &, JetME& me, std::string& histname, std::string& histtitle, int nbinsX, double xmin, double xmax, double ymin, double ymax);
75  void bookME(DQMStore::IBooker &, JetME& me, std::string& histname, std::string& histtitle, int nbinsX, double xmin, double xmax, int nbinsY, double ymin, double ymax);
76  void bookME(DQMStore::IBooker &, JetME& me, std::string& histname, std::string& histtitle, std::vector<double> binningX, std::vector<double> binningY);
77  void setMETitle(JetME& me, const std::string& titleX, const std::string& titleY);
78  void bookME(DQMStore::IBooker &, MonitorElement* me, std::string& histname, std::string& histtitle, int nbins, double xmin, double xmax);
79  void bookME(DQMStore::IBooker &, MonitorElement* me, std::string& histname, std::string& histtitle, int nbinsX, double xmin, double xmax,int nbinsY, double ymin, double ymax );
80 
81  void analyze(edm::Event const& iEvent, edm::EventSetup const& iSetup) override;
82  bool isBarrel(double eta);
83  bool isEndCapP(double eta);
84  bool isEndCapM(double eta);
85  bool isForward(double eta);
86  bool isHEP17(double eta, double phi);
87  bool isHEM17(double eta, double phi);
88  bool isHEP18(double eta, double phi); // -0.87< Phi < -1.22
89  //void FillME(std::vector<MonitorElement*> v_me,std::vector<double>v_pt, std::vector<double> v_phi); //Fill Histograms
90  //void AutoNullPtr(JetME* a_me,const int len_); //Fill Histograms
91  void bookMESub(DQMStore::IBooker &,JetME* a_me,const int len_,const std::string& h_Name ,const std::string& h_Title, const std::string& h_subOptName, std::string h_subOptTitle ); //Fill Histograms
92  void FillME(JetME* a_me,double pt_, double phi_, double eta_, int ls_, const std::string& denu); //Fill Histograms
93 
94 private:
97 
100 
106  //edm::InputTag jetSrc_; // test for Jet
108 
109  std::vector<double> jetpT_variable_binning_;
113 
114 
124 
127  // For Ratio plot
130 
131 
132  std::unique_ptr<GenericTriggerEventFlag> num_genTriggerEventFlag_;
133  std::unique_ptr<GenericTriggerEventFlag> den_genTriggerEventFlag_;
134 
135  int nmuons_;
136  double ptcut_;
139 
140  std::vector<double> v_jetpt;
141  std::vector<double> v_jeteta;
142  std::vector<double> v_jetphi;
143 
144  // Define Phi Bin //
145  double Jet_MAX_PHI = 3.2;
146  unsigned int Jet_N_PHI = 64;
148  Jet_N_PHI, -Jet_MAX_PHI, Jet_MAX_PHI
149  };
150  // Define Eta Bin //
151  double Jet_MAX_ETA = 5;
152  unsigned int Jet_N_ETA = 50;
154  Jet_N_ETA, -Jet_MAX_ETA, Jet_MAX_ETA
155  };
156 
157  // Define HEP17 for PHI
158  double Jet_MAX_PHI_HEP17 = -0.52;
159  double Jet_MIN_PHI_HEP17 = -0.87;
160  unsigned int N_PHI_HEP17 = 7;
162  N_PHI_HEP17, Jet_MIN_PHI_HEP17, Jet_MAX_PHI_HEP17
163  };
164 
165  // Define HEP18 for PHI
166  double Jet_MAX_PHI_HEP18 = -0.17;
167  double Jet_MIN_PHI_HEP18 = -0.52;
168  unsigned int N_PHI_HEP18 = 7;
170  N_PHI_HEP18, Jet_MIN_PHI_HEP18, Jet_MAX_PHI_HEP18
171  };
172  // Define HEP17 for ETA
173  double Jet_MAX_ETA_HEP17 = 3.0;
174  double Jet_MIN_ETA_HEP17 = 1.3;
175  unsigned int N_ETA_HEP17 = 9;
177  N_ETA_HEP17, Jet_MIN_ETA_HEP17, Jet_MAX_ETA_HEP17
178  };
179 
181  N_ETA_HEP17, -Jet_MAX_ETA_HEP17, -Jet_MIN_ETA_HEP17
182  };
183 
184 };
185 
186 #endif // JETMETMONITOR_H
unsigned int N_PHI_HEP18
Definition: JetMonitor.h:168
JetME jetHEM17_AbsEtaVsPhi_
Definition: JetMonitor.h:126
bool isBarrel(double eta)
Definition: JetMonitor.cc:326
JetME a_ME_HB[7]
Definition: JetMonitor.h:116
bool isHEP17(double eta, double phi)
For Hcal HEP17 Area.
Definition: JetMonitor.cc:352
unsigned int Jet_N_ETA
Definition: JetMonitor.h:152
JetME a_ME_HE_m[7]
Definition: JetMonitor.h:120
JetME jetHEP17_AbsEta_
Definition: JetMonitor.h:128
numerator
Definition: cuy.py:483
MEbinning eta_binning_hem17_
Definition: JetMonitor.h:180
JetME a_ME_HEM17[7]
Definition: JetMonitor.h:121
MEbinning phi_binning_hep17_
Definition: JetMonitor.h:161
MEbinning ls_binning_
Definition: JetMonitor.h:112
edm::EDGetTokenT< reco::PFMETCollection > metToken_
Definition: JetMonitor.h:101
JetMonitor(const edm::ParameterSet &)
Definition: JetMonitor.cc:17
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:38
JetME jetHEP17_AbsEtaVsPhi_
Definition: JetMonitor.h:125
double Jet_MIN_PHI_HEP17
Definition: JetMonitor.h:159
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:268
std::string folderName_
Definition: JetMonitor.h:98
JetME a_ME_HE_p[7]
Definition: JetMonitor.h:119
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
Definition: JetMonitor.h:104
edm::EDGetTokenT< reco::PFJetCollection > pfjetToken_
Definition: JetMonitor.h:102
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
double Jet_MAX_ETA
Definition: JetMonitor.h:151
void bookME(DQMStore::IBooker &, JetME &me, std::string &histname, std::string &histtitle, unsigned int nbins, double xmin, double xmax)
Definition: JetMonitor.cc:63
JetME a_ME_HEP18[7]
Definition: JetMonitor.h:123
bool isCaloJetTrig
Definition: JetMonitor.h:138
edm::EDGetTokenT< reco::CaloJetCollection > calojetToken_
Definition: JetMonitor.h:103
MEbinning jetpT_binning
Definition: JetMonitor.h:110
double Jet_MAX_PHI
Definition: JetMonitor.h:145
MEbinning eta_binning_hep17_
Definition: JetMonitor.h:176
MEbinning phi_binning_hep18_
Definition: JetMonitor.h:169
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< reco::MuonCollection > muoToken_
Definition: JetMonitor.h:105
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: JetMonitor.cc:273
MEbinning jet_phi_binning_
Definition: JetMonitor.h:147
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
Definition: JetMonitor.h:133
double Jet_MIN_PHI_HEP18
Definition: JetMonitor.h:167
bool isEndCapM(double eta)
Definition: JetMonitor.cc:333
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
Definition: JetMonitor.cc:151
std::vector< double > jetpT_variable_binning_
Definition: JetMonitor.h:109
JetME a_ME_HF[7]
Definition: JetMonitor.h:118
JetME a_ME_HEP17[7]
Definition: JetMonitor.h:122
double Jet_MAX_PHI_HEP17
Definition: JetMonitor.h:158
bool isHEM17(double eta, double phi)
For Hcal HEM17 Area.
Definition: JetMonitor.cc:360
MEbinning jetptThr_binning_
Definition: JetMonitor.h:111
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: JetMonitor.cc:99
JetME jetHEM17_AbsEta_
Definition: JetMonitor.h:129
edm::EDGetTokenT< edm::View< reco::Jet > > jetSrc_
Definition: JetMonitor.h:107
double Jet_MAX_PHI_HEP18
Definition: JetMonitor.h:166
denominator
Definition: cuy.py:484
double Jet_MIN_ETA_HEP17
Definition: JetMonitor.h:174
void FillME(JetME *a_me, double pt_, double phi_, double eta_, int ls_, const std::string &denu)
Definition: JetMonitor.cc:382
JetME a_ME_HE[7]
Definition: JetMonitor.h:117
std::vector< double > v_jetpt
Definition: JetMonitor.h:140
unsigned int N_PHI_HEP17
Definition: JetMonitor.h:160
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: JetMonitor.h:132
double Jet_MAX_ETA_HEP17
Definition: JetMonitor.h:173
bool isPFJetTrig
Definition: JetMonitor.h:137
unsigned int Jet_N_PHI
Definition: JetMonitor.h:146
JetME a_ME[7]
Definition: JetMonitor.h:115
~JetMonitor() override
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: JetMonitor.cc:261
std::vector< double > v_jeteta
Definition: JetMonitor.h:141
void bookMESub(DQMStore::IBooker &, JetME *a_me, const int len_, const std::string &h_Name, const std::string &h_Title, const std::string &h_subOptName, std::string h_subOptTitle)
Definition: JetMonitor.cc:414
bool isForward(double eta)
For Hcal Forward Plus Area.
Definition: JetMonitor.cc:346
std::vector< double > v_jetphi
Definition: JetMonitor.h:142
unsigned int N_ETA_HEP17
Definition: JetMonitor.h:175
MEbinning jet_eta_binning_
Definition: JetMonitor.h:153
static MEbinning getHistoLSPSet(const edm::ParameterSet &pset)
Definition: JetMonitor.cc:47
void setMETitle(JetME &me, const std::string &titleX, const std::string &titleY)
Definition: JetMonitor.cc:56
Definition: Run.h:42
bool isHEP18(double eta, double phi)
For Hcal HEP18 Area.
Definition: JetMonitor.cc:367
bool isEndCapP(double eta)
For Hcal Endcap Plus Area.
Definition: JetMonitor.cc:339
unsigned int nbins
Definition: JetMonitor.h:53
std::string histoSuffix_
Definition: JetMonitor.h:99
double ptcut_
Definition: JetMonitor.h:136