CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EwkMuDQM.cc
Go to the documentation of this file.
2 
6 
9 
12 
16 
22 
24 
28 
30 
32 
33 using namespace edm;
34 using namespace std;
35 using namespace reco;
36 
38  :
39  // Input collections
40  metTag_(cfg.getUntrackedParameter<edm::InputTag>("METTag",
41  edm::InputTag("pfmet"))),
42  jetTag_(cfg.getUntrackedParameter<edm::InputTag>(
43  "JetTag", edm::InputTag("ak4PFJets"))),
44  trigTag_(consumes<edm::TriggerResults>(
45  cfg.getUntrackedParameter<edm::InputTag>(
46  "TrigTag", edm::InputTag("TriggerResults::HLT")))),
47  muonTag_(consumes<edm::View<reco::Muon> >(
48  cfg.getUntrackedParameter<edm::InputTag>("MuonTag",
49  edm::InputTag("muons")))),
50  metToken_(consumes<edm::View<reco::MET> >(
51  cfg.getUntrackedParameter<edm::InputTag>("METTag",
52  edm::InputTag("pfmet")))),
53  jetToken_(consumes<edm::View<reco::Jet> >(
54  cfg.getUntrackedParameter<edm::InputTag>(
55  "JetTag", edm::InputTag("ak4PFJets")))),
56  phoTag_(consumes<edm::View<reco::Photon> >(
57  cfg.getUntrackedParameter<edm::InputTag>("phoTag",
58  edm::InputTag("photons")))),
59  vertexTag_(consumes<edm::View<reco::Vertex> >(
60  cfg.getUntrackedParameter<edm::InputTag>(
61  "VertexTag", edm::InputTag("offlinePrimaryVertices")))),
62  beamSpotTag_(
63  consumes<reco::BeamSpot>(cfg.getUntrackedParameter<edm::InputTag>(
64  "beamSpotTag", edm::InputTag("offlineBeamSpot")))),
65  trigPathNames_(cfg.getUntrackedParameter<std::vector<std::string> >(
66  "TrigPathNames")),
67 
68  // Muon quality cuts
69  isAlsoTrackerMuon_(cfg.getUntrackedParameter<bool>(
70  "IsAlsoTrackerMuon", true)), // Glb muon also tracker muon
71  dxyCut_(
72  cfg.getUntrackedParameter<double>("DxyCut", 0.2)), // dxy < 0.2 cm
73  normalizedChi2Cut_(cfg.getUntrackedParameter<double>(
74  "NormalizedChi2Cut", 10.)), // chi2/ndof (of global fit) <10.0
75  trackerHitsCut_(cfg.getUntrackedParameter<int>("TrackerHitsCut",
76  11)), // Tracker Hits >10
77  pixelHitsCut_(
78  cfg.getUntrackedParameter<int>("PixelHitsCut", 1)), // Pixel Hits >0
79  muonHitsCut_(cfg.getUntrackedParameter<int>("MuonHitsCut",
80  1)), // Valid Muon Hits >0
81  nMatchesCut_(cfg.getUntrackedParameter<int>(
82  "NMatchesCut", 2)), // At least 2 Chambers with matches
83 
84  // W-boson cuts
85  isRelativeIso_(cfg.getUntrackedParameter<bool>("IsRelativeIso", true)),
86  isCombinedIso_(cfg.getUntrackedParameter<bool>("IsCombinedIso", false)),
87  isoCut03_(cfg.getUntrackedParameter<double>("IsoCut03", 0.1)),
88  acopCut_(cfg.getUntrackedParameter<double>("AcopCut", 999.)),
89  metMin_(cfg.getUntrackedParameter<double>("MetMin", -999999.)),
90  metMax_(cfg.getUntrackedParameter<double>("MetMax", 999999.)),
91  mtMin_(cfg.getUntrackedParameter<double>("MtMin", 50.)),
92  mtMax_(cfg.getUntrackedParameter<double>("MtMax", 200.)),
93  ptCut_(cfg.getUntrackedParameter<double>("PtCut", 20.)),
94  etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.4)),
95 
96  // Z rejection
97  ptThrForZ1_(cfg.getUntrackedParameter<double>("PtThrForZ1", 20.)),
98  ptThrForZ2_(cfg.getUntrackedParameter<double>("PtThrForZ2", 10.)),
99 
100  // Z selection
101  dimuonMassMin_(cfg.getUntrackedParameter<double>("dimuonMassMin", 80.)),
102  dimuonMassMax_(cfg.getUntrackedParameter<double>("dimuonMassMax", 120.)),
103 
104  // Top rejection
105  eJetMin_(cfg.getUntrackedParameter<double>("EJetMin", 999999.)),
106  nJetMax_(cfg.getUntrackedParameter<int>("NJetMax", 999999)),
107 
108  // Photon cuts
109  ptThrForPhoton_(cfg.getUntrackedParameter<double>("ptThrForPhoton", 5.)),
110  nPhoMax_(cfg.getUntrackedParameter<int>("nPhoMax", 999999)),
111  hltPrescaleProvider_(cfg, consumesCollector(), *this) {
112  isValidHltConfig_ = false;
113 
114 }
115 
116 void EwkMuDQM::dqmBeginRun(const Run& iRun, const EventSetup& iSet) {
117  nall = 0;
118  nsel = 0;
119  nz = 0;
120 
121  nrec = 0;
122  niso = 0;
123  nhlt = 0;
124  nmet = 0;
125 
126  // passed as parameter to HLTConfigProvider::init(), not yet used
127  bool isConfigChanged = false;
128  // isValidHltConfig_ used to short-circuit analyze() in case of problems
130  hltPrescaleProvider_.init(iRun, iSet, "HLT", isConfigChanged);
131 }
132 
134  edm::Run const &, edm::EventSetup const &) {
135 
136  ibooker.setCurrentFolder("Physics/EwkMuDQM");
137 
138  char chtitle[256] = "";
139 
140  pt_before_ = ibooker.book1D("PT_BEFORECUTS",
141  "Muon transverse momentum (global muon) [GeV]", 100, 0., 100.);
142  pt_after_ = ibooker.book1D("PT_AFTERWCUTS",
143  "Muon transverse momentum (global muon) [GeV]", 100, 0., 100.);
144 
145  eta_before_ = ibooker.book1D("ETA_BEFORECUTS",
146  "Muon pseudo-rapidity", 50, -2.5, 2.5);
147  eta_after_ = ibooker.book1D("ETA_AFTERWCUTS",
148  "Muon pseudo-rapidity", 50, -2.5, 2.5);
149 
150  dxy_before_ = ibooker.book1D("DXY_BEFORECUTS",
151  "Muon transverse distance to beam spot [cm]", 100, -0.5, 0.5);
152  dxy_after_ = ibooker.book1D("DXY_AFTERWCUTS",
153  "Muon transverse distance to beam spot [cm]", 100, -0.5, 0.5);
154 
155  goodewkmuon_before_ = ibooker.book1D("GOODEWKMUON_BEFORECUTS",
156  "Quality-muon flag", 2, -0.5, 1.5);
157  goodewkmuon_after_ = ibooker.book1D("GOODEWKMUON_AFTERWCUTS",
158  "Quality-muon flag", 2, -0.5, 1.5);
159 
160  if (isRelativeIso_) {
161  if (isCombinedIso_) {
162  iso_before_ = ibooker.book1D("ISO_BEFORECUTS",
163  "Relative (combined) isolation variable", 100, 0., 1.);
164  iso_after_ = ibooker.book1D("ISO_AFTERWCUTS",
165  "Relative (combined) isolation variable", 100, 0., 1.);
166  } else {
167  iso_before_ = ibooker.book1D("ISO_BEFORECUTS",
168  "Relative (tracker) isolation variable", 100, 0., 1.);
169  iso_after_ = ibooker.book1D("ISO_AFTERWCUTS",
170  "Relative (tracker) isolation variable", 100, 0., 1.);
171  }
172  } else {
173  if (isCombinedIso_) {
174  iso_before_ = ibooker.book1D("ISO_BEFORECUTS",
175  "Absolute (combined) isolation variable [GeV]", 100, 0., 20.);
176  iso_after_ = ibooker.book1D("ISO_AFTERWCUTS",
177  "Absolute (combined) isolation variable [GeV]", 100, 0., 20.);
178  } else {
179  iso_before_ = ibooker.book1D("ISO_BEFORECUTS",
180  "Absolute (tracker) isolation variable [GeV]", 100, 0., 20.);
181  iso_after_ = ibooker.book1D("ISO_AFTERWCUTS",
182  "Absolute (tracker) isolation variable [GeV]", 100, 0., 20.);
183  }
184  }
185 
186  trig_before_ = ibooker.book1D("TRIG_BEFORECUTS",
187  "Trigger response (boolean of muon triggers)", 2, -0.5, 1.5);
188  trig_after_ = ibooker.book1D("TRIG_AFTERWCUTS",
189  "Trigger response (boolean of muon triggers)", 2, -0.5, 1.5);
190 
191  snprintf(chtitle, 255, "Transverse mass (%s) [GeV]", metTag_.label().data());
192  mt_before_ = ibooker.book1D("MT_BEFORECUTS", chtitle, 150, 0., 300.);
193  mt_after_ = ibooker.book1D("MT_AFTERWCUTS", chtitle, 150, 0., 300.);
194 
195  snprintf(chtitle, 255, "Missing transverse energy (%s) [GeV]",
196  metTag_.label().data());
197  met_before_ = ibooker.book1D("MET_BEFORECUTS", chtitle, 100, 0., 200.);
198  met_after_ = ibooker.book1D("MET_AFTERWCUTS", chtitle, 100, 0., 200.);
199  met_afterZ_ = ibooker.book1D("MET_AFTERZCUTS", chtitle, 100, 0., 200.);
200 
201  snprintf(chtitle, 255, "MU-MET (%s) acoplanarity", metTag_.label().data());
202  acop_before_ = ibooker.book1D("ACOP_BEFORECUTS", chtitle, 50, 0., M_PI);
203  acop_after_ = ibooker.book1D("ACOP_AFTERWCUTS", chtitle, 50, 0., M_PI);
204 
205  snprintf(chtitle, 255, "Z selection: muons above %.2f GeV", ptThrForZ1_);
206  n_zselPt1thr_ = ibooker.book1D("NZSELPT1THR", chtitle, 10, -0.5, 9.5);
207  snprintf(chtitle, 255, "Z selection: muons above %.2f GeV", ptThrForZ2_);
208  n_zselPt2thr_ = ibooker.book1D("NZSELPT2THR", chtitle, 10, -0.5, 9.5);
209 
210  snprintf(chtitle, 255, "Number of jets (%s) above %.2f GeV",
211  jetTag_.label().data(), eJetMin_);
212  njets_before_ = ibooker.book1D("NJETS_BEFORECUTS", chtitle, 16, -0.5, 15.5);
213  njets_after_ = ibooker.book1D("NJETS_AFTERWCUTS", chtitle, 16, -0.5, 15.5);
214  njets_afterZ_ = ibooker.book1D("NJETS_AFTERZCUTS", chtitle, 16, -0.5, 15.5);
215 
216  leadingjet_pt_before_ = ibooker.book1D("LEADINGJET_PT_BEFORECUTS",
217  "Leading Jet transverse momentum", 300, 0., 300.);
218  leadingjet_pt_after_ = ibooker.book1D("LEADINGJET_PT_AFTERWCUTS",
219  "Leading Jet transverse momentum", 300, 0., 300.);
220  leadingjet_pt_afterZ_ = ibooker.book1D("LEADINGJET_PT_AFTERZCUTS",
221  "Leading Jet transverse momentum", 300, 0., 300.);
222 
223  leadingjet_eta_before_ = ibooker.book1D("LEADINGJET_ETA_BEFORECUTS",
224  "Leading Jet pseudo-rapidity", 50, -2.5, 2.5);
225  leadingjet_eta_after_ = ibooker.book1D("LEADINGJET_ETA_AFTERWCUTS",
226  "Leading Jet pseudo-rapidity", 50, -2.5, 2.5);
227  leadingjet_eta_afterZ_ = ibooker.book1D("LEADINGJET_ETA_AFTERZCUTS",
228  "Leading Jet pseudo-rapidity", 50, -2.5, 2.5);
229 
230  ptDiffPM_before_ = ibooker.book1D("PTDIFFPM_BEFORE_CUTS",
231  "pt(Muon+)-pt(Muon-) after Z cuts [GeV]", 200, -100., 100.);
232  ptDiffPM_afterZ_ = ibooker.book1D("PTDIFFPM_AFTERZ_CUTS",
233  "pt(Muon+)-pt(Muon-) after Z cuts [GeV]", 200, -100., 100.);
234 
237  pt1_afterZ_ = ibooker.book1D("PT1_AFTERZCUTS",
238  "Muon transverse momentum (global muon) [GeV]", 100, 0., 100.);
239  eta1_afterZ_ = ibooker.book1D("ETA1_AFTERZCUTS",
240  "Muon pseudo-rapidity", 50, -2.5, 2.5);
241  dxy1_afterZ_ = ibooker.book1D("DXY1_AFTERZCUTS",
242  "Muon transverse distance to beam spot [cm]", 100, -0.5, 0.5);
243  goodewkmuon1_afterZ_ = ibooker.book1D("GOODEWKMUON1_AFTERZCUTS",
244  "Quality-muon flag", 2, -0.5, 1.5);
245 
246  if (isRelativeIso_) {
247  if (isCombinedIso_) {
248  iso1_afterZ_ = ibooker.book1D("ISO1_AFTERZCUTS",
249  "Relative (combined) isolation variable", 100, 0., 1.);
250  iso2_afterZ_ = ibooker.book1D("ISO2_AFTERZCUTS",
251  "Relative (combined) isolation variable", 100, 0., 1.);
252  } else {
253  iso1_afterZ_ = ibooker.book1D("ISO1_AFTERZCUTS",
254  "Relative (tracker) isolation variable", 100, 0., 1.);
255  iso2_afterZ_ = ibooker.book1D("ISO2_AFTERZCUTS",
256  "Relative (tracker) isolation variable", 100, 0., 1.);
257  }
258  } else {
259  if (isCombinedIso_) {
260  iso1_afterZ_ = ibooker.book1D("ISO1_AFTERZCUTS",
261  "Absolute (combined) isolation variable [GeV]", 100, 0., 20.);
262  iso2_afterZ_ = ibooker.book1D("ISO2_AFTERZCUTS",
263  "Absolute (combined) isolation variable [GeV]", 100, 0., 20.);
264  } else {
265  iso1_afterZ_ = ibooker.book1D("ISO1_AFTERZCUTS",
266  "Absolute (tracker) isolation variable [GeV]", 100, 0., 20.);
267  iso2_afterZ_ = ibooker.book1D("ISO2_AFTERZCUTS",
268  "Absolute (tracker) isolation variable [GeV]", 100, 0., 20.);
269  }
270  }
271 
272  pt2_afterZ_ = ibooker.book1D("PT2_AFTERZCUTS",
273  "Muon transverse momentum (global muon) [GeV]", 100, 0., 100.);
274  eta2_afterZ_ = ibooker.book1D("ETA2_AFTERZCUTS",
275  "Muon pseudo-rapidity", 50, -2.5, 2.5);
276  dxy2_afterZ_ = ibooker.book1D("DXY2_AFTERZCUTS",
277  "Muon transverse distance to beam spot [cm]", 100, -0.5, 0.5);
278  goodewkmuon2_afterZ_ = ibooker.book1D("GOODEWKMUON2_AFTERZCUTS",
279  "Quality-muon flag", 2, -0.5, 1.5);
280  ztrig_afterZ_ = ibooker.book1D("ZTRIG_AFTERZCUTS",
281  "Trigger response (boolean of muon triggers)", 2, -0.5, 1.5);
282  dimuonmass_before_ = ibooker.book1D("DIMUONMASS_BEFORECUTS",
283  "DiMuonMass (2 globals)", 100, 0, 200);
284  dimuonmass_afterZ_ = ibooker.book1D("DIMUONMASS_AFTERZCUTS",
285  "DiMuonMass (2 globals)", 100, 0, 200);
286  npvs_before_ = ibooker.book1D("NPVs_BEFORECUTS",
287  "Number of Valid Primary Vertices", 51, -0.5, 50.5);
288  npvs_after_ = ibooker.book1D("NPVs_AFTERWCUTS",
289  "Number of Valid Primary Vertices", 51, -0.5, 50.5);
290  npvs_afterZ_ = ibooker.book1D("NPVs_AFTERZCUTS",
291  "Number of Valid Primary Vertices", 51, -0.5, 50.5);
292  muoncharge_before_ = ibooker.book1D("MUONCHARGE_BEFORECUTS",
293  "Muon Charge", 3, -1.5, 1.5);
294  muoncharge_after_ = ibooker.book1D("MUONCHARGE_AFTERWCUTS",
295  "Muon Charge", 3, -1.5, 1.5);
296  muoncharge_afterZ_ = ibooker.book1D("MUONCHARGE_AFTERZCUTS",
297  "Muon Charge", 3, -1.5, 1.5);
298 
299  // Adding these to replace the NZ ones (more useful, since they are more
300  // general?)
301  nmuons_ = ibooker.book1D("NMuons",
302  "Number of muons in the event", 10, -0.5, 9.5);
303  ngoodmuons_ = ibooker.book1D("NGoodMuons",
304  "Number of muons passing the quality criteria", 10, -0.5, 9.5);
305 
306  nph_ = ibooker.book1D("nph", "Number of photons in the event", 20, 0., 20.);
307  phPt_ = ibooker.book1D("phPt", "Photon transverse momentum [GeV]", 100, 0.,1000.);
308  snprintf(chtitle, 255, "Photon pseudorapidity (pT>%4.1f)", ptThrForPhoton_);
309  phEta_ = ibooker.book1D("phEta", chtitle, 100, -2.5, 2.5);
310 }
311 
312 void EwkMuDQM::endRun(const Run& r, const EventSetup& iSet) {}
313 
314 void EwkMuDQM::analyze(const Event& ev, const EventSetup& iSet) {
315 
316  // Muon collection
317  Handle<View<Muon> > muonCollection;
318  if (!ev.getByToken(muonTag_, muonCollection)) {
319  // LogWarning("") << ">>> Muon collection does not exist !!!";
320  return;
321  }
322  unsigned int muonCollectionSize = muonCollection->size();
323 
324  // Beam spot
325  Handle<reco::BeamSpot> beamSpotHandle;
326  if (!ev.getByToken(beamSpotTag_, beamSpotHandle)) {
327  // LogWarning("") << ">>> No beam spot found !!!";
328  return;
329  }
330 
331  // Loop to reject/control Z->mumu is done separately
332  unsigned int nmuonsForZ1 = 0;
333  unsigned int nmuonsForZ2 = 0;
334  bool cosmic = false;
335  for (unsigned int i = 0; i < muonCollectionSize; i++) {
336  const Muon& mu = muonCollection->at(i);
337  if (!mu.isGlobalMuon()) continue;
338  double pt = mu.pt();
339  double dxy = mu.innerTrack()->dxy(beamSpotHandle->position());
340 
341  if (fabs(dxy) > 1) {
342  cosmic = true;
343  break;
344  }
345 
346  if (pt > ptThrForZ1_) nmuonsForZ1++;
347  if (pt > ptThrForZ2_) nmuonsForZ2++;
348 
349  for (unsigned int j = i + 1; j < muonCollectionSize; j++) {
350  const Muon& mu2 = muonCollection->at(j);
351  if (mu2.isGlobalMuon() && (mu.charge() * mu2.charge() == -1)) {
352  const math::XYZTLorentzVector ZRecoGlb(
353  mu.px() + mu2.px(), mu.py() + mu2.py(), mu.pz() + mu2.pz(),
354  mu.p() + mu2.p());
355  dimuonmass_before_->Fill(ZRecoGlb.mass());
356  if (mu.charge() > 0) {
357  ptDiffPM_before_->Fill(mu.pt() - mu2.pt());
358  } else {
359  ptDiffPM_before_->Fill(mu2.pt() - mu.pt());
360  }
361  }
362  }
363  }
364  if (cosmic) return;
365 
366  LogTrace("") << "> Z rejection: muons above " << ptThrForZ1_
367  << " [GeV]: " << nmuonsForZ1;
368  LogTrace("") << "> Z rejection: muons above " << ptThrForZ2_
369  << " [GeV]: " << nmuonsForZ2;
370 
371  // MET
373  if (!ev.getByToken(metToken_, metCollection)) {
374  // LogWarning("") << ">>> MET collection does not exist !!!";
375  return;
376  }
377  const MET& met = metCollection->at(0);
378  double met_et = met.pt();
379  LogTrace("") << ">>> MET, MET_px, MET_py: " << met_et << ", " << met.px()
380  << ", " << met.py() << " [GeV]";
381  met_before_->Fill(met_et);
382 
383  // Vertices in the event
385  if (!ev.getByToken(vertexTag_, vertexCollection)) {
386  LogError("") << ">>> Vertex collection does not exist !!!";
387  return;
388  }
389  unsigned int vertexCollectionSize = vertexCollection->size();
390 
391  int nvvertex = 0;
392  for (unsigned int i = 0; i < vertexCollectionSize; i++) {
393  const Vertex& vertex = vertexCollection->at(i);
394  if (vertex.isValid()) nvvertex++;
395  }
396 
397  npvs_before_->Fill(nvvertex);
398 
399  bool trigger_fired = false;
401  if (!ev.getByToken(trigTag_, triggerResults)) {
402  // LogWarning("") << ">>> TRIGGER collection does not exist !!!";
403  return;
404  }
405  const edm::TriggerNames& trigNames = ev.triggerNames(*triggerResults);
406  // LogWarning("")<<"Loop over triggers";
407 
408  HLTConfigProvider const& hltConfigProvider = hltPrescaleProvider_.hltConfigProvider();
409 
410  /* change faulty logic of triggering
411  for (unsigned int i=0; i<triggerResults->size(); i++)
412  {
413  const std::string trigName = trigNames.triggerName(i);
414 
415  bool found=false;
416  for(unsigned int index=0; index<trigPathNames_.size() && found==false;
417  index++) {
418  size_t trigPath = trigName.find(trigPathNames_[index]); // 0 if
419  found, pos if not
420  if (trigPath==0) found=true;
421  }
422  if(!found) {continue;}
423 
424  bool prescaled=false;
425  for (unsigned int ps= 0; ps< hltConfigProvider.prescaleSize();
426  ps++){
427  const unsigned int prescaleValue =
428  hltConfigProvider.prescaleValue(ps, trigName) ;
429  if (prescaleValue != 1) prescaled =true;
430  }
431 
432  if( triggerResults->accept(i) && !prescaled){ trigger_fired=true;}
433  // LogWarning("")<<"TrigNo: "<<i<<" "<<found<<"
434  "<<trigName<<" ---> FIRED";}
435  }
436  */
437 
438  // get the prescale set for this event
439  const int prescaleSet = hltPrescaleProvider_.prescaleSet(ev, iSet);
440  if (prescaleSet == -1) {
441  LogTrace("") << "Failed to determine prescaleSet\n";
442  // std::cout << "Failed to determine prescaleSet. Check the GlobalTag in
443  // cfg\n";
444  return;
445  }
446 
447  for (unsigned int i = 0;
448  (i < triggerResults->size()) && (trigger_fired == false); i++) {
449  // skip trigger, if it did not fire
450  if (!triggerResults->accept(i)) continue;
451 
452  // skip trigger, if it is not on our list
453  bool found = false;
454  const std::string trigName = trigNames.triggerName(i);
455  for (unsigned int index = 0;
456  index < trigPathNames_.size() && found == false; index++) {
457  if (trigName.find(trigPathNames_.at(index)) == 0) found = true;
458  }
459  if (!found) continue;
460 
461  // skip trigger, if it is prescaled
462  if (prescaleSet != -1) {
463  if (hltConfigProvider.prescaleValue(prescaleSet, trigName) != 1)
464  continue;
465  } else {
466  // prescaleSet is not known.
467  // This branch is not needed, if prescaleSet=-1 forces to skip event
468  int prescaled = 0;
469  for (unsigned int ps = 0;
470  !prescaled && (ps < hltConfigProvider.prescaleSize()); ++ps) {
471  if (hltConfigProvider.prescaleValue(ps, trigName) != 1) {
472  prescaled = 1;
473  }
474  }
475  if (prescaled) {
476  // std::cout << "trigger prescaled\n";
477  continue;
478  }
479  }
480 
481  // std::cout << "found unprescaled trigger that fired: " << trigName <<
482  // "\n";
483  trigger_fired = true;
484  }
485  // if (trigger_fired) std::cout << "\n\tGot Trigger\n";
486 
487  trig_before_->Fill(trigger_fired);
488 
489  // Jet collection
490  Handle<View<Jet> > jetCollection;
491  if (!ev.getByToken(jetToken_, jetCollection)) {
492  // LogError("") << ">>> JET collection does not exist !!!";
493  return;
494  }
495  unsigned int jetCollectionSize = jetCollection->size();
496  int njets = 0;
497  int LEADJET = -1;
498  double max_pt = 0;
499  for (unsigned int i = 0; i < jetCollectionSize; i++) {
500  const Jet& jet = jetCollection->at(i);
501  double minDistance = 99999; // This is in order to use PFJets
502  for (unsigned int j = 0; j < muonCollectionSize; j++) {
503  const Muon& mu = muonCollection->at(j);
504  double distance = sqrt((mu.eta() - jet.eta()) * (mu.eta() - jet.eta()) +
505  (mu.phi() - jet.phi()) * (mu.phi() - jet.phi()));
506  if (minDistance > distance) minDistance = distance;
507  }
508  if (minDistance < 0.3)
509  continue; // 0.3 is the isolation cone around the muon
510  if (jet.et() > max_pt) {
511  LEADJET = i;
512  max_pt = jet.et();
513  }
514  if (jet.et() > eJetMin_) {
515  njets++;
516  }
517  }
518 
519  LogTrace("") << ">>> Total number of jets: " << jetCollectionSize;
520  LogTrace("") << ">>> Number of jets above " << eJetMin_
521  << " [GeV]: " << njets;
522  njets_before_->Fill(njets);
523  double lead_jet_pt = -1;
524  double lead_jet_eta = -100;
525  if (LEADJET != -1) {
526  const Jet& leadJet = jetCollection->at(LEADJET);
527  leadingjet_pt_before_->Fill(leadJet.pt());
528  leadingjet_eta_before_->Fill(leadJet.eta());
529  lead_jet_pt = leadJet.pt();
530  lead_jet_eta = leadJet.eta();
531  }
532  // Photon Collection
533  Handle<View<Photon> > photonCollection;
534  if (!ev.getByToken(phoTag_, photonCollection)) {
535  // LogError("")
536  return;
537  }
538  unsigned int ngam = 0;
539 
540  for (unsigned int i = 0; i < photonCollection->size(); i++) {
541  const Photon& ph = photonCollection->at(i);
542  double photonPt = ph.pt();
543  if (photonPt > ptThrForPhoton_) {
544  ngam++;
545  phEta_->Fill(ph.eta());
546  }
547  phPt_->Fill(photonPt);
548  }
549  nph_->Fill(ngam);
550  LogTrace("") << " >>> N photons " << ngam << std::endl;
551 
552  nmuons_->Fill(muonCollectionSize);
553 
554  // Start counting
555  nall++;
556 
557  // Histograms per event should be done only once, so keep track of them
558  bool hlt_hist_done = false;
559  bool zhlt_hist_done = false;
560  bool zjets_hist_done = false;
561  bool zfullsel_hist_done = false;
562  bool met_hist_done = false;
563  bool njets_hist_done = false;
564  bool wfullsel_hist_done = false;
565 
566  // Central W->mu nu selection criteria
567  const int NFLAGS = 11;
568  bool muon_sel[NFLAGS];
569  const int NFLAGSZ = 13;
570  bool zmuon_sel[NFLAGSZ];
571  bool muon4Z = false;
572 
573  double number_of_muons = 0;
574  double number_of_goodMuons = 0;
575 
576  for (unsigned int i = 0; i < muonCollectionSize; i++) {
577  for (int j = 0; j < NFLAGS; ++j) {
578  muon_sel[j] = false;
579  }
580 
581  number_of_muons++;
582 
583  const Muon& mu = muonCollection->at(i);
584  if (!mu.isGlobalMuon()) continue;
585  if (mu.globalTrack().isNull()) continue;
586  if (mu.innerTrack().isNull()) continue;
587 
588  LogTrace("") << "> Wsel: processing muon number " << i << "...";
589  reco::TrackRef gm = mu.globalTrack();
590  reco::TrackRef tk = mu.innerTrack();
591 
592  // Pt,eta cuts
593  double pt = mu.pt();
594  double eta = mu.eta();
595  LogTrace("") << "\t... pt, eta: " << pt << " [GeV], " << eta;
596  ;
597  if (pt > ptCut_) muon_sel[0] = true;
598  if (fabs(eta) < etaCut_) muon_sel[1] = true;
599 
600  double charge = mu.charge();
601 
602  // d0, chi2, nhits quality cuts
603  double dxy = gm->dxy(beamSpotHandle->position());
604  double normalizedChi2 = gm->normalizedChi2();
605  double trackerHits = tk->hitPattern().numberOfValidTrackerHits();
606  int pixelHits = tk->hitPattern().numberOfValidPixelHits();
607  int muonHits = gm->hitPattern().numberOfValidMuonHits();
608  int nMatches = mu.numberOfMatches();
609 
610  LogTrace("") << "\t... dxy, normalizedChi2, trackerHits, isTrackerMuon?: "
611  << dxy << " [cm], " << normalizedChi2 << ", " << trackerHits
612  << ", " << mu.isTrackerMuon();
613  if (fabs(dxy) < dxyCut_) muon_sel[2] = true;
614 
615  bool quality = true;
616 
617  if (normalizedChi2 > normalizedChi2Cut_) quality = false;
618  if (trackerHits < trackerHitsCut_) quality = false;
619  if (pixelHits < pixelHitsCut_) quality = false;
620  if (muonHits < muonHitsCut_) quality = false;
621  ;
622  if (!mu.isTrackerMuon()) quality = false;
623  if (nMatches < nMatchesCut_) quality = false;
624  muon_sel[3] = quality;
625  if (quality) number_of_goodMuons++;
626 
627  pt_before_->Fill(pt);
628  eta_before_->Fill(eta);
629  dxy_before_->Fill(dxy);
630  muoncharge_before_->Fill(charge);
631  goodewkmuon_before_->Fill(quality);
632 
633  // Charge asymmetry
634  // if (quality) {
635  // if (charge>0) ptPlus_before_->Fill(pt);
636  // if (charge<0) ptMinus_before_->Fill(pt);
637  //}
638 
639  // Isolation cuts
640  double isovar = mu.isolationR03().sumPt;
641  if (isCombinedIso_) {
642  isovar += mu.isolationR03().emEt;
643  isovar += mu.isolationR03().hadEt;
644  }
645  if (isRelativeIso_) isovar /= pt;
646  if (isovar < isoCut03_) muon_sel[4] = true;
647 
648  LogTrace("") << "\t... isolation value" << isovar << ", isolated? "
649  << muon_sel[6];
650  iso_before_->Fill(isovar);
651 
652  // HLT (not mtched to muon for the time being)
653  if (trigger_fired) muon_sel[5] = true;
654 
655  // For Z:
656  if (pt > ptThrForZ1_ && fabs(eta) < etaCut_ && fabs(dxy) < dxyCut_ &&
657  quality && trigger_fired && isovar < isoCut03_) {
658  muon4Z = true;
659  }
660 
661  // MET/MT cuts
662  double w_et = met_et + mu.pt();
663  double w_px = met.px() + mu.px();
664  double w_py = met.py() + mu.py();
665 
666  double massT = w_et * w_et - w_px * w_px - w_py * w_py;
667  massT = (massT > 0) ? sqrt(massT) : 0;
668 
669  LogTrace("") << "\t... W mass, W_et, W_px, W_py: " << massT << ", " << w_et
670  << ", " << w_px << ", " << w_py << " [GeV]";
671  if (massT > mtMin_ && massT < mtMax_) muon_sel[6] = true;
672  mt_before_->Fill(massT);
673  if (met_et > metMin_ && met_et < metMax_) muon_sel[7] = true;
674 
675  // Acoplanarity cuts
676  Geom::Phi<double> deltaphi(mu.phi() - atan2(met.py(), met.px()));
677  double acop = deltaphi.value();
678  if (acop < 0) acop = -acop;
679  acop = M_PI - acop;
680  LogTrace("") << "\t... acoplanarity: " << acop;
681  if (acop < acopCut_) muon_sel[8] = true;
682  acop_before_->Fill(acop);
683 
684  // Remaining flags (from global event information)
685  if (nmuonsForZ1 < 1 || nmuonsForZ2 < 2) muon_sel[9] = true;
686  if (njets <= nJetMax_) muon_sel[10] = true;
687 
688  // Collect necessary flags "per muon"
689  int flags_passed = 0;
690  for (int j = 0; j < NFLAGS; ++j) {
691  if (muon_sel[j]) flags_passed += 1;
692  }
693 
694  // Do N-1 histograms now (and only once for global event quantities)
695  if (flags_passed >= (NFLAGS - 1)) {
696  if (!muon_sel[0] || flags_passed == NFLAGS) pt_after_->Fill(pt);
697  if (!muon_sel[1] || flags_passed == NFLAGS) eta_after_->Fill(eta);
698  if (!muon_sel[2] || flags_passed == NFLAGS) dxy_after_->Fill(dxy);
699  if (!muon_sel[3] || flags_passed == NFLAGS)
700  goodewkmuon_after_->Fill(quality);
701  if (!muon_sel[4] || flags_passed == NFLAGS) iso_after_->Fill(isovar);
702  if (!muon_sel[5] || flags_passed == NFLAGS)
703  if (!hlt_hist_done) trig_after_->Fill(trigger_fired);
704  hlt_hist_done = true;
705  if (!muon_sel[6] || flags_passed == NFLAGS) mt_after_->Fill(massT);
706  if (!muon_sel[7] || flags_passed == NFLAGS)
707  if (!met_hist_done) met_after_->Fill(met_et);
708  met_hist_done = true;
709  if (!muon_sel[8] || flags_passed == NFLAGS) acop_after_->Fill(acop);
710  // no action here for muon_sel[9]
711  if (!muon_sel[10] || flags_passed == NFLAGS) {
712  if (!njets_hist_done) {
713  njets_after_->Fill(njets);
714  leadingjet_pt_after_->Fill(lead_jet_pt);
715  leadingjet_eta_after_->Fill(lead_jet_eta);
716  }
717  njets_hist_done = true;
718  }
719  if (flags_passed == NFLAGS) {
720  if (!wfullsel_hist_done) {
721  npvs_after_->Fill(nvvertex);
722  muoncharge_after_->Fill(charge);
723  // if (charge>0) ptPlus_afterW_->Fill(pt);
724  // if (charge<0) ptMinus_afterW_->Fill(pt);
725  }
726  wfullsel_hist_done = true;
727  }
728  }
729 
730  // The cases in which the event is rejected as a Z are considered
731  // independently:
732  if (muon4Z && !muon_sel[9]) {
733 
734  // Plots for 2 muons
735  for (unsigned int j = i + 1; j < muonCollectionSize; j++) {
736 
737  for (int ij = 0; ij < NFLAGSZ; ++ij) {
738  zmuon_sel[ij] = false;
739  }
740 
741  for (int ji = 0; ji < 5; ++ji) {
742  zmuon_sel[ji] = muon_sel[ji];
743  }
744 
745  const Muon& mu2 = muonCollection->at(j);
746  if (!mu2.isGlobalMuon()) continue;
747  if (mu2.charge() * charge != -1) continue;
748  reco::TrackRef gm2 = mu2.globalTrack();
749  reco::TrackRef tk2 = mu2.innerTrack();
750  double pt2 = mu2.pt();
751  if (pt2 > ptThrForZ2_) zmuon_sel[5] = true;
752  double eta2 = mu2.eta();
753  if (fabs(eta2) < etaCut_) zmuon_sel[6] = true;
754  double dxy2 = gm2->dxy(beamSpotHandle->position());
755  if (fabs(dxy2) < dxyCut_) zmuon_sel[7] = true;
756  double normalizedChi22 = gm2->normalizedChi2();
757  double trackerHits2 = tk2->hitPattern().numberOfValidTrackerHits();
758  int pixelHits2 = tk2->hitPattern().numberOfValidPixelHits();
759  int muonHits2 = gm2->hitPattern().numberOfValidMuonHits();
760  int nMatches2 = mu2.numberOfMatches();
761  bool quality2 = true;
762  if (normalizedChi22 > normalizedChi2Cut_) quality2 = false;
763  if (trackerHits2 < trackerHitsCut_) quality2 = false;
764  if (pixelHits2 < pixelHitsCut_) quality2 = false;
765  if (muonHits2 < muonHitsCut_) quality2 = false;
766  if (!mu2.isTrackerMuon()) quality2 = false;
767  if (nMatches2 < nMatchesCut_) quality2 = false;
768  zmuon_sel[8] = quality2;
769  double isovar2 = mu2.isolationR03().sumPt;
770  if (isCombinedIso_) {
771  isovar2 += mu2.isolationR03().emEt;
772  isovar2 += mu2.isolationR03().hadEt;
773  }
774  if (isRelativeIso_) isovar2 /= pt2;
775  if (isovar2 < isoCut03_) zmuon_sel[9] = true;
776  if (trigger_fired) zmuon_sel[10] = true;
777  const math::XYZTLorentzVector ZRecoGlb(
778  mu.px() + mu2.px(), mu.py() + mu2.py(), mu.pz() + mu2.pz(),
779  mu.p() + mu2.p());
780  if (ZRecoGlb.mass() > dimuonMassMin_ &&
781  ZRecoGlb.mass() < dimuonMassMax_)
782  zmuon_sel[11] = true;
783 
784  // jet flag
785  if (njets <= nJetMax_) zmuon_sel[12] = true;
786 
787  // start filling histos: N-1 plots
788  int flags_passed_z = 0;
789 
790  for (int jj = 0; jj < NFLAGSZ; ++jj) {
791  if (zmuon_sel[jj]) ++flags_passed_z;
792  }
793 
794  if (flags_passed_z >= (NFLAGSZ - 1)) {
795  if (!zmuon_sel[0] || flags_passed_z == NFLAGSZ) {
796  pt1_afterZ_->Fill(pt);
797  }
798  if (!zmuon_sel[1] || flags_passed_z == NFLAGSZ) {
799  eta1_afterZ_->Fill(eta);
800  }
801  if (!zmuon_sel[2] || flags_passed_z == NFLAGSZ) {
802  dxy1_afterZ_->Fill(dxy);
803  }
804  if (!zmuon_sel[3] || flags_passed_z == NFLAGSZ) {
805  goodewkmuon1_afterZ_->Fill(quality);
806  }
807  if (!zmuon_sel[4] || flags_passed_z == NFLAGSZ) {
808  iso1_afterZ_->Fill(isovar);
809  }
810  if (!zmuon_sel[5] || flags_passed_z == NFLAGSZ) {
811  pt2_afterZ_->Fill(pt2);
812  }
813  if (!zmuon_sel[6] || flags_passed_z == NFLAGSZ) {
814  eta2_afterZ_->Fill(eta2);
815  }
816  if (!zmuon_sel[7] || flags_passed_z == NFLAGSZ) {
817  dxy2_afterZ_->Fill(dxy2);
818  }
819  if (!zmuon_sel[8] || flags_passed_z == NFLAGSZ) {
820  goodewkmuon2_afterZ_->Fill(quality2);
821  }
822  if (!zmuon_sel[9] || flags_passed_z == NFLAGSZ) {
823  iso2_afterZ_->Fill(isovar2);
824  }
825  if (!zmuon_sel[10] || flags_passed_z == NFLAGSZ) {
826  if (!zhlt_hist_done) ztrig_afterZ_->Fill(trigger_fired);
827  zhlt_hist_done = true;
828  }
829  if (!zmuon_sel[11] || flags_passed_z == NFLAGSZ) {
830  dimuonmass_afterZ_->Fill(ZRecoGlb.mass());
831  }
832  if (!zmuon_sel[12] || flags_passed_z == NFLAGSZ) {
833  if (!zjets_hist_done) {
834  njets_afterZ_->Fill(njets);
835  leadingjet_pt_afterZ_->Fill(lead_jet_pt);
836  leadingjet_eta_afterZ_->Fill(lead_jet_eta);
837  }
838  zjets_hist_done = true;
839  }
840  if (flags_passed_z == NFLAGSZ) {
841  met_afterZ_->Fill(met_et);
842  if (!zfullsel_hist_done) {
843  npvs_afterZ_->Fill(nvvertex);
844  muoncharge_afterZ_->Fill(charge);
845  if (charge > 0) {
846  // ptPlus_afterZ_->Fill(mu.pt());
847  // ptMinus_afterZ_->Fill(mu2.pt());
848  ptDiffPM_afterZ_->Fill(mu.pt() - mu2.pt());
849  } else {
850  // ptPlus_afterZ_->Fill(mu2.pt());
851  // ptMinus_afterZ_->Fill(mu.pt());
852  ptDiffPM_afterZ_->Fill(mu2.pt() - mu.pt());
853  }
854  }
855  zfullsel_hist_done = true;
856  }
857  }
858  }
859  }
860  }
861 
862  if (zfullsel_hist_done) {
863  // here was a Z candidate
864  n_zselPt1thr_->Fill(nmuonsForZ1);
865  n_zselPt2thr_->Fill(nmuonsForZ2);
866  }
867 
868  // nmuons_->Fill(number_of_muons);
869  // nmuons_->Fill(muonCollectionSize);
870  ngoodmuons_->Fill(number_of_goodMuons);
871 
872  return;
873 }
874 
875 // Local Variables:
876 // show-trailing-whitespace: t
877 // truncate-lines: t
878 // End:
MonitorElement * met_before_
Definition: EwkMuDQM.h:112
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
int i
Definition: DBlmapReader.cc:9
MonitorElement * ptDiffPM_afterZ_
Definition: EwkMuDQM.h:134
double etaCut_
Definition: EwkMuDQM.h:73
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:215
MonitorElement * dimuonmass_afterZ_
Definition: EwkMuDQM.h:154
unsigned int nall
Definition: EwkMuDQM.h:90
int nMatchesCut_
Definition: EwkMuDQM.h:60
MonitorElement * phEta_
Definition: EwkMuDQM.h:172
tuple cfg
Definition: looper.py:293
EwkMuDQM(const edm::ParameterSet &)
Definition: EwkMuDQM.cc:37
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
MonitorElement * njets_afterZ_
Definition: EwkMuDQM.h:119
unsigned int nrec
Definition: EwkMuDQM.h:91
MonitorElement * iso2_afterZ_
Definition: EwkMuDQM.h:146
double mtMax_
Definition: EwkMuDQM.h:70
MonitorElement * npvs_before_
Definition: EwkMuDQM.h:156
double ptThrForPhoton_
Definition: EwkMuDQM.h:84
virtual TrackRef innerTrack() const
Definition: Muon.h:48
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
MonitorElement * dxy1_afterZ_
Definition: EwkMuDQM.h:139
MonitorElement * njets_before_
Definition: EwkMuDQM.h:117
MonitorElement * dxy_before_
Definition: EwkMuDQM.h:102
MonitorElement * ztrig_afterZ_
Definition: EwkMuDQM.h:152
MonitorElement * trig_before_
Definition: EwkMuDQM.h:108
MonitorElement * trig_after_
Definition: EwkMuDQM.h:109
MonitorElement * leadingjet_eta_afterZ_
Definition: EwkMuDQM.h:125
double metMax_
Definition: EwkMuDQM.h:68
bool isTrackerMuon() const
Definition: Muon.h:223
MonitorElement * muoncharge_before_
Definition: EwkMuDQM.h:160
Base class for all types of Jets.
Definition: Jet.h:20
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:60
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
Definition: EwkMuDQM.h:51
MonitorElement * eta2_afterZ_
Definition: EwkMuDQM.h:143
edm::EDGetTokenT< edm::TriggerResults > trigTag_
Definition: EwkMuDQM.h:45
double ptCut_
Definition: EwkMuDQM.h:72
double isoCut03_
Definition: EwkMuDQM.h:64
MonitorElement * npvs_afterZ_
Definition: EwkMuDQM.h:158
bool isGlobalMuon() const
Definition: Muon.h:222
virtual double phi() const final
momentum azimuthal angle
MonitorElement * leadingjet_eta_before_
Definition: EwkMuDQM.h:123
bool ev
std::vector< std::string > trigPathNames_
Definition: EwkMuDQM.h:52
double eJetMin_
Definition: EwkMuDQM.h:81
MonitorElement * acop_before_
Definition: EwkMuDQM.h:114
MonitorElement * leadingjet_pt_after_
Definition: EwkMuDQM.h:121
tuple vertexCollection
MonitorElement * goodewkmuon_before_
Definition: EwkMuDQM.h:104
MonitorElement * eta_after_
Definition: EwkMuDQM.h:101
MonitorElement * muoncharge_afterZ_
Definition: EwkMuDQM.h:162
MonitorElement * pt_before_
Definition: EwkMuDQM.h:98
unsigned int nhlt
Definition: EwkMuDQM.h:93
MonitorElement * dxy2_afterZ_
Definition: EwkMuDQM.h:144
void Fill(long long x)
MonitorElement * leadingjet_pt_before_
Definition: EwkMuDQM.h:120
MonitorElement * goodewkmuon1_afterZ_
Definition: EwkMuDQM.h:140
MonitorElement * iso_before_
Definition: EwkMuDQM.h:106
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
MonitorElement * npvs_after_
Definition: EwkMuDQM.h:157
MonitorElement * goodewkmuon2_afterZ_
Definition: EwkMuDQM.h:145
unsigned int prescaleValue(unsigned int set, const std::string &trigger) const
HLT prescale value in specific prescale set for a specific trigger path.
MonitorElement * njets_after_
Definition: EwkMuDQM.h:118
virtual void endRun(const edm::Run &, const edm::EventSetup &)
Definition: EwkMuDQM.cc:312
MonitorElement * ngoodmuons_
Definition: EwkMuDQM.h:165
MonitorElement * n_zselPt2thr_
Definition: EwkMuDQM.h:150
double metMin_
Definition: EwkMuDQM.h:67
MonitorElement * pt2_afterZ_
Definition: EwkMuDQM.h:142
double ptThrForZ2_
Definition: EwkMuDQM.h:76
int nJetMax_
Definition: EwkMuDQM.h:82
Definition: MET.h:42
T sqrt(T t)
Definition: SSEVec.h:18
unsigned int nsel
Definition: EwkMuDQM.h:95
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
MonitorElement * met_afterZ_
Definition: EwkMuDQM.h:136
virtual int charge() const final
electric charge
Definition: LeafCandidate.h:91
double dxyCut_
Definition: EwkMuDQM.h:55
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * leadingjet_eta_after_
Definition: EwkMuDQM.h:124
int j
Definition: DBlmapReader.cc:9
double dimuonMassMin_
Definition: EwkMuDQM.h:78
virtual double py() const final
y coordinate of momentum vector
const int mu
Definition: Constants.h:22
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: EwkMuDQM.cc:133
bool isCombinedIso_
Definition: EwkMuDQM.h:63
double dimuonMassMax_
Definition: EwkMuDQM.h:79
static std::string const triggerResults
Definition: EdmProvDump.cc:41
MonitorElement * mt_after_
Definition: EwkMuDQM.h:111
MonitorElement * goodewkmuon_after_
Definition: EwkMuDQM.h:105
MonitorElement * muoncharge_after_
Definition: EwkMuDQM.h:161
MonitorElement * mt_before_
Definition: EwkMuDQM.h:110
bool isNull() const
Checks for null.
Definition: Ref.h:249
virtual double pz() const final
z coordinate of momentum vector
#define LogTrace(id)
MonitorElement * eta_before_
Definition: EwkMuDQM.h:100
MonitorElement * iso1_afterZ_
Definition: EwkMuDQM.h:141
bool isRelativeIso_
Definition: EwkMuDQM.h:62
#define M_PI
int prescaleSet(const edm::Event &iEvent, const edm::EventSetup &iSetup)
T value() const
Explicit access to value in case implicit conversion not OK.
Definition: Phi.h:38
HLTPrescaleProvider hltPrescaleProvider_
Definition: EwkMuDQM.h:88
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:74
edm::InputTag jetTag_
Definition: EwkMuDQM.h:44
int pixelHitsCut_
Definition: EwkMuDQM.h:58
edm::EDGetTokenT< edm::View< reco::Vertex > > vertexTag_
Definition: EwkMuDQM.h:50
MonitorElement * nmuons_
Definition: EwkMuDQM.h:164
double normalizedChi2Cut_
Definition: EwkMuDQM.h:56
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
edm::InputTag metTag_
Definition: EwkMuDQM.h:43
MonitorElement * pt_after_
Definition: EwkMuDQM.h:99
MonitorElement * iso_after_
Definition: EwkMuDQM.h:107
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Definition: EwkMuDQM.cc:116
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
MonitorElement * eta1_afterZ_
Definition: EwkMuDQM.h:138
MonitorElement * ptDiffPM_before_
Definition: EwkMuDQM.h:129
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
MonitorElement * pt1_afterZ_
Definition: EwkMuDQM.h:137
virtual double p() const final
magnitude of momentum vector
HLTConfigProvider const & hltConfigProvider() const
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * nph_
Definition: EwkMuDQM.h:168
int trackerHitsCut_
Definition: EwkMuDQM.h:57
double mtMin_
Definition: EwkMuDQM.h:69
unsigned int nz
Definition: EwkMuDQM.h:96
MonitorElement * phPt_
Definition: EwkMuDQM.h:170
double ptThrForZ1_
Definition: EwkMuDQM.h:75
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
Definition: EwkMuDQM.h:48
MonitorElement * dxy_after_
Definition: EwkMuDQM.h:103
unsigned int prescaleSize() const
virtual double px() const final
x coordinate of momentum vector
virtual double et() const final
transverse energy
int muonHitsCut_
Definition: EwkMuDQM.h:59
virtual double eta() const final
momentum pseudorapidity
MonitorElement * met_after_
Definition: EwkMuDQM.h:113
string metCollection
Definition: MT2Analyzer.py:460
volatile std::atomic< bool > shutdown_flag false
edm::EDGetTokenT< edm::View< reco::Muon > > muonTag_
Definition: EwkMuDQM.h:46
MonitorElement * n_zselPt1thr_
Definition: EwkMuDQM.h:149
unsigned int niso
Definition: EwkMuDQM.h:92
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: EwkMuDQM.cc:314
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: EwkMuDQM.h:47
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
edm::EDGetTokenT< edm::View< reco::Photon > > phoTag_
Definition: EwkMuDQM.h:49
MonitorElement * dimuonmass_before_
Definition: EwkMuDQM.h:153
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
Definition: Run.h:43
double acopCut_
Definition: EwkMuDQM.h:66
unsigned int nmet
Definition: EwkMuDQM.h:94
virtual double pt() const final
transverse momentum
bool isValidHltConfig_
Definition: EwkMuDQM.h:87
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:54
MonitorElement * leadingjet_pt_afterZ_
Definition: EwkMuDQM.h:122
MonitorElement * acop_after_
Definition: EwkMuDQM.h:115