CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
METAnalyzer.h
Go to the documentation of this file.
1 #ifndef METAnalyzer_H
2 #define METAnalyzer_H
3 
19 #include <memory>
20 #include <fstream>
21 #include "TMath.h"
31 //
33 //
42 
44 
48 
58 
65 
68 
75 
76 #include <map>
77 #include <string>
78 
79 
80 
82  public:
83 
86 
88  virtual ~METAnalyzer();
89 
91 // void beginJob(void);
92  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
93 
94  // Book MonitorElements
95  //void bookMESet(std::string);
96  //void bookMonitorElement(std::string, bool);
97 
99  void analyze(const edm::Event&, const edm::EventSetup&);
100 
102  void dqmBeginRun(const edm::Run&, const edm::EventSetup&);
103 
105  void endRun(const edm::Run& iRun, const edm::EventSetup& iSetup);
106  // void endRun(const edm::Run& iRun, const edm::EventSetup& iSetup);
107  // Fill MonitorElements
108  void fillMESet(const edm::Event&, std::string, const reco::MET&, const reco::PFMET&, const reco::CaloMET&,std::map<std::string,MonitorElement*>&);
109  void fillMonitorElement(const edm::Event&, std::string, std::string, const reco::MET&, const reco::PFMET&, const reco::CaloMET& ,std::map<std::string,MonitorElement*>&,bool);
110  void makeRatePlot(std::string, double);
111 
112 // bool selectHighPtJetEvent(const edm::Event&);
113 // bool selectLowPtJetEvent(const edm::Event&);
114 // bool selectWElectronEvent(const edm::Event&);
115 // bool selectWMuonEvent(const edm::Event&);
116 
117  private:
118 
119  // Book MonitorElements
120  void bookMESet(std::string,DQMStore::IBooker &,std::map<std::string,MonitorElement*>&);
121 // Book MonitorElements
122  void bookMonitorElement(std::string,DQMStore::IBooker &, std::map<std::string,MonitorElement*>&,bool );
123 
124  // ----------member data ---------------------------
126  // Switch for verbosity
127  int verbose_;
128 
129 
134 
142 
147  //edm::EDGetTokenT<reco::JPTJetCollection> jptJetsToken_;
148 
151 
152  //edm::EDGetTokenT<reco::METCollection> tcMetToken_;
156 
157  //edm::InputTag inputTrackLabel_;
158  //edm::InputTag inputMuonLabel_;
159  //edm::InputTag inputElectronLabel_;
160  //edm::InputTag inputBeamSpotLabel_;
161  //edm::InputTag inputTCMETValueMap_;
162 
163  //edm::EDGetTokenT<edm::View <reco::Track> > TrackToken_;
164  //edm::EDGetTokenT<reco::MuonCollection> MuonToken_;
165  //edm::EDGetTokenT<edm::View <reco::GsfElectron> > ElectronToken_;
166  //edm::EDGetTokenT<reco::BeamSpot> BeamspotToken_;
167 
170 
173 
175 
176  double ptThreshold_;
177 
178 
179 
180  //edm::EDGetTokenT<edm::ValueMap<reco::MuonMETCorrectionData>> tcMETValueMapToken_;
181  //edm::Handle< edm::ValueMap<reco::MuonMETCorrectionData> > tcMetValueMapHandle_;
182 
183  //edm::Handle< reco::MuonCollection > muonHandle_;
184  //edm::Handle< edm::View<reco::Track> > trackHandle_;
185  //edm::Handle< edm::View<reco::GsfElectron > > electronHandle_;
186  //edm::Handle< reco::BeamSpot > beamSpotHandle_;
187 
191 
192  // list of Jet or MB HLT triggers
193 // std::vector<std::string > HLTPathsJetMBByName_;
194  std::vector<std::string > allTriggerNames_;
195  std::vector< int > allTriggerDecisions_;
196 
198  std::vector<GenericTriggerEventFlag *> triggerFolderEventFlag_;
199  std::vector<std::vector<std::string> > triggerFolderExpr_;
200  std::vector<std::string > triggerFolderLabels_;
201  std::vector<int> triggerFolderDecisions_;
202 // std::vector<MonitorElement* > triggerFolderME_;
203 
204 // GenericTriggerEventFlag * highPtJetEventFlag_;
205 // GenericTriggerEventFlag * lowPtJetEventFlag_;
206 // GenericTriggerEventFlag * minBiasEventFlag_;
207 // GenericTriggerEventFlag * highMETEventFlag_;
209 // GenericTriggerEventFlag * eleEventFlag_;
210 // GenericTriggerEventFlag * muonEventFlag_;
211 //
212 // std::vector<std::string> highPtJetExpr_;
213 // std::vector<std::string> lowPtJetExpr_;
214 // std::vector<std::string> highMETExpr_;
215 // // std::vector<std::string> lowMETExpr_;
216 // std::vector<std::string> muonExpr_;
217 // std::vector<std::string> elecExpr_;
218 // std::vector<std::string> minbiasExpr_;
219 // MonitorElement* hTriggerName_HighPtJet;
220 // MonitorElement* hTriggerName_LowPtJet;
221 // MonitorElement* hTriggerName_MinBias;
222 // MonitorElement* hTriggerName_HighMET;
223 // // MonitorElement* hTriggerName_LowMET;
224 // MonitorElement* hTriggerName_Ele;
225 // MonitorElement* hTriggerName_Muon;
227 
230 
231  int nbinsPV_;
232  double nPVMin_;
233  double nPVMax_;
234 
235 
236  int LSBegin_;
237  int LSEnd_;
238 
242 
243 
244 // int trigJetMB_;
245 // int trigHighPtJet_;
246 // int trigLowPtJet_;
247 // int trigMinBias_;
248 // int trigHighMET_;
250 // int trigEle_;
251 // int trigMuon_;
252 // int trigPhysDec_;
253 
254 // double highPtJetThreshold_;
255 // double lowPtJetThreshold_;
256 // double highMETThreshold_;
257 
258  int numPV_;
259  // Et threshold for MET plots
260 // double etThreshold_;
261 
262  // HF calibration factor (in 31X applied by TcProducer)
263  //delete altogether not used anymore
264  double hfCalibFactor_; //
265 
266  // DCS filter
268 
269  std::vector<std::string> folderNames_;
270  //
272 
273  //trigger histos
274  // lines commented out have been removed to improve the bin usage of JetMET DQM
275 
276  //for all MET types
278  //only in for PF
279 // MonitorElement* meTriggerName_PhysDec;
280 
283  //MonitorElement* hNevents;
286  //MonitorElement* hEz;
291 
294 
297 
298  //CaloMET specific stuff
300 
305 
306  //MonitorElement* hCaloEmEtFraction002;
307  //MonitorElement* hCaloEmEtFraction010;
309 
317 
320  //MonitorElement* hCaloEmEz;
323  //MonitorElement* hCaloEmSumET;
324 
327  //MonitorElement* hCaloHaEz;
330  //MonitorElement* hCaloHaSumET;
331 
332  //remove muon MET
333  //MonitorElement* hCalomuPt;
334  //MonitorElement* hCalomuEta;
335  //MonitorElement* hCalomuNhits;
336  //MonitorElement* hCalomuChi2;
337  //MonitorElement* hCalomuD0;
338  //MonitorElement* hCaloMExCorrection;
339  //MonitorElement* hCaloMEyCorrection;
340  //MonitorElement* hCaloMuonCorrectionFlag;
341 
342 
343  //is filled for TCMET
344  //MonitorElement* htrkPt;
345  //MonitorElement* htrkEta;
346  //MonitorElement* htrkNhits;
347  //MonitorElement* htrkChi2;
348  //MonitorElement* htrkD0;
349  //MonitorElement* helePt;
350  //MonitorElement* heleEta;
351  //MonitorElement* heleHoE;
352  //MonitorElement* hmuPt;
353  //MonitorElement* hmuEta;
354  //MonitorElement* hmuNhits;
355  //MonitorElement* hmuChi2;
356  //MonitorElement* hmuD0;
357 
358  //MonitorElement* hMExCorrection;
359  //MonitorElement* hMEyCorrection;
360  //MonitorElement* hMuonCorrectionFlag;
361 
362  //now PF only things
377 
378 
379  // NPV profiles -->
380  //----------------------------------------------------------------------------
385 
400 
401  std::map< std::string,MonitorElement* >map_dijet_MEs;
402 
404  //bool isTCMet_;
405  bool isPFMet_;
406 
408 
409 };
410 #endif
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken_
Definition: METAnalyzer.h:154
MonitorElement * meElectronEt_profile
Definition: METAnalyzer.h:391
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:401
MonitorElement * hMExLS
Definition: METAnalyzer.h:292
edm::InputTag gtTag_
Definition: METAnalyzer.h:141
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: METAnalyzer.h:145
MonitorElement * hSumET
Definition: METAnalyzer.h:290
MonitorElement * meNeutralHadronEtFraction
Definition: METAnalyzer.h:365
MonitorElement * meNeutralHadronEtFraction_profile
Definition: METAnalyzer.h:388
MonitorElement * meElectronEtFraction_profile
Definition: METAnalyzer.h:390
void fillMESet(const edm::Event &, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &)
Definition: METAnalyzer.cc:928
std::vector< int > allTriggerDecisions_
Definition: METAnalyzer.h:195
bool bypassAllDCSChecks_
Definition: METAnalyzer.h:240
MonitorElement * hMEy
Definition: METAnalyzer.h:285
HLTConfigProvider hltConfig_
Definition: METAnalyzer.h:188
MonitorElement * hCaloMETPhi020
Definition: METAnalyzer.h:299
MonitorElement * hCaloEmMEx
Definition: METAnalyzer.h:318
MonitorElement * mePhotonEt
Definition: METAnalyzer.h:364
void bookMonitorElement(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &, bool)
Definition: METAnalyzer.cc:193
MonitorElement * meChargedHadronEtFraction_profile
Definition: METAnalyzer.h:392
std::vector< int > triggerFolderDecisions_
Definition: METAnalyzer.h:201
MonitorElement * hCaloHadEtInHF
Definition: METAnalyzer.h:313
double ptThreshold_
Definition: METAnalyzer.h:176
bool runcosmics_
Definition: METAnalyzer.h:241
bool isCaloMet_
Definition: METAnalyzer.h:403
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::string MetType_
Definition: METAnalyzer.h:130
edm::InputTag hbheNoiseFilterResultTag_
Definition: METAnalyzer.h:139
MonitorElement * hMEx
Definition: METAnalyzer.h:284
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
Definition: METAnalyzer.h:153
bool outputMEsInRootFile
Definition: METAnalyzer.h:131
MonitorElement * hCaloHadEtInHE
Definition: METAnalyzer.h:312
MonitorElement * hCaloHaMET
Definition: METAnalyzer.h:328
MonitorElement * hCaloEmMEy
Definition: METAnalyzer.h:319
MonitorElement * hCaloEtFractionHadronic
Definition: METAnalyzer.h:303
MonitorElement * hMEyLS
Definition: METAnalyzer.h:293
double nPVMin_
Definition: METAnalyzer.h:232
MonitorElement * meHFHadronEtFraction
Definition: METAnalyzer.h:373
std::string FolderName_
Definition: METAnalyzer.h:133
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
MonitorElement * hMET_logx
Definition: METAnalyzer.h:295
MonitorElement * hCaloEmEtInHF
Definition: METAnalyzer.h:314
MonitorElement * meHFEMEtFraction_profile
Definition: METAnalyzer.h:398
MonitorElement * hCaloHadEtInHO
Definition: METAnalyzer.h:311
MonitorElement * meChargedHadronEtFraction
Definition: METAnalyzer.h:369
MonitorElement * meMEx_profile
Definition: METAnalyzer.h:381
MonitorElement * hMET
Definition: METAnalyzer.h:288
MonitorElement * hTrigger
Definition: METAnalyzer.h:282
edm::InputTag beamHaloSummaryTag_
Definition: METAnalyzer.h:138
double hfCalibFactor_
Definition: METAnalyzer.h:264
std::vector< std::vector< std::string > > triggerFolderExpr_
Definition: METAnalyzer.h:199
MonitorElement * lumisecME
Definition: METAnalyzer.h:281
MonitorElement * hCaloMaxEtInHadTowers
Definition: METAnalyzer.h:302
std::string mOutputFile_
Definition: METAnalyzer.h:132
void makeRatePlot(std::string, double)
Definition: METAnalyzer.cc:567
edm::InputTag vertexTag_
Definition: METAnalyzer.h:140
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: METAnalyzer.h:143
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
MonitorElement * hMETPhi
Definition: METAnalyzer.h:289
MonitorElement * hCaloEmEtInEE
Definition: METAnalyzer.h:315
MonitorElement * meMuonEt
Definition: METAnalyzer.h:372
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:135
std::string jetCorrectionService_
Definition: METAnalyzer.h:174
MonitorElement * meHFEMEt_profile
Definition: METAnalyzer.h:399
void bookMESet(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &)
Definition: METAnalyzer.cc:177
Definition: MET.h:39
void endRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
Finish up a run.
Definition: METAnalyzer.cc:510
MonitorElement * hSumET_logx
Definition: METAnalyzer.h:296
math::XYZPoint beamSpot_
Definition: METAnalyzer.h:271
MonitorElement * meMuonEt_profile
Definition: METAnalyzer.h:395
edm::ParameterSet cleaningParameters_
Definition: METAnalyzer.h:228
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
Definition: METAnalyzer.h:149
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:269
MonitorElement * hCaloHaMETPhi
Definition: METAnalyzer.h:329
MonitorElement * hCaloEmEtFraction
Definition: METAnalyzer.h:304
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Initialize run-based parameters.
Definition: METAnalyzer.cc:466
MonitorElement * meChargedHadronEt
Definition: METAnalyzer.h:370
MonitorElement * hMETSig
Definition: METAnalyzer.h:287
MonitorElement * hCaloEmMETPhi
Definition: METAnalyzer.h:322
MonitorElement * meChargedHadronEt_profile
Definition: METAnalyzer.h:393
edm::EDGetTokenT< reco::HcalNoiseRBXCollection > HcalNoiseRBXToken_
Definition: METAnalyzer.h:155
MonitorElement * meMuonEtFraction
Definition: METAnalyzer.h:371
std::string hltPhysDec_
Definition: METAnalyzer.h:229
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:194
MonitorElement * hCaloEmMET
Definition: METAnalyzer.h:321
PF Jet selector for pat::Jets.
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: METAnalyzer.h:190
MonitorElement * mePhotonEtFraction
Definition: METAnalyzer.h:363
MonitorElement * hCaloMaxEtInEmTowers
Definition: METAnalyzer.h:301
MonitorElement * mePhotonEt_profile
Definition: METAnalyzer.h:387
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: METAnalyzer.h:146
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:267
Jet selector for pat::Jets and for CaloJets.
MonitorElement * meElectronEt
Definition: METAnalyzer.h:368
PFJetIDSelectionFunctor pfjetIDFunctorLoose
Definition: METAnalyzer.h:172
MonitorElement * meMET_profile
Definition: METAnalyzer.h:383
MonitorElement * meHFHadronEt
Definition: METAnalyzer.h:374
MonitorElement * hCaloEmEtInEB
Definition: METAnalyzer.h:316
MonitorElement * hCaloHadEtInHB
Definition: METAnalyzer.h:310
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
double nPVMax_
Definition: METAnalyzer.h:233
MonitorElement * meHFHadronEtFraction_profile
Definition: METAnalyzer.h:396
edm::InputTag triggerResultsLabel_
Definition: METAnalyzer.h:189
edm::ParameterSet parameters
Definition: METAnalyzer.h:125
MonitorElement * meHFEMEtFraction
Definition: METAnalyzer.h:375
METAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: METAnalyzer.cc:41
MonitorElement * hCaloEmEtFraction020
Definition: METAnalyzer.h:308
edm::VParameterSet triggerSelectedSubFolders_
Definition: METAnalyzer.h:197
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtToken_
Definition: METAnalyzer.h:144
MonitorElement * hCaloHaMEx
Definition: METAnalyzer.h:325
MonitorElement * hCaloHaMEy
Definition: METAnalyzer.h:326
bool bypassAllPVChecks_
Definition: METAnalyzer.h:239
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Inizialize parameters for histo binning.
Definition: METAnalyzer.cc:159
MonitorElement * meHFEMEt
Definition: METAnalyzer.h:376
MonitorElement * meMEy_profile
Definition: METAnalyzer.h:382
edm::EDGetTokenT< edm::ValueMap< reco::JetID > > jetID_ValueMapToken_
Definition: METAnalyzer.h:169
edm::InputTag inputJetIDValueMap
Definition: METAnalyzer.h:168
edm::InputTag hcalNoiseRBXCollectionTag_
Definition: METAnalyzer.h:136
void analyze(const edm::Event &, const edm::EventSetup &)
Get the analysis.
Definition: METAnalyzer.cc:595
MonitorElement * meElectronEtFraction
Definition: METAnalyzer.h:367
MonitorElement * meSumET_profile
Definition: METAnalyzer.h:384
JetIDSelectionFunctor jetIDFunctorLoose
Definition: METAnalyzer.h:171
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_
Definition: METAnalyzer.h:150
edm::InputTag jetCollectionLabel_
Definition: METAnalyzer.h:137
void fillMonitorElement(const edm::Event &, std::string, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &, bool)
Definition: METAnalyzer.cc:974
bool hTriggerLabelsIsSet_
Definition: METAnalyzer.h:277
virtual ~METAnalyzer()
Destructor.
Definition: METAnalyzer.cc:151
MonitorElement * meHFHadronEt_profile
Definition: METAnalyzer.h:397
MonitorElement * hMETRate
Definition: METAnalyzer.h:226
MonitorElement * meNeutralHadronEt_profile
Definition: METAnalyzer.h:389
MonitorElement * mePhotonEtFraction_profile
Definition: METAnalyzer.h:386
MonitorElement * meMuonEtFraction_profile
Definition: METAnalyzer.h:394
Definition: Run.h:41
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:200
MonitorElement * meNeutralHadronEt
Definition: METAnalyzer.h:366