CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 DQMEDAnalyzer {
28  public:
30  ~EwkTauDQM();
31 
33  edm::EventSetup const&) override;
34  void analyze(const edm::Event&, const edm::EventSetup&);
35  void endRun(const edm::Run&, const edm::EventSetup&);
36 
37  private:
40 
43 };
44 
45 //-------------------------------------------------------------------------------
46 // code specific to Z --> e + tau-jet channel
47 //-------------------------------------------------------------------------------
48 
65 
67 
68 #include <string>
69 
71  public:
73 
75  void fillHistograms(const edm::Event&, const edm::EventSetup&);
76  void finalizeHistograms();
77 
78  private:
79  //--- labels of electron, tau-jet and MEt collections being used
80  // in event selection and when filling histograms
88 
95 
96  //--- event selection criteria
97  typedef std::vector<std::string> vstring;
99 
105 
107  double tauJetPtCut_;
108 
109  double visMassCut_;
110 
111  //--- name of DQM directory in which histograms for Z --> electron + tau-jet
112  // channel get stored
114 
115  //--- histograms
116  // MonitorElement* hNumIdElectrons_;
122  // MonitorElement* hElectronHcalIsoPt_;
123 
126  // MonitorElement* hTauJetPhi_;
127  // MonitorElement* hTauLeadTrackPt_;
128  // MonitorElement* hTauTrackIsoPt_;
129  // MonitorElement* hTauEcalIsoPt_;
130  // MonitorElement* hTauDiscrAgainstElectrons_;
131  // MonitorElement* hTauDiscrAgainstMuons_;
132  // MonitorElement* hTauJetCharge_;
133  // MonitorElement* hTauJetNumSignalTracks_;
134  // MonitorElement* hTauJetNumIsoTracks_;
135 
137  // MonitorElement* hMtElecCaloMEt_;
139  // MonitorElement* hPzetaCaloMEt_;
140  // MonitorElement* hPzetaPFMEt_;
143 
144  // MonitorElement* hVertexChi2_;
146  // MonitorElement* hVertexD0_;
147 
149  // MonitorElement* hCaloMEtPhi_;
150 
152  // MonitorElement* hPFMEtPhi_;
153 
155  enum {
167  };
168 
169  //--- counters for filter-statistics output
172 
174 
176 
191 };
192 
193 //-------------------------------------------------------------------------------
194 // code specific to Z --> mu + tau-jet channel
195 //-------------------------------------------------------------------------------
196 
213 
215 
216 #include <string>
217 
219  public:
221 
223  void fillHistograms(const edm::Event&, const edm::EventSetup&);
224  void finalizeHistograms();
225 
226  private:
227  //--- labels of muon, tau-jet and MEt collections being used
228  // in event selection and when filling histograms
236 
242 
243  //--- event selection criteria
244  typedef std::vector<std::string> vstring;
246 
247  double muonEtaCut_;
248  double muonPtCut_;
253 
255  double tauJetPtCut_;
256 
257  double visMassCut_;
258  double deltaRCut_;
259 
260  //--- name of DQM directory in which histograms for Z --> muon + tau-jet
261  // channel get stored
263 
264  //--- histograms
265  // MonitorElement* hNumGlobalMuons_;
272 
283 
287  // MonitorElement* hMtMuCaloMEt_;
289  // MonitorElement* hPzetaCmaxNumWarnings_aloMEt_;
290  // MonitorElement* hPzetaPFMEt_;
292  // MonitorElement* hMuTauCharge_;
293 
294  // MonitorElement* hVertexChi2_;
296  // MonitorElement* hVertexD0_;
297 
299  // MonitorElement* hCaloMEtPhi_;
300 
302  // MonitorElement* hPFMEtPhi_;
303 
305  enum {
317  };
318 
319  //--- counters for filter-statistics output
322 
324 
326 
340 };
341 
342 //-------------------------------------------------------------------------------
343 // common auxiliary functions used by different channels
344 //-------------------------------------------------------------------------------
345 
366 
367 #include <string>
368 
370 
371 template <typename T>
372 void readEventData(const edm::Event& evt, const edm::InputTag& src,
373  edm::Handle<T>& handle, long& numWarnings,
374  int maxNumWarnings, bool& error, const char* errorMessage) {
375  if (!evt.getByLabel(src, handle)) {
376  if (numWarnings < maxNumWarnings || maxNumWarnings == -1)
377  edm::LogWarning("readEventData") << errorMessage << " !!";
378  ++numWarnings;
379  error = true;
380  }
381 }
382 
383 int getIsoMode(const std::string&, int&);
384 
385 double calcDeltaPhi(double, double);
386 double calcMt(double, double, double, double);
388  const reco::Candidate::LorentzVector&, double, double);
389 
392 
394  double, double);
395 const reco::Muon* getTheMuon(const reco::MuonCollection&, double, double);
396 const reco::PFTau* getTheTauJet(const reco::PFTauCollection&, double, double,
397  int&);
398 
399 double getVertexD0(const reco::Vertex&, const reco::BeamSpot&);
400 
401 #endif
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:304
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:240
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:186
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:64
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:231
double calcDeltaPhi(double phi1, double phi2)
Definition: EwkTauDQM.cc:1028
double muonCombIsoCut_
Definition: EwkTauDQM.h:251
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:151
void bookHistograms(DQMStore::IBooker &)
Definition: EwkTauDQM.cc:165
double calcMt(double px1, double py1, double px2, double py2)
Definition: EwkTauDQM.cc:1038
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:237
MonitorElement * hTauJetPhi_
Definition: EwkTauDQM.h:275
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:235
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:83
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
EwkMuTauHistManager(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:554
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:90
void endRun(const edm::Run &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:69
MonitorElement * hElecTauAcoplanarity_
Definition: EwkTauDQM.h:141
edm::InputTag electronSource_
Definition: EwkTauDQM.h:84
int getIsoMode(const std::string &isoMode_string, int &error)
Definition: EwkTauDQM.cc:1013
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:239
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:337
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:136
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:89
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:336
double getVertexD0(const reco::Vertex &vertex, const reco::BeamSpot &beamSpot)
Definition: EwkTauDQM.cc:1156
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:335
MonitorElement * hMuonPhi_
Definition: EwkTauDQM.h:268
std::vector< std::string > vstring
Definition: EwkTauDQM.h:244
MonitorElement * hElectronEcalIsoPt_
Definition: EwkTauDQM.h:121
MonitorElement * hTauEcalIsoPt_
Definition: EwkTauDQM.h:278
std::string dqmDirectory_
Definition: EwkTauDQM.h:38
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:183
double electronEcalIsoCut_
Definition: EwkTauDQM.h:103
unsigned numEventsSelected_
Definition: EwkTauDQM.h:171
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:301
unsigned numEventsSelected_
Definition: EwkTauDQM.h:321
std::string dqmDirectory_
Definition: EwkTauDQM.h:262
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:238
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EwkTauDQM.cc:57
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:154
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:184
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:86
double electronTrackIsoCut_
Definition: EwkTauDQM.h:102
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:94
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:145
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:676
MonitorElement * hTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:279
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
MonitorElement * hMuonEcalIsoPt_
Definition: EwkTauDQM.h:270
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:210
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:185
MonitorElement * hElecTauCharge_
Definition: EwkTauDQM.h:142
double muonTrackIsoCut_
Definition: EwkTauDQM.h:249
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:230
const reco::GsfElectron * getTheElectron(const reco::GsfElectronCollection &electrons, double electronEtaCut, double electronPtCut)
Definition: EwkTauDQM.cc:1104
MonitorElement * hElectronTrackIsoPt_
Definition: EwkTauDQM.h:120
MonitorElement * hTauJetNumSignalTracks_
Definition: EwkTauDQM.h:281
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:233
MonitorElement * hMuonEta_
Definition: EwkTauDQM.h:267
bool passesElectronId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1086
MonitorElement * hVisMassFinal_
Definition: EwkTauDQM.h:286
MonitorElement * hTauLeadTrackPt_
Definition: EwkTauDQM.h:276
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:41
MonitorElement * hElectronEta_
Definition: EwkTauDQM.h:118
int maxNumWarnings_
Definition: EwkTauDQM.h:39
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:234
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:327
std::string dqmDirectory_
Definition: EwkTauDQM.h:113
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:188
tuple handle
Definition: patZpeak.py:22
MonitorElement * hMtMuPFMEt_
Definition: EwkTauDQM.h:288
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:148
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:273
const reco::Muon * getTheMuon(const reco::MuonCollection &muons, double muonEtaCut, double muonPtCut)
Definition: EwkTauDQM.cc:1121
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:92
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:295
const reco::PFTau * getTheTauJet(const reco::PFTauCollection &tauJets, double tauJetEtaCut, double tauJetPtCut, int &theTauJetIndex)
Definition: EwkTauDQM.cc:1135
MonitorElement * hTauJetCharge_
Definition: EwkTauDQM.h:280
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:124
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
void finalizeHistograms()
Definition: EwkTauDQM.cc:991
MonitorElement * hTauTrackIsoPt_
Definition: EwkTauDQM.h:277
MonitorElement * hElectronPhi_
Definition: EwkTauDQM.h:119
double calcPzeta(const reco::Candidate::LorentzVector &p1, const reco::Candidate::LorentzVector &p2, double pxMEt, double pyMEt)
Definition: EwkTauDQM.cc:1048
edm::InputTag tauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:93
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:298
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:333
MonitorElement * hMuonPt_
Definition: EwkTauDQM.h:266
~EwkTauDQM()
Definition: EwkTauDQM.cc:52
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:91
MonitorElement * hMuTauDeltaR_
Definition: EwkTauDQM.h:285
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:177
edm::InputTag muonSource_
Definition: EwkTauDQM.h:232
EwkElecTauHistManager(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:106
MonitorElement * hMuTauAcoplanarity_
Definition: EwkTauDQM.h:291
MonitorElement * hTauJetNumIsoTracks_
Definition: EwkTauDQM.h:282
MonitorElement * hMuonCombIsoPt_
Definition: EwkTauDQM.h:271
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:82
bool passesElectronPreId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1074
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:87
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:42
std::vector< std::string > vstring
Definition: EwkTauDQM.h:97
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:372
void bookHistograms(DQMStore::IBooker &)
Definition: EwkTauDQM.cc:611
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:274
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:85
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:81
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:320
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:229
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:125
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:241
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:284
MonitorElement * hMuonTrackIsoPt_
Definition: EwkTauDQM.h:269
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:170
long numWarningsTauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:187
EwkTauDQM(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:22
MonitorElement * hElectronPt_
Definition: EwkTauDQM.h:117
MonitorElement * hMtElecPFMEt_
Definition: EwkTauDQM.h:138
Definition: Run.h:41
double muonEcalIsoCut_
Definition: EwkTauDQM.h:250
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:334