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