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 
23 
25 
26 #include <string>
27 #include <Math/VectorUtil.h>
30 
31 class EwkTauDQM : public edm::EDAnalyzer
32 {
33  public:
35  ~EwkTauDQM();
36 
37  void beginJob();
38  void analyze(const edm::Event&, const edm::EventSetup&);
39  void endJob();
40 
41  private:
43  std::string dqmDirectory_;
44  int dqmError_;
46 
49 };
50 
51 //-------------------------------------------------------------------------------
52 // code specific to Z --> e + tau-jet channel
53 //-------------------------------------------------------------------------------
54 
73 
75 
76 #include <string>
77 
79 {
80  public:
82 
83  void bookHistograms();
84  void fillHistograms(const edm::Event&, const edm::EventSetup&);
85  void finalizeHistograms();
86 
87  private:
88 
89 //--- labels of electron, tau-jet and MEt collections being used
90 // in event selection and when filling histograms
98 
105 
106 //--- event selection criteria
107  typedef std::vector<std::string> vstring;
109 
115 
117  double tauJetPtCut_;
118 
119  double visMassCut_;
120 
121 //--- pointer to DQM histogram management service
123 
124 //--- name of DQM directory in which histograms for Z --> electron + tau-jet channel get stored
125  std::string dqmDirectory_;
126 
127 //--- histograms
128  //MonitorElement* hNumIdElectrons_;
134  //MonitorElement* hElectronHcalIsoPt_;
135 
138  //MonitorElement* hTauJetPhi_;
139  //MonitorElement* hTauLeadTrackPt_;
140  //MonitorElement* hTauTrackIsoPt_;
141  //MonitorElement* hTauEcalIsoPt_;
142  //MonitorElement* hTauDiscrAgainstElectrons_;
143  //MonitorElement* hTauDiscrAgainstMuons_;
144  //MonitorElement* hTauJetCharge_;
145  //MonitorElement* hTauJetNumSignalTracks_;
146  //MonitorElement* hTauJetNumIsoTracks_;
147 
149  //MonitorElement* hMtElecCaloMEt_;
151  //MonitorElement* hPzetaCaloMEt_;
152  //MonitorElement* hPzetaPFMEt_;
155 
156  //MonitorElement* hVertexChi2_;
158  //MonitorElement* hVertexD0_;
159 
161  //MonitorElement* hCaloMEtPhi_;
162 
164  //MonitorElement* hPFMEtPhi_;
165 
170  };
171 
172 //--- counters for filter-statistics output
175 
177 
179 
194 };
195 
196 
197 
198 //-------------------------------------------------------------------------------
199 // code specific to Z --> mu + tau-jet channel
200 //-------------------------------------------------------------------------------
201 
220 
222 
223 #include <string>
224 
226 {
227  public:
229 
230  void bookHistograms();
231  void fillHistograms(const edm::Event&, const edm::EventSetup&);
232  void finalizeHistograms();
233 
234  private:
235 
236 //--- labels of muon, tau-jet and MEt collections being used
237 // in event selection and when filling histograms
245 
251 
252 //--- event selection criteria
253  typedef std::vector<std::string> vstring;
255 
256  double muonEtaCut_;
257  double muonPtCut_;
262 
264  double tauJetPtCut_;
265 
266  double visMassCut_;
267  double deltaRCut_;
268 //--- pointer to DQM histogram management service
270 
271 //--- name of DQM directory in which histograms for Z --> muon + tau-jet channel get stored
272  std::string dqmDirectory_;
273 
274 //--- histograms
275  //MonitorElement* hNumGlobalMuons_;
282 
293 
297  //MonitorElement* hMtMuCaloMEt_;
299  //MonitorElement* hPzetaCmaxNumWarnings_aloMEt_;
300  //MonitorElement* hPzetaPFMEt_;
302  //MonitorElement* hMuTauCharge_;
303 
304  //MonitorElement* hVertexChi2_;
306  //MonitorElement* hVertexD0_;
307 
309  //MonitorElement* hCaloMEtPhi_;
310 
312  //MonitorElement* hPFMEtPhi_;
313 
316 
317 //--- counters for filter-statistics output
320 
322 
324 
338 };
339 
340 //-------------------------------------------------------------------------------
341 // common auxiliary functions used by different channels
342 //-------------------------------------------------------------------------------
343 
367 
368 #include <string>
369 
371 
372 template<typename T>
373 void readEventData(const edm::Event& evt, const edm::InputTag& src, edm::Handle<T>& handle, long& numWarnings, int maxNumWarnings,
374  bool& error, const char* errorMessage)
375 {
376  if ( !evt.getByLabel(src, handle) ) {
377  if ( numWarnings < maxNumWarnings || maxNumWarnings == -1 )
378  edm::LogWarning ("readEventData") << errorMessage << " !!";
379  ++numWarnings;
380  error = true;
381  }
382 }
383 
384 int getIsoMode(const std::string&, int&);
385 
386 double calcDeltaPhi(double, double);
387 double calcMt(double, double, double, double);
388 double calcPzeta(const reco::Candidate::LorentzVector&, const reco::Candidate::LorentzVector&, double, double);
389 
392 
393 const reco::GsfElectron* getTheElectron(const reco::GsfElectronCollection&, double, double);
394 const reco::Muon* getTheMuon(const reco::MuonCollection&, double, double);
395 const reco::PFTau* getTheTauJet(const reco::PFTauCollection&, double, double, int&);
396 
397 double getVertexD0(const reco::Vertex&, const reco::BeamSpot&);
398 
399 #endif
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:314
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:249
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:189
void analyze(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:63
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:240
double calcDeltaPhi(double phi1, double phi2)
Definition: EwkTauDQM.cc:972
double muonCombIsoCut_
Definition: EwkTauDQM.h:260
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:163
double calcMt(double px1, double py1, double px2, double py2)
Definition: EwkTauDQM.cc:983
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:246
MonitorElement * hTauJetPhi_
Definition: EwkTauDQM.h:285
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:244
edm::InputTag beamSpotSource_
Definition: EwkTauDQM.h:93
std::vector< PFTau > PFTauCollection
collection of PFTau objects
Definition: PFTauFwd.h:9
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:100
MonitorElement * hElecTauAcoplanarity_
Definition: EwkTauDQM.h:153
edm::InputTag electronSource_
Definition: EwkTauDQM.h:94
int getIsoMode(const std::string &isoMode_string, int &error)
Definition: EwkTauDQM.cc:953
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:248
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:335
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:148
EwkMuTauHistManager(const edm::ParameterSet &, DQMStore *)
Definition: EwkTauDQM.cc:527
edm::InputTag tauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:99
long numWarningsTauDiscrByEcalIso_
Definition: EwkTauDQM.h:334
double getVertexD0(const reco::Vertex &vertex, const reco::BeamSpot &beamSpot)
Definition: EwkTauDQM.cc:1111
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:333
MonitorElement * hMuonPhi_
Definition: EwkTauDQM.h:278
std::vector< std::string > vstring
Definition: EwkTauDQM.h:253
MonitorElement * hElectronEcalIsoPt_
Definition: EwkTauDQM.h:133
MonitorElement * hTauEcalIsoPt_
Definition: EwkTauDQM.h:288
std::string dqmDirectory_
Definition: EwkTauDQM.h:43
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:186
double electronEcalIsoCut_
Definition: EwkTauDQM.h:113
unsigned numEventsSelected_
Definition: EwkTauDQM.h:174
MonitorElement * hPFMEtPt_
Definition: EwkTauDQM.h:311
unsigned numEventsSelected_
Definition: EwkTauDQM.h:319
std::string dqmDirectory_
Definition: EwkTauDQM.h:272
edm::InputTag tauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:247
MonitorElement * hCutFlowSummary_
Definition: EwkTauDQM.h:166
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:187
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:96
EwkElecTauHistManager(const edm::ParameterSet &, DQMStore *)
Definition: EwkTauDQM.cc:114
double electronTrackIsoCut_
Definition: EwkTauDQM.h:112
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:104
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:157
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:638
MonitorElement * hTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:289
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
MonitorElement * hMuonEcalIsoPt_
Definition: EwkTauDQM.h:280
void fillHistograms(const edm::Event &, const edm::EventSetup &)
Definition: EwkTauDQM.cc:223
long numWarningsTauDiscrByTrackIso_
Definition: EwkTauDQM.h:188
MonitorElement * hElecTauCharge_
Definition: EwkTauDQM.h:154
double muonTrackIsoCut_
Definition: EwkTauDQM.h:258
int dqmError_
Definition: EwkTauDQM.h:44
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:239
const reco::GsfElectron * getTheElectron(const reco::GsfElectronCollection &electrons, double electronEtaCut, double electronPtCut)
Definition: EwkTauDQM.cc:1056
MonitorElement * hElectronTrackIsoPt_
Definition: EwkTauDQM.h:132
MonitorElement * hTauJetNumSignalTracks_
Definition: EwkTauDQM.h:291
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:242
MonitorElement * hMuonEta_
Definition: EwkTauDQM.h:277
bool passesElectronId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1035
MonitorElement * hVisMassFinal_
Definition: EwkTauDQM.h:296
MonitorElement * hTauLeadTrackPt_
Definition: EwkTauDQM.h:286
EwkElecTauHistManager * elecTauHistManager_
Definition: EwkTauDQM.h:47
MonitorElement * hElectronEta_
Definition: EwkTauDQM.h:130
int maxNumWarnings_
Definition: EwkTauDQM.h:45
edm::InputTag caloMEtSource_
Definition: EwkTauDQM.h:243
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:325
std::string dqmDirectory_
Definition: EwkTauDQM.h:125
long numWarningsTauDiscrAgainstMuons_
Definition: EwkTauDQM.h:191
tuple handle
Definition: patZpeak.py:22
MonitorElement * hMtMuPFMEt_
Definition: EwkTauDQM.h:298
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:160
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:283
const reco::Muon * getTheMuon(const reco::MuonCollection &muons, double muonEtaCut, double muonPtCut)
Definition: EwkTauDQM.cc:1073
edm::InputTag tauDiscrByEcalIso_
Definition: EwkTauDQM.h:102
MonitorElement * hVertexZ_
Definition: EwkTauDQM.h:305
const reco::PFTau * getTheTauJet(const reco::PFTauCollection &tauJets, double tauJetEtaCut, double tauJetPtCut, int &theTauJetIndex)
Definition: EwkTauDQM.cc:1087
MonitorElement * hTauJetCharge_
Definition: EwkTauDQM.h:290
DQMStore * dqmStore_
Definition: EwkTauDQM.h:42
MonitorElement * hTauJetPt_
Definition: EwkTauDQM.h:136
void beginJob()
Definition: EwkTauDQM.cc:55
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void finalizeHistograms()
Definition: EwkTauDQM.cc:931
MonitorElement * hTauTrackIsoPt_
Definition: EwkTauDQM.h:287
MonitorElement * hElectronPhi_
Definition: EwkTauDQM.h:131
double calcPzeta(const reco::Candidate::LorentzVector &p1, const reco::Candidate::LorentzVector &p2, double pxMEt, double pyMEt)
Definition: EwkTauDQM.cc:994
edm::InputTag tauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:103
MonitorElement * hCaloMEtPt_
Definition: EwkTauDQM.h:308
long numWarningsTauDiscrByLeadTrackFinding_
Definition: EwkTauDQM.h:331
MonitorElement * hMuonPt_
Definition: EwkTauDQM.h:276
~EwkTauDQM()
Definition: EwkTauDQM.cc:49
edm::InputTag tauDiscrByTrackIso_
Definition: EwkTauDQM.h:101
MonitorElement * hMuTauDeltaR_
Definition: EwkTauDQM.h:295
long numWarningsTriggerResults_
Definition: EwkTauDQM.h:180
DQMStore * dqmStore_
Definition: EwkTauDQM.h:122
edm::InputTag muonSource_
Definition: EwkTauDQM.h:241
MonitorElement * hMuTauAcoplanarity_
Definition: EwkTauDQM.h:301
MonitorElement * hTauJetNumIsoTracks_
Definition: EwkTauDQM.h:292
MonitorElement * hMuonCombIsoPt_
Definition: EwkTauDQM.h:281
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
edm::InputTag vertexSource_
Definition: EwkTauDQM.h:92
bool passesElectronPreId(const reco::GsfElectron &electron)
Definition: EwkTauDQM.cc:1023
edm::InputTag pfMEtSource_
Definition: EwkTauDQM.h:97
EwkMuTauHistManager * muTauHistManager_
Definition: EwkTauDQM.h:48
void endJob()
Definition: EwkTauDQM.cc:71
DQMStore * dqmStore_
Definition: EwkTauDQM.h:269
std::vector< std::string > vstring
Definition: EwkTauDQM.h:107
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:373
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:284
edm::InputTag tauJetSource_
Definition: EwkTauDQM.h:95
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:91
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:318
edm::InputTag triggerResultsSource_
Definition: EwkTauDQM.h:238
MonitorElement * hTauJetEta_
Definition: EwkTauDQM.h:137
edm::InputTag tauDiscrAgainstMuons_
Definition: EwkTauDQM.h:250
MonitorElement * hVisMass_
Definition: EwkTauDQM.h:294
MonitorElement * hMuonTrackIsoPt_
Definition: EwkTauDQM.h:279
unsigned numEventsAnalyzed_
Definition: EwkTauDQM.h:173
long numWarningsTauDiscrAgainstElectrons_
Definition: EwkTauDQM.h:190
EwkTauDQM(const edm::ParameterSet &)
Definition: EwkTauDQM.cc:20
MonitorElement * hElectronPt_
Definition: EwkTauDQM.h:129
MonitorElement * hMtElecPFMEt_
Definition: EwkTauDQM.h:150
double muonEcalIsoCut_
Definition: EwkTauDQM.h:259
long numWarningsTauDiscrByLeadTrackPtCut_
Definition: EwkTauDQM.h:332