CMS 3D CMS Logo

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