CMS 3D CMS Logo

EwkTauDQM.h
Go to the documentation of this file.
1 #ifndef DQM_Physics_EwkTauDQM_h
2 #define DQM_Physics_EwkTauDQM_h
3 
20 
21 #include <string>
22 #include <Math/VectorUtil.h>
23 
26 
27 class EwkTauDQM : public DQMOneEDAnalyzer<> {
28 public:
30  ~EwkTauDQM() override;
31 
32  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
33  void analyze(const edm::Event&, const edm::EventSetup&) override;
34  void dqmEndRun(const edm::Run&, const edm::EventSetup&) override;
35 
36 private:
39 
42 };
43 
44 //-------------------------------------------------------------------------------
45 // code specific to Z --> e + tau-jet channel
46 //-------------------------------------------------------------------------------
47 
65 
66 #include <string>
67 
69 public:
72 
74 
76  void fillHistograms(const edm::Event&, const edm::EventSetup&);
77  void finalizeHistograms();
78 
79 private:
80  //--- labels of electron, tau-jet and MEt collections being used
81  // in event selection and when filling histograms
89 
96 
97  //--- event selection criteria
98  typedef std::vector<std::string> vstring;
100 
106 
108  double tauJetPtCut_;
109 
110  double visMassCut_;
111 
112  //--- name of DQM directory in which histograms for Z --> electron + tau-jet
113  // channel get stored
115 
116  //--- histograms
117  // MonitorElement* hNumIdElectrons_;
123  // MonitorElement* hElectronHcalIsoPt_;
124 
127  // MonitorElement* hTauJetPhi_;
128  // MonitorElement* hTauLeadTrackPt_;
129  // MonitorElement* hTauTrackIsoPt_;
130  // MonitorElement* hTauEcalIsoPt_;
131  // MonitorElement* hTauDiscrAgainstElectrons_;
132  // MonitorElement* hTauDiscrAgainstMuons_;
133  // MonitorElement* hTauJetCharge_;
134  // MonitorElement* hTauJetNumSignalTracks_;
135  // MonitorElement* hTauJetNumIsoTracks_;
136 
138  // MonitorElement* hMtElecCaloMEt_;
140  // MonitorElement* hPzetaCaloMEt_;
141  // MonitorElement* hPzetaPFMEt_;
144 
145  // MonitorElement* hVertexChi2_;
147  // MonitorElement* hVertexD0_;
148 
150  // MonitorElement* hCaloMEtPhi_;
151 
153  // MonitorElement* hPFMEtPhi_;
154 
156  enum {
168  };
169 
170  //--- counters for filter-statistics output
173 
175 
177 
192 };
193 
194 //-------------------------------------------------------------------------------
195 // code specific to Z --> mu + tau-jet channel
196 //-------------------------------------------------------------------------------
197 
214 
215 #include <string>
216 
218 public:
221 
223 
225  void fillHistograms(const edm::Event&, const edm::EventSetup&);
226  void finalizeHistograms();
227 
228 private:
229  //--- labels of muon, tau-jet and MEt collections being used
230  // in event selection and when filling histograms
238 
244 
245  //--- event selection criteria
246  typedef std::vector<std::string> vstring;
248 
249  double muonEtaCut_;
250  double muonPtCut_;
255 
257  double tauJetPtCut_;
258 
259  double visMassCut_;
260  double deltaRCut_;
261 
262  //--- name of DQM directory in which histograms for Z --> muon + tau-jet
263  // channel get stored
265 
266  //--- histograms
267  // MonitorElement* hNumGlobalMuons_;
274 
285 
289  // MonitorElement* hMtMuCaloMEt_;
291  // MonitorElement* hPzetaCmaxNumWarnings_aloMEt_;
292  // MonitorElement* hPzetaPFMEt_;
294  // MonitorElement* hMuTauCharge_;
295 
296  // MonitorElement* hVertexChi2_;
298  // MonitorElement* hVertexD0_;
299 
301  // MonitorElement* hCaloMEtPhi_;
302 
304  // MonitorElement* hPFMEtPhi_;
305 
307  enum {
319  };
320 
321  //--- counters for filter-statistics output
324 
326 
328 
342 };
343 
344 //-------------------------------------------------------------------------------
345 // common auxiliary functions used by different channels
346 //-------------------------------------------------------------------------------
347 
368 
369 #include <string>
370 
372 
373 template <typename T>
374 void readEventData(const edm::Event& evt,
375  const edm::InputTag& src,
377  long& numWarnings,
378  int maxNumWarnings,
379  bool& error,
380  const char* errorMessage) {
381  if (!evt.getByLabel(src, handle)) {
382  if (numWarnings < maxNumWarnings || maxNumWarnings == -1)
383  edm::LogWarning("readEventData") << errorMessage << " !!";
384  ++numWarnings;
385  error = true;
386  }
387 }
388 
389 int getIsoMode(const std::string&, int&);
390 
391 double calcDeltaPhi(double, double);
392 double calcMt(double, double, double, double);
393 double calcPzeta(const reco::Candidate::LorentzVector&, const reco::Candidate::LorentzVector&, double, double);
394 
397 
398 const reco::GsfElectron* getTheElectron(const reco::GsfElectronCollection&, double, double);
399 const reco::Muon* getTheMuon(const reco::MuonCollection&, double, double);
400 const reco::PFTau* getTheTauJet(const reco::PFTauCollection&, double, double, int&);
401 
402 double getVertexD0(const reco::Vertex&, const reco::BeamSpot&);
403 
404 #endif
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:306
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:242
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:187
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:233
double muonCombIsoCut_
Definition: EwkTauDQM.h:253
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:152
void bookHistograms(DQMStore::IBooker &)
Definition: EwkTauDQM.cc:142
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:239
MonitorElement * hTauJetPhi_
Definition: EwkTauDQM.h:277
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:237
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:84
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
dqm::reco::DQMStore DQMStore
bool passesElectronPreId(const reco::GsfElectron &)
Definition: EwkTauDQM.cc:1072
EwkMuTauHistManager(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:550
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:91
MonitorElement * hElecTauAcoplanarity_
Definition: EwkTauDQM.h:142
edm::InputTag electronSource_
Definition: EwkTauDQM.h:85
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:241
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:339
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:137
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: EwkTauDQM.cc:50
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:90
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:338
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:337
MonitorElement * hMuonPhi_
Definition: EwkTauDQM.h:270
std::vector< std::string > vstring
Definition: EwkTauDQM.h:246
MonitorElement * hElectronEcalIsoPt_
Definition: EwkTauDQM.h:122
MonitorElement * hTauEcalIsoPt_
Definition: EwkTauDQM.h:280
std::string dqmDirectory_
Definition: EwkTauDQM.h:37
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:184
double electronEcalIsoCut_
Definition: EwkTauDQM.h:104
unsigned numEventsSelected_
Definition: EwkTauDQM.h:172
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:303
unsigned numEventsSelected_
Definition: EwkTauDQM.h:323
std::string dqmDirectory_
Definition: EwkTauDQM.h:264
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:240
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EwkTauDQM.cc:45
~EwkTauDQM() override
Definition: EwkTauDQM.cc:40
EwkTauDQM::MonitorElement MonitorElement
Definition: EwkTauDQM.h:71
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:155
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:185
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:87
double electronTrackIsoCut_
Definition: EwkTauDQM.h:103
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:95
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:146
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:644
MonitorElement * hTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:281
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
MonitorElement * hMuonEcalIsoPt_
Definition: EwkTauDQM.h:272
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:173
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:186
MonitorElement * hElecTauCharge_
Definition: EwkTauDQM.h:143
double muonTrackIsoCut_
Definition: EwkTauDQM.h:251
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:232
MonitorElement * hElectronTrackIsoPt_
Definition: EwkTauDQM.h:121
MonitorElement * hTauJetNumSignalTracks_
Definition: EwkTauDQM.h:283
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:235
MonitorElement * hMuonEta_
Definition: EwkTauDQM.h:269
const reco::GsfElectron * getTheElectron(const reco::GsfElectronCollection &, double, double)
Definition: EwkTauDQM.cc:1099
double calcPzeta(const reco::Candidate::LorentzVector &, const reco::Candidate::LorentzVector &, double, double)
Definition: EwkTauDQM.cc:1045
void dqmEndRun(const edm::Run &, const edm::EventSetup &) override
Definition: EwkTauDQM.cc:55
int getIsoMode(const std::string &, int &)
Definition: EwkTauDQM.cc:1009
EwkTauDQM::DQMStore DQMStore
Definition: EwkTauDQM.h:219
MonitorElement * hVisMassFinal_
Definition: EwkTauDQM.h:288
MonitorElement * hTauLeadTrackPt_
Definition: EwkTauDQM.h:278
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:40
MonitorElement * hElectronEta_
Definition: EwkTauDQM.h:119
double calcMt(double, double, double, double)
Definition: EwkTauDQM.cc:1035
int maxNumWarnings_
Definition: EwkTauDQM.h:38
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:236
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:329
std::string dqmDirectory_
Definition: EwkTauDQM.h:114
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:189
MonitorElement * hMtMuPFMEt_
Definition: EwkTauDQM.h:290
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:149
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:275
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:93
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:297
MonitorElement * hTauJetCharge_
Definition: EwkTauDQM.h:282
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:125
void finalizeHistograms()
Definition: EwkTauDQM.cc:990
MonitorElement * hTauTrackIsoPt_
Definition: EwkTauDQM.h:279
MonitorElement * hElectronPhi_
Definition: EwkTauDQM.h:120
const reco::PFTau * getTheTauJet(const reco::PFTauCollection &, double, double, int &)
Definition: EwkTauDQM.cc:1129
edm::InputTag tauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:94
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:300
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:335
MonitorElement * hMuonPt_
Definition: EwkTauDQM.h:268
bool passesElectronId(const reco::GsfElectron &)
Definition: EwkTauDQM.cc:1082
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:92
double calcDeltaPhi(double, double)
Definition: EwkTauDQM.cc:1023
MonitorElement * hMuTauDeltaR_
Definition: EwkTauDQM.h:287
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:178
double getVertexD0(const reco::Vertex &, const reco::BeamSpot &)
Definition: EwkTauDQM.cc:1151
edm::InputTag muonSource_
Definition: EwkTauDQM.h:234
EwkElecTauHistManager(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:91
MonitorElement * hMuTauAcoplanarity_
Definition: EwkTauDQM.h:293
MonitorElement * hTauJetNumIsoTracks_
Definition: EwkTauDQM.h:284
MonitorElement * hMuonCombIsoPt_
Definition: EwkTauDQM.h:273
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:83
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:88
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:41
const reco::Muon * getTheMuon(const reco::MuonCollection &, double, double)
Definition: EwkTauDQM.cc:1116
std::vector< std::string > vstring
Definition: EwkTauDQM.h:98
void readEventData(const edm::Event &evt, const edm::InputTag &src, edm::Handle< T > &handle, long &numWarnings, int maxNumWarnings, bool &error, const char *errorMessage)
Definition: EwkTauDQM.h:374
void bookHistograms(DQMStore::IBooker &)
Definition: EwkTauDQM.cc:601
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:276
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:86
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:82
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:322
EwkTauDQM::MonitorElement MonitorElement
Definition: EwkTauDQM.h:220
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:231
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:126
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:243
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:286
MonitorElement * hMuonTrackIsoPt_
Definition: EwkTauDQM.h:271
Log< level::Warning, false > LogWarning
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:171
long numWarningsTauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:188
EwkTauDQM::DQMStore DQMStore
Definition: EwkTauDQM.h:70
EwkTauDQM(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:20
MonitorElement * hElectronPt_
Definition: EwkTauDQM.h:118
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:501
MonitorElement * hMtElecPFMEt_
Definition: EwkTauDQM.h:139
Definition: Run.h:45
double muonEcalIsoCut_
Definition: EwkTauDQM.h:252
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:336