CMS 3D CMS Logo

HiggsDQM.cc
Go to the documentation of this file.
2 
3 #include <memory>
4 
5 // Framework
14 
15 // Candidate handling
26 
28 
29 //#include
30 //"HiggsAnalysis/HiggsToZZ4Leptons/plugins/HZZ4LeptonsElectronAssociationMap.h"
31 //#include
32 //"HiggsAnalysis/HiggsToZZ4Leptons/plugins/HZZ4LeptonsMuonAssociationMap.h"
33 
34 // vertexing
35 // Transient tracks
43 
44 // Vertex utilities
46 
47 // Geometry
55 
61 
62 // RECO
63 // Isolation
64 //#include "HiggsAnalysis/HiggsToZZ4Leptons/plugins/CandidateHadIsolation.h"
65 //#include "HiggsAnalysis/HiggsToZZ4Leptons/plugins/CandidateTkIsolation.h"
73 
74 // MET
79 
81 #include "TLorentzVector.h"
82 
83 #include <iostream>
84 #include <iomanip>
85 #include <cstdio>
86 #include <string>
87 #include <sstream>
88 #include <cmath>
89 
90 using namespace edm;
91 using namespace std;
92 using namespace reco;
93 
95  bool operator()(const Candidate& c1, const Candidate& c2) const { return c1.pt() > c2.pt(); }
96 };
97 
98 double HiggsDQM::Distance(const reco::Candidate& c1, const reco::Candidate& c2) { return deltaR(c1, c2); }
99 
101  return deltaPhi(c1.p4().phi(), c2.p4().phi());
102 }
103 
104 // This always returns only a positive deltaPhi
105 double HiggsDQM::calcDeltaPhi(double phi1, double phi2) {
106  double deltaPhi = phi1 - phi2;
107  if (deltaPhi < 0)
108  deltaPhi = -deltaPhi;
109  if (deltaPhi > 3.1415926) {
110  deltaPhi = 2 * 3.1415926 - deltaPhi;
111  }
112  return deltaPhi;
113 }
114 
115 //
116 // -- Constructor
117 //
119  // cout<<"Entering HiggsDQM::HiggsDQM: "<<endl;
120 
121  edm::LogInfo("HZZ4LeptonsDQM") << " Creating HZZ4LeptonsDQM "
122  << "\n";
123 
124  typedef std::vector<edm::InputTag> vtag;
125  // Get parameters from configuration file
126  theElecTriggerPathToPass = ps.getParameter<string>("elecTriggerPathToPass");
127  theMuonTriggerPathToPass = ps.getParameter<string>("muonTriggerPathToPass");
128  theTriggerResultsCollectionTag_ = ps.getParameter<InputTag>("triggerResultsCollection");
129  theCaloJetCollectionLabel_ = ps.getParameter<InputTag>("caloJetCollection");
130  theTriggerResultsCollection_ = consumes<edm::TriggerResults>(theTriggerResultsCollectionTag_);
131  theMuonCollectionToken_ = consumes<reco::MuonCollection>(ps.getParameter<InputTag>("muonCollection"));
132  theElectronCollectionToken_ = consumes<reco::GsfElectronCollection>(ps.getParameter<InputTag>("electronCollection"));
133  theCaloJetCollectionToken_ = consumes<reco::CaloJetCollection>(theCaloJetCollectionLabel_);
134  theCaloMETCollectionToken_ = consumes<reco::CaloMETCollection>(ps.getParameter<InputTag>("caloMETCollection"));
135  thePfMETCollectionToken_ = consumes<reco::PFMETCollection>(ps.getParameter<InputTag>("pfMETCollection"));
136  vertexToken_ = consumes<reco::VertexCollection>(
137  ps.getUntrackedParameter<InputTag>("vertexCollection", InputTag("offlinePrimaryVertices")));
138 
139  // cuts:
140  ptThrMu1_ = ps.getUntrackedParameter<double>("PtThrMu1");
141  ptThrMu2_ = ps.getUntrackedParameter<double>("PtThrMu2");
142 
143  nEvents_ = 0;
144  pi = 3.14159265;
145  // cout<<"...leaving HiggsDQM::HiggsDQM. "<<endl;
146 }
147 //
148 // -- Destructor
149 //
151  // cout<<"Entering HiggsDQM::~HiggsDQM: "<<endl;
152 
153  edm::LogInfo("HiggsDQM") << " Deleting HiggsDQM "
154  << "\n";
155 
156  // cout<<"...leaving HiggsDQM::~HiggsDQM. "<<endl;
157 }
158 
159 //
160 // -- Book histograms
161 //
163  ibooker.setCurrentFolder("Physics/Higgs");
164 
165  h_vertex_number = ibooker.book1D("h_vertex_number", "Number of event vertices in collection", 10, -0.5, 9.5);
166  h_vertex_chi2 = ibooker.book1D("h_vertex_chi2", "Event Vertex #chi^{2}/n.d.o.f.", 100, 0.0, 2.0);
167  h_vertex_numTrks = ibooker.book1D("h_vertex_numTrks", "Event Vertex, number of tracks", 100, -0.5, 99.5);
168  h_vertex_sumTrks = ibooker.book1D("h_vertex_sumTrks", "Event Vertex, sum of track pt", 100, 0.0, 100.0);
169  h_vertex_d0 = ibooker.book1D("h_vertex_d0", "Event Vertex d0", 100, -10.0, 10.0);
170  h_jet_et =
171  ibooker.book1D("h_jet_et",
172  "Jet with highest E_{T} (from " + theCaloJetCollectionLabel_.label() + ");E_{T}(1^{st} jet) (GeV)",
173  20,
174  0.,
175  200.0);
176  h_jet2_et = ibooker.book1D(
177  "h_jet2_et",
178  "Jet with 2^{nd} highest E_{T} (from " + theCaloJetCollectionLabel_.label() + ");E_{T}(2^{nd} jet) (GeV)",
179  20,
180  0.,
181  200.0);
182  h_jet_count = ibooker.book1D("h_jet_count",
183  "Number of " + theCaloJetCollectionLabel_.label() + " (E_{T} > 15 GeV);Number of Jets",
184  8,
185  -0.5,
186  7.5);
187  h_caloMet = ibooker.book1D("h_caloMet", "Calo Missing E_{T}; GeV", 20, 0.0, 100);
188  h_caloMet_phi = ibooker.book1D("h_caloMet_phi", "Calo Missing E_{T} #phi;#phi(MET)", 35, -3.5, 3.5);
189  h_pfMet = ibooker.book1D("h_pfMet", "Pf Missing E_{T}; GeV", 20, 0.0, 100);
190  h_pfMet_phi = ibooker.book1D("h_pfMet_phi", "Pf Missing E_{T} #phi;#phi(MET)", 35, -3.5, 3.5);
191  h_eMultiplicity = ibooker.book1D("NElectrons", "# of electrons per event", 10, 0., 10.);
192  h_mMultiplicity = ibooker.book1D("NMuons", "# of muons per event", 10, 0., 10.);
193  h_ePt = ibooker.book1D("ElePt", "Pt of electrons", 50, 0., 100.);
194  h_eEta = ibooker.book1D("EleEta", "Eta of electrons", 100, -5., 5.);
195  h_ePhi = ibooker.book1D("ElePhi", "Phi of electrons", 100, -3.5, 3.5);
196  h_mPt_GMTM = ibooker.book1D("MuonPt_GMTM", "Pt of global+tracker muons", 50, 0., 100.);
197  h_mEta_GMTM = ibooker.book1D("MuonEta_GMTM", "Eta of global+tracker muons", 60, -3., 3.);
198  h_mPhi_GMTM = ibooker.book1D("MuonPhi_GMTM", "Phi of global+tracker muons", 70, -3.5, 3.5);
199  h_mPt_GMPT = ibooker.book1D("MuonPt_GMPT", "Pt of global prompt-tight muons", 50, 0., 100.);
200  h_mEta_GMPT = ibooker.book1D("MuonEta_GMPT", "Eta of global prompt-tight muons", 60, -3., 3.);
201  h_mPhi_GMPT = ibooker.book1D("MuonPhi_GMPT", "Phi of global prompt-tight muons", 70, -3.5, 3.5);
202  h_mPt_GM = ibooker.book1D("MuonPt_GM", "Pt of global muons", 50, 0., 100.);
203  h_mEta_GM = ibooker.book1D("MuonEta_GM", "Eta of global muons", 60, -3., 3.);
204  h_mPhi_GM = ibooker.book1D("MuonPhi_GM", "Phi of global muons", 70, -3.5, 3.5);
205  h_mPt_TM = ibooker.book1D("MuonPt_TM", "Pt of tracker muons", 50, 0., 100.);
206  h_mEta_TM = ibooker.book1D("MuonEta_TM", "Eta of tracker muons", 60, -3., 3.);
207  h_mPhi_TM = ibooker.book1D("MuonPhi_TM", "Phi of tracker muons", 70, -3.5, 3.5);
208  h_mPt_STAM = ibooker.book1D("MuonPt_STAM", "Pt of STA muons", 50, 0., 100.);
209  h_mEta_STAM = ibooker.book1D("MuonEta_STAM", "Eta of STA muons", 60, -3., 3.);
210  h_mPhi_STAM = ibooker.book1D("MuonPhi_STAM", "Phi of STA muons", 70, -3.5, 3.5);
211  h_eCombIso = ibooker.book1D("EleCombIso", "CombIso of electrons", 100, 0., 10.);
212  h_mCombIso = ibooker.book1D("MuonCombIso", "CombIso of muons", 100, 0., 10.);
213  h_dimumass_GMGM = ibooker.book1D("DimuMass_GMGM", "Invariant mass of GMGM pairs", 100, 0., 200.);
214  h_dimumass_GMTM = ibooker.book1D("DimuMass_GMTM", "Invariant mass of GMTM pairs", 100, 0., 200.);
215  h_dimumass_TMTM = ibooker.book1D("DimuMass_TMTM", "Invariant mass of TMTM pairs", 100, 0., 200.);
216  h_dielemass = ibooker.book1D("DieleMass", "Invariant mass of EE pairs", 100, 0., 200.);
217  h_lepcounts = ibooker.book1D("LeptonCounts", "LeptonCounts for multi lepton events", 49, 0., 49.);
218 
219  ibooker.cd();
220 }
221 //
222 // -- Analyze
223 //
224 void HiggsDQM::analyze(const edm::Event& e, const edm::EventSetup& eSetup) {
225  // cout<<"[HiggsDQM::analyze()] "<<endl;
226 
227  //-------------------------------
228  //--- Trigger Info
229  //-------------------------------
230  // Did it pass certain HLT path?
231  bool passed_electron_HLT = true;
232  bool passed_muon_HLT = true;
233 
234  //-------------------------------
235  //--- Vertex Info
236  //-------------------------------
237  Handle<VertexCollection> vertexHandle;
238  e.getByToken(vertexToken_, vertexHandle);
239  if (vertexHandle.isValid()) {
240  VertexCollection vertexCollection = *(vertexHandle.product());
241  int vertex_number = vertexCollection.size();
242  VertexCollection::const_iterator v = vertexCollection.begin();
243  double vertex_chi2 = v->normalizedChi2(); // v->chi2();
244  double vertex_d0 = sqrt(v->x() * v->x() + v->y() * v->y());
245  // double vertex_ndof = v->ndof();cout << "ndof="<<vertex_ndof<<endl;
246  double vertex_numTrks = v->tracksSize();
247  double vertex_sumTrks = 0.0;
248  for (Vertex::trackRef_iterator vertex_curTrack = v->tracks_begin(); vertex_curTrack != v->tracks_end();
249  vertex_curTrack++) {
250  vertex_sumTrks += (*vertex_curTrack)->pt();
251  }
252  h_vertex_number->Fill(vertex_number);
253  h_vertex_chi2->Fill(vertex_chi2);
254  h_vertex_d0->Fill(vertex_d0);
255  h_vertex_numTrks->Fill(vertex_numTrks);
256  h_vertex_sumTrks->Fill(vertex_sumTrks);
257  }
258 
259  //-------------------------------
260  //--- Electrons
261  //-------------------------------
262  float nEle = 0;
264  e.getByToken(theElectronCollectionToken_, electronCollection);
265  if (electronCollection.isValid()) {
266  int posEle = 0, negEle = 0;
267  // If it passed electron HLT and the collection was found, find electrons
268  // near Z mass
269  if (passed_electron_HLT) {
270  for (reco::GsfElectronCollection::const_iterator recoElectron = electronCollection->begin();
271  recoElectron != electronCollection->end();
272  recoElectron++) {
273  // cout << "Electron with pt= " << recoElectron->pt() << " and
274  // eta" << recoElectron->eta() << " p=" << recoElectron->p() << endl;
275  h_ePt->Fill(recoElectron->pt());
276  h_eEta->Fill(recoElectron->eta());
277  h_ePhi->Fill(recoElectron->phi());
278  if (recoElectron->charge() == 1) {
279  posEle++;
280  } else if (recoElectron->charge() == -1) {
281  negEle++;
282  }
283  // Require electron to pass some basic cuts
284  // if ( recoElectron->et() < 20 || fabs(recoElectron->eta())>2.5 )
285  // continue;
286  // Tighter electron cuts
287  // if ( recoElectron->deltaPhiSuperClusterTrackAtVtx() > 0.58 ||
288  // recoElectron->deltaEtaSuperClusterTrackAtVtx() > 0.01 ||
289  // recoElectron->sigmaIetaIeta() > 0.027 ) continue;
290  } // end of loop over electrons
291  } // end if passed HLT
292  nEle = posEle + negEle;
293  if (nEle > 9.)
294  nEle = 9.;
295  h_eMultiplicity->Fill(nEle);
296 
297  // Z->ee:
298  unsigned int eleCollectionSize = electronCollection->size();
299  for (unsigned int i = 0; i < eleCollectionSize; i++) {
300  const GsfElectron& ele = electronCollection->at(i);
301  double pt = ele.pt();
302  if (pt > ptThrMu1_) {
303  for (unsigned int j = i + 1; j < eleCollectionSize; j++) {
304  const GsfElectron& ele2 = electronCollection->at(j);
305  double pt2 = ele2.pt();
306  if (pt2 > ptThrMu2_) {
307  const math::XYZTLorentzVector ZRecoEE(
308  ele.px() + ele2.px(), ele.py() + ele2.py(), ele.pz() + ele2.pz(), ele.p() + ele2.p());
309  h_dielemass->Fill(ZRecoEE.mass());
310  }
311  }
312  }
313  }
314  }
315 
316  //-------------------------------
317  //--- Muons
318  //-------------------------------
319  float nMu = 0;
321  e.getByToken(theMuonCollectionToken_, muonCollection);
322  if (muonCollection.isValid()) {
323  // Find the highest pt muons
324  int posMu = 0, negMu = 0;
325  TLorentzVector m1, m2;
326  if (passed_muon_HLT) {
327  for (reco::MuonCollection::const_iterator recoMuon = muonCollection->begin(); recoMuon != muonCollection->end();
328  recoMuon++) {
329  // cout << "Muon with pt= " << muIter->pt() << " and eta" <<
330  // muIter->eta() << " p=" << muIter->p() << endl;
331  if (recoMuon->isGlobalMuon() && recoMuon->isTrackerMuon()) {
332  h_mPt_GMTM->Fill(recoMuon->pt());
333  h_mEta_GMTM->Fill(recoMuon->eta());
334  h_mPhi_GMTM->Fill(recoMuon->phi());
335  } else if (recoMuon->isGlobalMuon() && (muon::isGoodMuon((*recoMuon), muon::GlobalMuonPromptTight))) {
336  h_mPt_GMPT->Fill(recoMuon->pt());
337  h_mEta_GMPT->Fill(recoMuon->eta());
338  h_mPhi_GMPT->Fill(recoMuon->phi());
339  } else if (recoMuon->isGlobalMuon()) {
340  h_mPt_GM->Fill(recoMuon->pt());
341  h_mEta_GM->Fill(recoMuon->eta());
342  h_mPhi_GM->Fill(recoMuon->phi());
343  } else if (recoMuon->isTrackerMuon() &&
345  h_mPt_TM->Fill(recoMuon->pt());
346  h_mEta_TM->Fill(recoMuon->eta());
347  h_mPhi_TM->Fill(recoMuon->phi());
348  } else if (recoMuon->isStandAloneMuon()) {
349  h_mPt_STAM->Fill(recoMuon->pt());
350  h_mEta_STAM->Fill(recoMuon->eta());
351  h_mPhi_STAM->Fill(recoMuon->phi());
352  }
353  if (recoMuon->charge() == 1) {
354  posMu++;
355  } else if (recoMuon->charge() == -1) {
356  negMu++;
357  }
358  }
359  nMu = posMu + negMu;
360  if (nMu > 9.)
361  nMu = 9.;
362  h_mMultiplicity->Fill(nMu);
363  }
364 
365  // Z->mumu:
366  unsigned int muonCollectionSize = muonCollection->size();
367  for (unsigned int i = 0; i < muonCollectionSize; i++) {
368  const Muon& mu = muonCollection->at(i);
369  // if (!mu.isGlobalMuon()) continue;
370  double pt = mu.pt();
371  if (pt > ptThrMu1_) {
372  for (unsigned int j = i + 1; j < muonCollectionSize; j++) {
373  const Muon& mu2 = muonCollection->at(j);
374  double pt2 = mu2.pt();
375  if (pt2 > ptThrMu2_) {
376  // Glb + Glb
377  if (mu.isGlobalMuon() && mu2.isGlobalMuon()) {
378  const math::XYZTLorentzVector ZRecoGMGM(
379  mu.px() + mu2.px(), mu.py() + mu2.py(), mu.pz() + mu2.pz(), mu.p() + mu2.p());
380  h_dimumass_GMGM->Fill(ZRecoGMGM.mass());
381  }
382  // Glb + TM
383  else if (mu.isGlobalMuon() && mu2.isTrackerMuon()) {
384  const math::XYZTLorentzVector ZRecoGMTM(
385  mu.px() + mu2.px(), mu.py() + mu2.py(), mu.pz() + mu2.pz(), mu.p() + mu2.p());
386  h_dimumass_GMTM->Fill(ZRecoGMTM.mass());
387  }
388  // TM + TM
389  else if (mu.isTrackerMuon() && mu2.isTrackerMuon()) {
390  const math::XYZTLorentzVector ZRecoTMTM(
391  mu.px() + mu2.px(), mu.py() + mu2.py(), mu.pz() + mu2.pz(), mu.p() + mu2.p());
392  h_dimumass_TMTM->Fill(ZRecoTMTM.mass());
393  }
394  }
395  }
396  }
397  }
398  }
399 
400  //-------------------------------
401  //--- Jets
402  //-------------------------------
404  e.getByToken(theCaloJetCollectionToken_, caloJetCollection);
405  if (caloJetCollection.isValid()) {
406  float jet_et = -8.0;
407  // float jet_eta = -8.0; // UNUSED
408  // float jet_phi = -8.0; // UNUSED
409  int jet_count = 0;
410  float jet2_et = -9.0;
411  // float jet2_eta = -9.0; // UNUSED
412  // float jet2_phi = -9.0; // UNUSED
413  for (CaloJetCollection::const_iterator i_calojet = caloJetCollection->begin();
414  i_calojet != caloJetCollection->end();
415  i_calojet++) {
416  float jet_current_et = i_calojet->et();
417  // if it overlaps with electron, it is not a jet
418  // if ( electron_et>0.0 && fabs(i_calojet->eta()-electron_eta ) < 0.2 &&
419  // calcDeltaPhi(i_calojet->phi(), electron_phi ) < 0.2) continue;
420  // if ( electron2_et>0.0&& fabs(i_calojet->eta()-electron2_eta) < 0.2 &&
421  // calcDeltaPhi(i_calojet->phi(), electron2_phi) < 0.2) continue;
422  // if it has too low Et, throw away
423  if (jet_current_et < 15)
424  continue;
425  jet_count++;
426  if (jet_current_et > jet_et) {
427  jet2_et = jet_et; // 2nd highest jet get's et from current highest
428  // jet2_eta = jet_eta; // UNUSED
429  // jet2_phi = jet_phi; // UNUSED
430  jet_et = i_calojet->et(); // current highest jet gets et from the new
431  // highest
432  // jet_eta = i_calojet->eta(); // UNUSED
433  // jet_phi = i_calojet->phi(); // UNUSED
434  } else if (jet_current_et > jet2_et) {
435  jet2_et = i_calojet->et();
436  // jet2_eta = i_calojet->eta(); // UNUSED
437  // jet2_phi = i_calojet->phi(); // UNUSED
438  }
439  }
440  if (jet_et > 0.0) {
441  h_jet_et->Fill(jet_et);
442  h_jet_count->Fill(jet_count);
443  }
444  }
445 
446  //-------------------------------
447  //--- MET
448  //-------------------------------
450  e.getByToken(theCaloMETCollectionToken_, caloMETCollection);
451  if (caloMETCollection.isValid()) {
452  float caloMet = caloMETCollection->begin()->et();
453  float caloMet_phi = caloMETCollection->begin()->phi();
454  h_caloMet->Fill(caloMet);
455  h_caloMet_phi->Fill(caloMet_phi);
456  }
458  e.getByToken(thePfMETCollectionToken_, pfMETCollection);
459  if (pfMETCollection.isValid()) {
460  float pfMet = pfMETCollection->begin()->et();
461  float pfMet_phi = pfMETCollection->begin()->phi();
462  h_pfMet->Fill(pfMet);
463  h_pfMet_phi->Fill(pfMet_phi);
464  }
465 
466  //-------------------------------------
467  //--- Events with more than 2 leptons:
468  //-------------------------------------
469  if (nMu + nEle > 2 && nMu + nEle < 10) {
470  if (nMu == 0 && nEle == 3)
471  h_lepcounts->Fill(0);
472  if (nMu == 0 && nEle == 4)
473  h_lepcounts->Fill(1);
474  if (nMu == 0 && nEle == 5)
475  h_lepcounts->Fill(2);
476  if (nMu == 0 && nEle == 6)
477  h_lepcounts->Fill(3);
478  if (nMu == 0 && nEle == 7)
479  h_lepcounts->Fill(4);
480  if (nMu == 0 && nEle == 8)
481  h_lepcounts->Fill(5);
482  if (nMu == 0 && nEle == 9)
483  h_lepcounts->Fill(6);
484  if (nMu == 1 && nEle == 2)
485  h_lepcounts->Fill(7);
486  if (nMu == 1 && nEle == 3)
487  h_lepcounts->Fill(8);
488  if (nMu == 1 && nEle == 4)
489  h_lepcounts->Fill(9);
490  if (nMu == 1 && nEle == 5)
491  h_lepcounts->Fill(10);
492  if (nMu == 1 && nEle == 6)
493  h_lepcounts->Fill(11);
494  if (nMu == 1 && nEle == 7)
495  h_lepcounts->Fill(12);
496  if (nMu == 1 && nEle == 8)
497  h_lepcounts->Fill(13);
498  if (nMu == 2 && nEle == 1)
499  h_lepcounts->Fill(14);
500  if (nMu == 2 && nEle == 2)
501  h_lepcounts->Fill(15);
502  if (nMu == 2 && nEle == 3)
503  h_lepcounts->Fill(16);
504  if (nMu == 2 && nEle == 4)
505  h_lepcounts->Fill(17);
506  if (nMu == 2 && nEle == 5)
507  h_lepcounts->Fill(18);
508  if (nMu == 2 && nEle == 6)
509  h_lepcounts->Fill(19);
510  if (nMu == 2 && nEle == 7)
511  h_lepcounts->Fill(20);
512  if (nMu == 3 && nEle == 0)
513  h_lepcounts->Fill(21);
514  if (nMu == 3 && nEle == 1)
515  h_lepcounts->Fill(22);
516  if (nMu == 3 && nEle == 2)
517  h_lepcounts->Fill(23);
518  if (nMu == 3 && nEle == 3)
519  h_lepcounts->Fill(24);
520  if (nMu == 3 && nEle == 4)
521  h_lepcounts->Fill(25);
522  if (nMu == 3 && nEle == 5)
523  h_lepcounts->Fill(26);
524  if (nMu == 3 && nEle == 6)
525  h_lepcounts->Fill(27);
526  if (nMu == 4 && nEle == 0)
527  h_lepcounts->Fill(28);
528  if (nMu == 4 && nEle == 1)
529  h_lepcounts->Fill(29);
530  if (nMu == 4 && nEle == 2)
531  h_lepcounts->Fill(30);
532  if (nMu == 4 && nEle == 3)
533  h_lepcounts->Fill(31);
534  if (nMu == 4 && nEle == 4)
535  h_lepcounts->Fill(32);
536  if (nMu == 4 && nEle == 5)
537  h_lepcounts->Fill(33);
538  if (nMu == 5 && nEle == 0)
539  h_lepcounts->Fill(34);
540  if (nMu == 5 && nEle == 1)
541  h_lepcounts->Fill(35);
542  if (nMu == 5 && nEle == 2)
543  h_lepcounts->Fill(36);
544  if (nMu == 5 && nEle == 3)
545  h_lepcounts->Fill(37);
546  if (nMu == 5 && nEle == 4)
547  h_lepcounts->Fill(38);
548  if (nMu == 6 && nEle == 0)
549  h_lepcounts->Fill(39);
550  if (nMu == 6 && nEle == 1)
551  h_lepcounts->Fill(40);
552  if (nMu == 6 && nEle == 2)
553  h_lepcounts->Fill(41);
554  if (nMu == 6 && nEle == 3)
555  h_lepcounts->Fill(42);
556  if (nMu == 7 && nEle == 0)
557  h_lepcounts->Fill(43);
558  if (nMu == 7 && nEle == 1)
559  h_lepcounts->Fill(44);
560  if (nMu == 7 && nEle == 2)
561  h_lepcounts->Fill(45);
562  if (nMu == 8 && nEle == 0)
563  h_lepcounts->Fill(46);
564  if (nMu == 8 && nEle == 1)
565  h_lepcounts->Fill(47);
566  if (nMu == 9 && nEle == 0)
567  h_lepcounts->Fill(48);
568  }
569  if ((nMu + nEle) >= 10)
570  LogDebug("HiggsDQM") << "WARNING: " << nMu + nEle << " leptons in this event: run=" << e.id().run()
571  << ", event=" << e.id().event() << "\n";
572 }
573 
574 // Local Variables:
575 // show-trailing-whitespace: t
576 // truncate-lines: t
577 // End:
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
double pz() const final
z coordinate of momentum vector
double pt() const final
transverse momentum
bool operator()(const Candidate &c1, const Candidate &c2) const
Definition: HiggsDQM.cc:95
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
virtual double pt() const =0
transverse momentum
T const * product() const
Definition: Handle.h:70
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
~HiggsDQM() override
Definition: HiggsDQM.cc:150
bool isTrackerMuon() const override
Definition: Muon.h:302
const Double_t pi
T getUntrackedParameter(std::string const &, T const &) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double px() const final
x coordinate of momentum vector
double p() const final
magnitude of momentum vector
Definition: Muon.py:1
T sqrt(T t)
Definition: SSEVec.h:19
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
double py() const final
y coordinate of momentum vector
double Distance(const reco::Candidate &c1, const reco::Candidate &c2)
Definition: HiggsDQM.cc:98
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: HiggsDQM.cc:224
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
double calcDeltaPhi(double phi1, double phi2)
Definition: HiggsDQM.cc:105
Log< level::Info, false > LogInfo
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2)
Definition: HiggsDQM.cc:100
bool isValid() const
Definition: HandleBase.h:70
fixed size matrix
HLT enums.
HiggsDQM(const edm::ParameterSet &ps)
Definition: HiggsDQM.cc:118
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HiggsDQM.cc:162
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
bool isGlobalMuon() const override
Definition: Muon.h:301
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
Definition: Run.h:45
#define LogDebug(id)
virtual const LorentzVector & p4() const =0
four-momentum Lorentz vector