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 
22 
24 
25 #include <string>
26 #include <Math/VectorUtil.h>
29 
30 class EwkTauDQM : public edm::EDAnalyzer {
31  public:
33  ~EwkTauDQM();
34 
35  void beginJob();
36  void analyze(const edm::Event&, const edm::EventSetup&);
37  void endJob();
38 
39  private:
42  int dqmError_;
44 
47 };
48 
49 //-------------------------------------------------------------------------------
50 // code specific to Z --> e + tau-jet channel
51 //-------------------------------------------------------------------------------
52 
69 
71 
72 #include <string>
73 
75  public:
77 
78  void bookHistograms();
79  void fillHistograms(const edm::Event&, const edm::EventSetup&);
80  void finalizeHistograms();
81 
82  private:
83  //--- labels of electron, tau-jet and MEt collections being used
84  // in event selection and when filling histograms
92 
99 
100  //--- event selection criteria
101  typedef std::vector<std::string> vstring;
103 
109 
111  double tauJetPtCut_;
112 
113  double visMassCut_;
114 
115  //--- pointer to DQM histogram management service
117 
118  //--- name of DQM directory in which histograms for Z --> electron + tau-jet
119  // channel get stored
121 
122  //--- histograms
123  // MonitorElement* hNumIdElectrons_;
129  // MonitorElement* hElectronHcalIsoPt_;
130 
133  // MonitorElement* hTauJetPhi_;
134  // MonitorElement* hTauLeadTrackPt_;
135  // MonitorElement* hTauTrackIsoPt_;
136  // MonitorElement* hTauEcalIsoPt_;
137  // MonitorElement* hTauDiscrAgainstElectrons_;
138  // MonitorElement* hTauDiscrAgainstMuons_;
139  // MonitorElement* hTauJetCharge_;
140  // MonitorElement* hTauJetNumSignalTracks_;
141  // MonitorElement* hTauJetNumIsoTracks_;
142 
144  // MonitorElement* hMtElecCaloMEt_;
146  // MonitorElement* hPzetaCaloMEt_;
147  // MonitorElement* hPzetaPFMEt_;
150 
151  // MonitorElement* hVertexChi2_;
153  // MonitorElement* hVertexD0_;
154 
156  // MonitorElement* hCaloMEtPhi_;
157 
159  // MonitorElement* hPFMEtPhi_;
160 
162  enum {
174  };
175 
176  //--- counters for filter-statistics output
179 
181 
183 
198 };
199 
200 //-------------------------------------------------------------------------------
201 // code specific to Z --> mu + tau-jet channel
202 //-------------------------------------------------------------------------------
203 
220 
222 
223 #include <string>
224 
226  public:
228 
229  void bookHistograms();
230  void fillHistograms(const edm::Event&, const edm::EventSetup&);
231  void finalizeHistograms();
232 
233  private:
234  //--- labels of muon, tau-jet and MEt collections being used
235  // in event selection and when filling histograms
243 
249 
250  //--- event selection criteria
251  typedef std::vector<std::string> vstring;
253 
254  double muonEtaCut_;
255  double muonPtCut_;
260 
262  double tauJetPtCut_;
263 
264  double visMassCut_;
265  double deltaRCut_;
266  //--- pointer to DQM histogram management service
268 
269  //--- name of DQM directory in which histograms for Z --> muon + tau-jet
270  // channel get stored
272 
273  //--- histograms
274  // MonitorElement* hNumGlobalMuons_;
281 
292 
296  // MonitorElement* hMtMuCaloMEt_;
298  // MonitorElement* hPzetaCmaxNumWarnings_aloMEt_;
299  // MonitorElement* hPzetaPFMEt_;
301  // MonitorElement* hMuTauCharge_;
302 
303  // MonitorElement* hVertexChi2_;
305  // MonitorElement* hVertexD0_;
306 
308  // MonitorElement* hCaloMEtPhi_;
309 
311  // MonitorElement* hPFMEtPhi_;
312 
314  enum {
326  };
327 
328  //--- counters for filter-statistics output
331 
333 
335 
349 };
350 
351 //-------------------------------------------------------------------------------
352 // common auxiliary functions used by different channels
353 //-------------------------------------------------------------------------------
354 
375 
376 #include <string>
377 
378 enum {
382 };
383 
384 template <typename T>
385 void readEventData(const edm::Event& evt, const edm::InputTag& src,
386  edm::Handle<T>& handle, long& numWarnings,
387  int maxNumWarnings, bool& error, const char* errorMessage) {
388  if (!evt.getByLabel(src, handle)) {
389  if (numWarnings < maxNumWarnings || maxNumWarnings == -1)
390  edm::LogWarning("readEventData") << errorMessage << " !!";
391  ++numWarnings;
392  error = true;
393  }
394 }
395 
396 int getIsoMode(const std::string&, int&);
397 
398 double calcDeltaPhi(double, double);
399 double calcMt(double, double, double, double);
401  const reco::Candidate::LorentzVector&, double, double);
402 
405 
407  double, double);
408 const reco::Muon* getTheMuon(const reco::MuonCollection&, double, double);
409 const reco::PFTau* getTheTauJet(const reco::PFTauCollection&, double, double,
410  int&);
411 
412 double getVertexD0(const reco::Vertex&, const reco::BeamSpot&);
413 
414 #endif
415 
416 /* Local Variables: */
417 /* show-trailing-whitespace: t */
418 /* truncate-lines: t */
419 /* End: */
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:313
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:247
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:193
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:74
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:238
double calcDeltaPhi(double phi1, double phi2)
Definition: EwkTauDQM.cc:1120
double muonCombIsoCut_
Definition: EwkTauDQM.h:258
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:158
double calcMt(double px1, double py1, double px2, double py2)
Definition: EwkTauDQM.cc:1130
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:244
MonitorElement * hTauJetPhi_
Definition: EwkTauDQM.h:284
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:242
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:87
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:94
MonitorElement * hElecTauAcoplanarity_
Definition: EwkTauDQM.h:148
edm::InputTag electronSource_
Definition: EwkTauDQM.h:88
int getIsoMode(const std::string &isoMode_string, int &error)
Definition: EwkTauDQM.cc:1101
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:246
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:346
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:143
EwkMuTauHistManager(const edm::ParameterSet &, DQMStore *)
Definition: EwkTauDQM.cc:614
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:93
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:345
double getVertexD0(const reco::Vertex &vertex, const reco::BeamSpot &beamSpot)
Definition: EwkTauDQM.cc:1260
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:344
MonitorElement * hMuonPhi_
Definition: EwkTauDQM.h:277
std::vector< std::string > vstring
Definition: EwkTauDQM.h:251
MonitorElement * hElectronEcalIsoPt_
Definition: EwkTauDQM.h:128
MonitorElement * hTauEcalIsoPt_
Definition: EwkTauDQM.h:287
std::string dqmDirectory_
Definition: EwkTauDQM.h:41
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:190
double electronEcalIsoCut_
Definition: EwkTauDQM.h:107
unsigned numEventsSelected_
Definition: EwkTauDQM.h:178
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:310
unsigned numEventsSelected_
Definition: EwkTauDQM.h:330
std::string dqmDirectory_
Definition: EwkTauDQM.h:271
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:245
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:161
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:191
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:90
EwkElecTauHistManager(const edm::ParameterSet &, DQMStore *)
Definition: EwkTauDQM.cc:120
double electronTrackIsoCut_
Definition: EwkTauDQM.h:106
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:98
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:152
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:763
MonitorElement * hTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:288
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
MonitorElement * hMuonEcalIsoPt_
Definition: EwkTauDQM.h:279
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:269
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:192
MonitorElement * hElecTauCharge_
Definition: EwkTauDQM.h:149
double muonTrackIsoCut_
Definition: EwkTauDQM.h:256
int dqmError_
Definition: EwkTauDQM.h:42
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:237
const reco::GsfElectron * getTheElectron(const reco::GsfElectronCollection &electrons, double electronEtaCut, double electronPtCut)
Definition: EwkTauDQM.cc:1204
MonitorElement * hElectronTrackIsoPt_
Definition: EwkTauDQM.h:127
MonitorElement * hTauJetNumSignalTracks_
Definition: EwkTauDQM.h:290
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:240
MonitorElement * hMuonEta_
Definition: EwkTauDQM.h:276
bool passesElectronId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1182
MonitorElement * hVisMassFinal_
Definition: EwkTauDQM.h:295
MonitorElement * hTauLeadTrackPt_
Definition: EwkTauDQM.h:285
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:45
MonitorElement * hElectronEta_
Definition: EwkTauDQM.h:125
int maxNumWarnings_
Definition: EwkTauDQM.h:43
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:241
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:336
std::string dqmDirectory_
Definition: EwkTauDQM.h:120
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:195
tuple handle
Definition: patZpeak.py:22
MonitorElement * hMtMuPFMEt_
Definition: EwkTauDQM.h:297
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:155
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:282
const reco::Muon * getTheMuon(const reco::MuonCollection &muons, double muonEtaCut, double muonPtCut)
Definition: EwkTauDQM.cc:1221
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:96
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:304
const reco::PFTau * getTheTauJet(const reco::PFTauCollection &tauJets, double tauJetEtaCut, double tauJetPtCut, int &theTauJetIndex)
Definition: EwkTauDQM.cc:1235
MonitorElement * hTauJetCharge_
Definition: EwkTauDQM.h:289
DQMStore * dqmStore_
Definition: EwkTauDQM.h:40
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:131
void beginJob()
Definition: EwkTauDQM.cc:67
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:402
MonitorElement * hTauTrackIsoPt_
Definition: EwkTauDQM.h:286
MonitorElement * hElectronPhi_
Definition: EwkTauDQM.h:126
double calcPzeta(const reco::Candidate::LorentzVector &p1, const reco::Candidate::LorentzVector &p2, double pxMEt, double pyMEt)
Definition: EwkTauDQM.cc:1140
edm::InputTag tauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:97
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:307
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:342
MonitorElement * hMuonPt_
Definition: EwkTauDQM.h:275
~EwkTauDQM()
Definition: EwkTauDQM.cc:62
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:95
MonitorElement * hMuTauDeltaR_
Definition: EwkTauDQM.h:294
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:184
DQMStore * dqmStore_
Definition: EwkTauDQM.h:116
edm::InputTag muonSource_
Definition: EwkTauDQM.h:239
MonitorElement * hMuTauAcoplanarity_
Definition: EwkTauDQM.h:300
MonitorElement * hTauJetNumIsoTracks_
Definition: EwkTauDQM.h:291
MonitorElement * hMuonCombIsoPt_
Definition: EwkTauDQM.h:280
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:86
bool passesElectronPreId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1170
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:91
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:46
void endJob()
Definition: EwkTauDQM.cc:81
DQMStore * dqmStore_
Definition: EwkTauDQM.h:267
std::vector< std::string > vstring
Definition: EwkTauDQM.h:101
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:385
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:283
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:89
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:85
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:329
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:236
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:132
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:248
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:293
MonitorElement * hMuonTrackIsoPt_
Definition: EwkTauDQM.h:278
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:177
long numWarningsTauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:194
EwkTauDQM(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:22
MonitorElement * hElectronPt_
Definition: EwkTauDQM.h:124
MonitorElement * hMtElecPFMEt_
Definition: EwkTauDQM.h:145
double muonEcalIsoCut_
Definition: EwkTauDQM.h:257
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:343