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