CMS 3D CMS Logo

LepHTMonitor.cc
Go to the documentation of this file.
8 
31 
32 #include <limits>
33 #include <algorithm>
34 
35 class LepHTMonitor : public DQMEDAnalyzer, public TriggerDQMBase {
36 public:
39 
41  ~LepHTMonitor() throw() override;
42 
43 protected:
44  void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override;
45  void analyze(const edm::Event &e, const edm::EventSetup &eSetup) override;
46 
47 private:
49  edm::EDGetTokenT<edm::View<reco::GsfElectron> > theElectronCollection_;
51  edm::EDGetTokenT<edm::ValueMap<bool> > theElectronVIDMap_;
65  edm::EDGetTokenT<reco::BeamSpot> theBeamSpot_;
66 
70 
72 
75 
77 
78  double jetPtCut_;
79  double jetEtaCut_;
80  double metCut_;
81  double htCut_;
82  double nmusCut_;
83  double nelsCut_;
86  double lep_iso_cut_;
87  double lep_eta_cut_;
88  double lep_d0_cut_b_;
89  double lep_dz_cut_b_;
90  double lep_d0_cut_e_;
91  double lep_dz_cut_e_;
92 
93  std::vector<double> ptbins_;
94  std::vector<double> htbins_;
98  float etabins_min_;
99  float etabins_max_;
104 
105  // Histograms
118 };
119 
120 namespace {
121 
122  //Offline electron definition
123  bool isGood(const reco::GsfElectron &el,
124  const reco::Vertex::Point &pv_position,
125  const reco::BeamSpot::Point &bs_position,
127  bool pass_id,
128  const double lep_counting_threshold,
129  const double lep_iso_cut,
130  const double lep_eta_cut,
131  const double d0_cut_b,
132  const double dz_cut_b,
133  const double d0_cut_e,
134  const double dz_cut_e) {
135  //Electron ID
136  if (!pass_id)
137  return false;
138 
139  //pT
140  if (el.pt() < lep_counting_threshold || std::abs(el.superCluster()->eta()) > lep_eta_cut)
141  return false;
142 
143  //Isolation
144  auto const &iso = el.pfIsolationVariables();
145  const float absiso =
146  iso.sumChargedHadronPt + std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt - 0.5 * iso.sumPUPt);
147  const float relisowithdb = absiso / el.pt();
148  if (relisowithdb > lep_iso_cut)
149  return false;
150 
151  //Conversion matching
152  bool pass_conversion = false;
153  if (convs.isValid()) {
154  pass_conversion = !ConversionTools::hasMatchedConversion(el, *convs, bs_position);
155  } else {
156  edm::LogError("LepHTMonitor") << "Electron conversion matching failed.\n";
157  }
158  if (!pass_conversion)
159  return false;
160 
161  //Impact parameter
162  float d0 = 999., dz = 999.;
163  if (el.gsfTrack().isNonnull()) {
164  d0 = -(el.gsfTrack()->dxy(pv_position));
165  dz = el.gsfTrack()->dz(pv_position);
166  } else {
167  edm::LogError("LepHTMonitor") << "Could not read electron.gsfTrack().\n";
168  return false;
169  }
170  float etasc = el.superCluster()->eta();
171  if (std::abs(etasc) > 1.479) { //Endcap
172  if (std::abs(d0) > d0_cut_e || std::abs(dz) > dz_cut_e)
173  return false;
174 
175  } else { //Barrel
176  if (std::abs(d0) > d0_cut_b || std::abs(dz) > dz_cut_b)
177  return false;
178  }
179 
180  return true;
181  }
182 
183  //Offline muon definition
184  bool isGood(const reco::Muon &mu,
185  const reco::Vertex &pv,
186  const double lep_counting_threshold,
187  const double lep_iso_cut,
188  const double lep_eta_cut,
189  const double d0_cut,
190  const double dz_cut,
191  int muonIDlevel) {
192  const reco::Vertex::Point &pv_position = pv.position();
193 
194  // Muon pt and eta acceptance
195  if (mu.pt() < lep_counting_threshold || std::abs(mu.eta()) > lep_eta_cut)
196  return false;
197 
198  // Muon isolation
199  auto const &iso = mu.pfIsolationR04();
200  const float absiso =
201  iso.sumChargedHadronPt + std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt - 0.5 * iso.sumPUPt);
202  const float relisowithdb = absiso / mu.pt();
203  if (relisowithdb > lep_iso_cut)
204  return false;
205 
206  // Muon ID
207  bool pass_id = false;
208  if (muonIDlevel == 1)
209  pass_id = muon::isLooseMuon(mu);
210  else if (muonIDlevel == 3)
211  pass_id = muon::isTightMuon(mu, pv);
212  else
213  pass_id = muon::isMediumMuon(mu);
214 
215  if (!pass_id)
216  return false;
217 
218  // Muon impact parameter
219  float d0 = std::abs(mu.muonBestTrack()->dxy(pv_position));
220  float dz = std::abs(mu.muonBestTrack()->dz(pv_position));
221  if (d0 > d0_cut || dz > dz_cut)
222  return false;
223 
224  return true;
225  }
226 } // namespace
227 
229  : theElectronTag_(ps.getParameter<edm::InputTag>("electronCollection")),
230  theElectronCollection_(consumes<edm::View<reco::GsfElectron> >(theElectronTag_)),
231  theElectronVIDTag_(ps.getParameter<edm::InputTag>("electronVID")),
232  theElectronVIDMap_(consumes<edm::ValueMap<bool> >(theElectronVIDTag_)),
233  theMuonTag_(ps.getParameter<edm::InputTag>("muonCollection")),
235  thePfMETTag_(ps.getParameter<edm::InputTag>("pfMetCollection")),
237  thePfJetTag_(ps.getParameter<edm::InputTag>("pfJetCollection")),
239  theJetTagTag_(ps.getParameter<edm::InputTag>("jetTagCollection")),
241  theVertexCollectionTag_(ps.getParameter<edm::InputTag>("vertexCollection")),
243  theConversionCollectionTag_(ps.getParameter<edm::InputTag>("conversionCollection")),
245  theBeamSpotTag_(ps.getParameter<edm::InputTag>("beamSpot")),
247 
249  ps.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"), consumesCollector(), *this)),
251  ps.getParameter<edm::ParameterSet>("den_lep_GenericTriggerEventPSet"), consumesCollector(), *this)),
253  ps.getParameter<edm::ParameterSet>("den_HT_GenericTriggerEventPSet"), consumesCollector(), *this)),
254 
255  folderName_(ps.getParameter<std::string>("folderName")),
256  requireValidHLTPaths_(ps.getParameter<bool>("requireValidHLTPaths")),
258 
259  muonIDlevel_(ps.getUntrackedParameter<int>("muonIDlevel")),
260  jetPtCut_(ps.getUntrackedParameter<double>("jetPtCut")),
261  jetEtaCut_(ps.getUntrackedParameter<double>("jetEtaCut")),
262  metCut_(ps.getUntrackedParameter<double>("metCut")),
263  htCut_(ps.getUntrackedParameter<double>("htCut")),
264 
265  nmusCut_(ps.getUntrackedParameter<double>("nmus")),
266  nelsCut_(ps.getUntrackedParameter<double>("nels")),
267  lep_pt_plateau_(ps.getUntrackedParameter<double>("leptonPtPlateau")),
268  lep_counting_threshold_(ps.getUntrackedParameter<double>("leptonCountingThreshold")),
269  lep_iso_cut_(ps.getUntrackedParameter<double>("lepIsoCut")),
270  lep_eta_cut_(ps.getUntrackedParameter<double>("lepEtaCut")),
271  lep_d0_cut_b_(ps.getUntrackedParameter<double>("lep_d0_cut_b")),
272  lep_dz_cut_b_(ps.getUntrackedParameter<double>("lep_dz_cut_b")),
273  lep_d0_cut_e_(ps.getUntrackedParameter<double>("lep_d0_cut_e")),
274  lep_dz_cut_e_(ps.getUntrackedParameter<double>("lep_dz_cut_e")),
275  ptbins_(ps.getParameter<std::vector<double> >("ptbins")),
276  htbins_(ps.getParameter<std::vector<double> >("htbins")),
277 
278  nbins_eta_(ps.getUntrackedParameter<int>("nbins_eta")),
279  nbins_phi_(ps.getUntrackedParameter<int>("nbins_phi")),
280  nbins_npv_(ps.getUntrackedParameter<int>("nbins_npv")),
281  etabins_min_(ps.getUntrackedParameter<double>("etabins_min")),
282  etabins_max_(ps.getUntrackedParameter<double>("etabins_max")),
283  phibins_min_(ps.getUntrackedParameter<double>("phibins_min")),
284  phibins_max_(ps.getUntrackedParameter<double>("phibins_max")),
285  npvbins_min_(ps.getUntrackedParameter<double>("npvbins_min")),
286  npvbins_max_(ps.getUntrackedParameter<double>("npvbins_max")),
287 
288  h_pfHTTurnOn_num_(nullptr),
289  h_pfHTTurnOn_den_(nullptr),
290  h_lepPtTurnOn_num_(nullptr),
291  h_lepPtTurnOn_den_(nullptr),
292  h_lepEtaTurnOn_num_(nullptr),
293  h_lepEtaTurnOn_den_(nullptr),
294  h_lepPhiTurnOn_num_(nullptr),
295  h_lepPhiTurnOn_den_(nullptr),
296  h_NPVTurnOn_num_(nullptr),
297  h_NPVTurnOn_den_(nullptr) {
298  edm::LogInfo("LepHTMonitor") << "Constructor LepHTMonitor::LepHTMonitor\n";
299 }
300 
303  num_genTriggerEventFlag_.reset();
304  }
307  }
310  }
311 }
312 
313 void LepHTMonitor::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &iRun, const edm::EventSetup &iSetup) {
314  // Initialize trigger flags
316  num_genTriggerEventFlag_->initRun(iRun, iSetup);
317  }
319  den_lep_genTriggerEventFlag_->initRun(iRun, iSetup);
320  }
322  den_HT_genTriggerEventFlag_->initRun(iRun, iSetup);
323  }
324 
325  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
327  num_genTriggerEventFlag_->allHLTPathsAreValid()) &&
329  den_lep_genTriggerEventFlag_->allHLTPathsAreValid()) ||
331  den_HT_genTriggerEventFlag_->allHLTPathsAreValid())));
332 
333  // if valid HLT paths are required,
334  // create DQM outputs only if all paths are valid
336  return;
337  }
338 
339  // book at beginRun
340  ibooker.cd();
341  ibooker.setCurrentFolder("HLT/SUSY/LepHT/" + folderName_);
342 
343  bool is_mu = false;
344  bool is_ele = false;
345  if (theElectronTag_.label().empty() and not theMuonTag_.label().empty()) {
346  is_mu = true;
347  } else if (not theElectronTag_.label().empty() and theMuonTag_.label().empty()) {
348  is_ele = true;
349  }
350 
351  // Cosmetic axis names
352  std::string lepton = "lepton", Lepton = "Lepton";
353  if (is_mu && !is_ele) {
354  lepton = "muon";
355  Lepton = "Muon";
356  } else if (is_ele && !is_mu) {
357  lepton = "electron";
358  Lepton = "Electron";
359  }
360 
361  //Convert to vfloat for picky TH1F constructor
362  vector<float> f_ptbins;
363  f_ptbins.reserve(ptbins_.size());
364  for (double ptbin : ptbins_)
365  f_ptbins.push_back(static_cast<float>(ptbin));
366  vector<float> f_htbins;
367  f_htbins.reserve(htbins_.size());
368  for (double htbin : htbins_)
369  f_htbins.push_back(static_cast<float>(htbin));
370 
371  //num and den hists to be divided in harvesting step to make turn on curves
373  ibooker.book1D("pfHTTurnOn_num", "Numerator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
375  ibooker.book1D("pfHTTurnOn_den", "Denominator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
376 
377  h_lepPtTurnOn_num_ = ibooker.book1D("lepPtTurnOn_num",
378  ("Numerator;Offline " + lepton + " p_{T} [GeV];").c_str(),
379  f_ptbins.size() - 1,
380  f_ptbins.data());
381  h_lepPtTurnOn_den_ = ibooker.book1D("lepPtTurnOn_den",
382  ("Denominator;Offline " + lepton + " p_{T} [GeV];").c_str(),
383  f_ptbins.size() - 1,
384  f_ptbins.data());
386  ibooker.book1D("lepEtaTurnOn_num", "Numerator;Offline lepton #eta;", nbins_eta_, etabins_min_, etabins_max_);
388  ibooker.book1D("lepEtaTurnOn_den", "Denominator;Offline lepton #eta;", nbins_eta_, etabins_min_, etabins_max_);
390  ibooker.book1D("lepPhiTurnOn_num", "Numerator;Offline lepton #phi;", nbins_phi_, phibins_min_, phibins_max_);
392  ibooker.book1D("lepPhiTurnOn_den", "Denominator;Offline lepton #phi;", nbins_phi_, phibins_min_, phibins_max_);
393 
394  h_lepEtaPhiTurnOn_num_ = ibooker.book2D("lepEtaPhiTurnOn_num",
395  "Numerator;Offline lepton #eta;Offline lepton #phi;",
396  nbins_eta_ / 2,
397  etabins_min_,
398  etabins_max_,
399  nbins_phi_ / 2,
400  phibins_min_,
401  phibins_max_);
402  h_lepEtaPhiTurnOn_den_ = ibooker.book2D("lepEtaPhiTurnOn_den",
403  "Denominator;Offline lepton #eta;Offline lepton #phi;",
404  nbins_eta_ / 2,
405  etabins_min_,
406  etabins_max_,
407  nbins_phi_ / 2,
408  phibins_min_,
409  phibins_max_);
410 
411  h_NPVTurnOn_num_ = ibooker.book1D("NPVTurnOn_num", "Numerator;N_{PV};", nbins_npv_, npvbins_min_, npvbins_max_);
412  h_NPVTurnOn_den_ = ibooker.book1D("NPVTurnOn_den", "Denominator;N_{PV};", nbins_npv_, npvbins_min_, npvbins_max_);
413 
414  ibooker.cd();
415 }
416 
417 void LepHTMonitor::analyze(const edm::Event &e, const edm::EventSetup &eSetup) {
418  // if valid HLT paths are required,
419  // analyze event only if all paths are valid
421  return;
422  }
423 
424  // Find whether main and auxilliary triggers fired
425  bool hasFired = false;
426  bool hasFiredAuxiliary = false;
427  bool hasFiredLeptonAuxiliary = false;
428  if (den_lep_genTriggerEventFlag_->on() && den_lep_genTriggerEventFlag_->accept(e, eSetup))
429  hasFiredLeptonAuxiliary = true;
430  if (den_HT_genTriggerEventFlag_->on() && den_HT_genTriggerEventFlag_->accept(e, eSetup))
431  hasFiredAuxiliary = true;
432  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept(e, eSetup))
433  hasFired = true;
434 
435  if (!(hasFiredAuxiliary || hasFiredLeptonAuxiliary))
436  return;
437  int npv = 0;
438  //Vertex
440  if (not theVertexCollectionTag_.label().empty()) {
442  if (!VertexCollection.isValid()) {
443  edm::LogWarning("LepHTMonitor") << "Invalid VertexCollection: " << theVertexCollectionTag_.label() << '\n';
444  } else
445  npv = VertexCollection->size();
446  }
447 
448  //Get electron ID map
449  edm::Handle<edm::ValueMap<bool> > ele_id_decisions;
450  if (not theElectronVIDTag_.label().empty()) {
451  e.getByToken(theElectronVIDMap_, ele_id_decisions);
452  if (!ele_id_decisions.isValid()) {
453  edm::LogWarning("LepHTMonitor") << "Invalid Electron VID map: " << theElectronVIDTag_.label() << '\n';
454  }
455  }
456 
457  //Conversions
459  if (not theConversionCollectionTag_.label().empty()) {
461  if (!ConversionCollection.isValid()) {
462  edm::LogWarning("LepHTMonitor") << "Invalid ConversionCollection: " << theConversionCollectionTag_.label()
463  << '\n';
464  }
465  }
466 
467  //Beam Spot
469  if (not theBeamSpotTag_.label().empty()) {
470  e.getByToken(theBeamSpot_, BeamSpot);
471  if (!BeamSpot.isValid()) {
472  edm::LogWarning("LepHTMonitor") << "Invalid BeamSpot: " << theBeamSpotTag_.label() << '\n';
473  }
474  }
475 
476  //MET
478  if (not thePfMETTag_.label().empty()) {
480  if (!pfMETCollection.isValid()) {
481  edm::LogWarning("LepHTMonitor") << "Invalid PFMETCollection: " << thePfMETTag_.label() << '\n';
482  }
483  }
484 
485  //Jets
487  if (not thePfJetTag_.label().empty()) {
489  if (!pfJetCollection.isValid()) {
490  edm::LogWarning("LepHTMonitor") << "Invalid PFJetCollection: " << thePfJetTag_.label() << '\n';
491  }
492  }
493 
494  //Electron
496  if (not theElectronTag_.label().empty()) {
498  if (!ElectronCollection.isValid()) {
499  edm::LogWarning("LepHTMonitor") << "Invalid GsfElectronCollection: " << theElectronTag_.label() << '\n';
500  }
501  }
502 
503  //Muon
505  if (not theMuonTag_.label().empty()) {
506  e.getByToken(theMuonCollection_, MuonCollection);
507  if (!MuonCollection.isValid()) {
508  edm::LogWarning("LepHTMonitor") << "Invalid MuonCollection: " << theMuonTag_.label() << '\n';
509  }
510  }
511 
512  //Get offline HT
513  double pfHT = -1.0;
514  if (pfJetCollection.isValid()) {
515  pfHT = 0.0;
516  for (auto const &pfjet : *pfJetCollection) {
517  if (pfjet.pt() < jetPtCut_)
518  continue;
519  if (std::abs(pfjet.eta()) > jetEtaCut_)
520  continue;
521  pfHT += pfjet.pt();
522  }
523  }
524 
525  //Get offline MET
526  double pfMET = -1.0;
527  if (pfMETCollection.isValid() && !pfMETCollection->empty()) {
528  pfMET = pfMETCollection->front().et();
529  }
530 
531  //Find offline leptons and keep track of pt,eta of leading and trailing leptons
532  double lep_max_pt = -1.0;
533  double lep_eta = 0;
534  double lep_phi = 0;
535  double trailing_ele_eta = 0;
536  double trailing_ele_phi = 0;
537  double trailing_mu_eta = 0;
538  double trailing_mu_phi = 0;
539  double min_ele_pt = -1.0;
540  double min_mu_pt = -1.0;
541  int nels = 0;
542  int nmus = 0;
543  if (VertexCollection.isValid() && !VertexCollection->empty()) { //for quality checks
544  //Try to find a reco electron
545  if (ElectronCollection.isValid() && ConversionCollection.isValid() && BeamSpot.isValid() &&
546  ele_id_decisions.isValid()) {
547  size_t index = 0;
548  for (auto const &electron : *ElectronCollection) {
549  const auto el = ElectronCollection->ptrAt(index);
550  bool pass_id = (*ele_id_decisions)[el];
551  if (isGood(electron,
552  VertexCollection->front().position(),
553  BeamSpot->position(),
555  pass_id,
557  lep_iso_cut_,
558  lep_eta_cut_,
562  lep_dz_cut_e_)) {
563  if (electron.pt() > lep_max_pt) {
564  lep_max_pt = electron.pt();
565  lep_eta = electron.eta();
566  lep_phi = electron.phi();
567  }
568  if (electron.pt() < min_ele_pt || min_ele_pt < 0) {
569  min_ele_pt = electron.pt();
570  trailing_ele_eta = electron.eta();
571  trailing_ele_phi = electron.phi();
572  }
573  nels++;
574  }
575  index++;
576  }
577  }
578 
579  //Try to find a reco muon
580  if (MuonCollection.isValid()) {
581  for (auto const &muon : *MuonCollection) {
582  if (isGood(muon,
583  VertexCollection->front(),
585  lep_iso_cut_,
586  lep_eta_cut_,
589  muonIDlevel_)) {
590  if (muon.pt() > lep_max_pt) {
591  lep_max_pt = muon.pt();
592  lep_eta = muon.eta();
593  lep_phi = muon.phi();
594  }
595  if (muon.pt() < min_mu_pt || min_mu_pt < 0) {
596  min_mu_pt = muon.pt();
597  trailing_mu_eta = muon.eta();
598  trailing_mu_phi = muon.phi();
599  }
600  nmus++;
601  }
602  }
603  }
604  }
605 
606  //Fill single lepton triggers with leading lepton pT
607  float lep_pt = lep_max_pt;
608 
609  //For dilepton triggers, use trailing rather than leading lepton
610  if (nmusCut_ >= 2) {
611  lep_pt = min_mu_pt;
612  lep_eta = trailing_mu_eta;
613  lep_phi = trailing_mu_phi;
614  }
615  if (nelsCut_ >= 2) {
616  lep_pt = min_ele_pt;
617  lep_eta = trailing_ele_eta;
618  lep_phi = trailing_ele_phi;
619  }
620  if (nelsCut_ >= 1 && nmusCut_ >= 1) {
621  if (min_ele_pt < min_mu_pt) {
622  lep_pt = min_ele_pt;
623  lep_eta = trailing_ele_eta;
624  lep_phi = trailing_ele_phi;
625  } else {
626  lep_pt = min_mu_pt;
627  lep_eta = trailing_mu_eta;
628  lep_phi = trailing_mu_phi;
629  }
630  }
631 
632  const bool nleps_cut = nels >= nelsCut_ && nmus >= nmusCut_;
633  bool lep_plateau = lep_pt > lep_pt_plateau_ || lep_pt_plateau_ < 0.0;
634 
635  //Fill lepton pT and eta histograms
636  if (hasFiredLeptonAuxiliary || !e.isRealData()) {
637  if (nleps_cut && (pfMET > metCut_ || metCut_ < 0.0) && (pfHT > htCut_ || htCut_ < 0.0)) {
638  if (h_lepPtTurnOn_den_) {
639  if (lep_pt > ptbins_.back())
640  lep_pt = ptbins_.back() - 1; //Overflow protection
641  h_lepPtTurnOn_den_->Fill(lep_pt);
642  }
643  if (h_lepPtTurnOn_num_ && hasFired)
644  h_lepPtTurnOn_num_->Fill(lep_pt);
645 
646  if (lep_plateau) {
647  //Fill Eta and Phi histograms for leptons above pT threshold
649  h_lepEtaTurnOn_den_->Fill(lep_eta);
650  if (h_lepEtaTurnOn_num_ && hasFired)
651  h_lepEtaTurnOn_num_->Fill(lep_eta);
653  h_lepPhiTurnOn_den_->Fill(lep_phi);
654  if (h_lepPhiTurnOn_num_ && hasFired)
655  h_lepPhiTurnOn_num_->Fill(lep_phi);
657  h_lepEtaPhiTurnOn_den_->Fill(lep_eta, lep_phi);
658  if (h_lepEtaPhiTurnOn_num_ && hasFired)
659  h_lepEtaPhiTurnOn_num_->Fill(lep_eta, lep_phi);
660 
661  //Fill NPV histograms
662  if (h_NPVTurnOn_den_)
663  h_NPVTurnOn_den_->Fill(npv);
664  if (h_NPVTurnOn_num_ && hasFired)
665  h_NPVTurnOn_num_->Fill(npv);
666  }
667  }
668  }
669 
670  //Fill HT turn-on histograms
671  if (hasFiredAuxiliary || !e.isRealData()) {
672  if (nleps_cut && lep_plateau) {
673  if (h_pfHTTurnOn_den_) {
674  if (pfHT > htbins_.back())
675  pfHT = htbins_.back() - 1; //Overflow protection
676  h_pfHTTurnOn_den_->Fill(pfHT);
677  }
678  if (h_pfHTTurnOn_num_ && hasFired)
679  h_pfHTTurnOn_num_->Fill(pfHT);
680  }
681  }
682 }
683 
edm::EDGetTokenT< edm::ValueMap< bool > > theElectronVIDMap_
Definition: LepHTMonitor.cc:51
double lep_d0_cut_e_
Definition: LepHTMonitor.cc:90
float etabins_max_
Definition: LepHTMonitor.cc:99
float npvbins_min_
double lep_iso_cut_
Definition: LepHTMonitor.cc:86
double pt() const final
transverse momentum
double jetEtaCut_
Definition: LepHTMonitor.cc:79
dqm::reco::MonitorElement MonitorElement
Definition: LepHTMonitor.cc:37
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
MonitorElement * h_pfHTTurnOn_num_
edm::InputTag thePfMETTag_
Definition: LepHTMonitor.cc:54
double jetPtCut_
Definition: LepHTMonitor.cc:78
double lep_dz_cut_e_
Definition: LepHTMonitor.cc:91
edm::InputTag theJetTagTag_
Definition: LepHTMonitor.cc:58
nels
1: loose, 2: medium, 3: tight
MonitorElement * h_lepEtaTurnOn_den_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:27
MonitorElement * h_pfHTTurnOn_den_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
float etabins_min_
Definition: LepHTMonitor.cc:98
MonitorElement * h_lepPhiTurnOn_num_
std::string const & label() const
Definition: InputTag.h:36
JetFloatAssociation::Container JetTagCollection
Definition: JetTag.h:17
Log< level::Error, false > LogError
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
std::vector< Vertex > VertexCollection
Definition: Vertex.h:31
MonitorElement * h_NPVTurnOn_num_
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
bool isLooseMuon(const reco::Muon &)
std::vector< double > ptbins_
Definition: LepHTMonitor.cc:93
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
Definition: LepHTMonitor.cc:55
void Fill(long long x)
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:156
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:729
double nmusCut_
Definition: LepHTMonitor.cc:82
double lep_d0_cut_b_
Definition: LepHTMonitor.cc:88
std::unique_ptr< GenericTriggerEventFlag > den_lep_genTriggerEventFlag_
Definition: LepHTMonitor.cc:68
edm::EDGetTokenT< edm::View< reco::GsfElectron > > theElectronCollection_
Definition: LepHTMonitor.cc:49
dqm::reco::DQMStore DQMStore
Definition: LepHTMonitor.cc:38
edm::InputTag thePfJetTag_
Definition: LepHTMonitor.cc:56
edm::InputTag theElectronTag_
Definition: LepHTMonitor.cc:48
static bool hasMatchedConversion(const reco::GsfElectron &ele, const reco::ConversionCollection &convCol, const math::XYZPoint &beamspot, bool allowCkfMatch=true, float lxyMin=2.0, float probMin=1e-6, unsigned int nHitsBeforeVtxMax=0)
edm::EDGetTokenT< reco::BeamSpot > theBeamSpot_
Definition: LepHTMonitor.cc:65
MonitorElement * h_lepPtTurnOn_den_
MonitorElement * h_lepPtTurnOn_num_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
Definition: LepHTMonitor.cc:63
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::EDGetTokenT< reco::JetTagCollection > theJetTagCollection_
Definition: LepHTMonitor.cc:59
~LepHTMonitor() override
edm::InputTag theMuonTag_
Definition: LepHTMonitor.cc:52
void analyze(const edm::Event &e, const edm::EventSetup &eSetup) override
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
Definition: LepHTMonitor.cc:57
double lep_counting_threshold_
Definition: LepHTMonitor.cc:85
Log< level::Info, false > LogInfo
static constexpr float d0
float phibins_max_
MonitorElement * h_NPVTurnOn_den_
bool hltPathsAreValid_
Definition: LepHTMonitor.cc:74
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:221
float npvbins_max_
float phibins_min_
const std::string folderName_
Definition: LepHTMonitor.cc:71
bool isValid() const
Definition: HandleBase.h:70
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: LepHTMonitor.cc:67
double metCut_
Definition: LepHTMonitor.cc:80
std::vector< PFJet > PFJetCollection
collection of PFJet objects
fixed size matrix
MonitorElement * h_lepEtaPhiTurnOn_den_
HLT enums.
std::vector< double > htbins_
Definition: LepHTMonitor.cc:94
double lep_eta_cut_
Definition: LepHTMonitor.cc:87
double lep_pt_plateau_
Definition: LepHTMonitor.cc:84
double nelsCut_
Definition: LepHTMonitor.cc:83
Definition: Lepton.py:1
edm::EDGetTokenT< reco::VertexCollection > theVertexCollection_
Definition: LepHTMonitor.cc:61
std::unique_ptr< GenericTriggerEventFlag > den_HT_genTriggerEventFlag_
Definition: LepHTMonitor.cc:69
Log< level::Warning, false > LogWarning
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::InputTag theConversionCollectionTag_
Definition: LepHTMonitor.cc:62
double lep_dz_cut_b_
Definition: LepHTMonitor.cc:89
edm::InputTag theElectronVIDTag_
Definition: LepHTMonitor.cc:50
MonitorElement * h_lepEtaPhiTurnOn_num_
MonitorElement * h_lepPhiTurnOn_den_
LepHTMonitor(const edm::ParameterSet &ps)
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155
edm::InputTag theVertexCollectionTag_
Definition: LepHTMonitor.cc:60
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
Definition: LepHTMonitor.cc:53
Definition: Run.h:45
const bool requireValidHLTPaths_
Definition: LepHTMonitor.cc:73
edm::InputTag theBeamSpotTag_
Definition: LepHTMonitor.cc:64
MonitorElement * h_lepEtaTurnOn_num_
Collection of PF MET.