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