CMS 3D CMS Logo

LepHTMonitor.cc
Go to the documentation of this file.
2 
3 #include <limits>
4 #include <algorithm>
5 
9 
11 
13 
15 
19 #include "RecoEgamma/EgammaTools/src/ConversionTools.cc" //Would prefer to include header, but fails to find hasMatchedConversion definition without this..
21 
23 
24 namespace{
25 
26  //Offline electron definition
27  bool isGood(const reco::GsfElectron &el, const reco::Vertex::Point &pv_position,
28  const reco::BeamSpot::Point &bs_position,
29  const edm::Handle<reco::ConversionCollection> &convs, bool pass_id,
30  const double lep_counting_threshold, const double lep_iso_cut, const double lep_eta_cut,
31  const double d0_cut_b, const double dz_cut_b, const double d0_cut_e, const double dz_cut_e) {
32 
33  //Electron ID
34  if (!pass_id) return false;
35 
36  //pT
37  if (el.pt()<lep_counting_threshold || std::abs(el.superCluster()->eta()) > lep_eta_cut) return false;
38 
39  //Isolation
40  auto const &iso = el.pfIsolationVariables();
41  const float absiso = iso.sumChargedHadronPt
42  + std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt -0.5 * iso.sumPUPt);
43  const float relisowithdb = absiso/el.pt();
44  if (relisowithdb>lep_iso_cut) return false;
45 
46  //Conversion matching
47  bool pass_conversion = false;
48  if (convs.isValid()) {
49  pass_conversion = !ConversionTools::hasMatchedConversion(el, convs, bs_position);
50  }
51  else{
52  edm::LogError("LepHTMonitor") << "Electron conversion matching failed.\n";
53  }
54  if (!pass_conversion) return false;
55 
56 
57  //Impact parameter
58  float d0 = 999., dz=999.;
59  if (el.gsfTrack().isNonnull()) {
60  d0=-(el.gsfTrack()->dxy(pv_position));
61  dz = el.gsfTrack()->dz(pv_position);
62  }
63  else{
64  edm::LogError("LepHTMonitor") << "Could not read electron.gsfTrack().\n";
65  return false;
66  }
67  float etasc = el.superCluster()->eta();
68  if (std::abs(etasc)>1.479) {//Endcap
69  if (std::abs(d0)>d0_cut_e || std::abs(dz)>dz_cut_e) return false;
70 
71  }else{//Barrel
72  if (std::abs(d0)>d0_cut_b || std::abs(dz)>dz_cut_b) return false;
73  }
74 
75  return true;
76  }
77 
78  //Offline muon definition
79  bool isGood(const reco::Muon &mu, const reco::Vertex &pv,
80  const double lep_counting_threshold, const double lep_iso_cut, const double lep_eta_cut,
81  const double d0_cut, const double dz_cut, int muonIDlevel) {
82 
83  const reco::Vertex::Point &pv_position = pv.position();
84 
85  // Muon pt and eta acceptance
86  if (mu.pt()<lep_counting_threshold || std::abs(mu.eta())>lep_eta_cut) return false;
87 
88  // Muon isolation
89  auto const &iso = mu.pfIsolationR04();
90  const float absiso = iso.sumChargedHadronPt
91  + std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt -0.5 * iso.sumPUPt);
92  const float relisowithdb = absiso/mu.pt();
93  if (relisowithdb>lep_iso_cut) return false;
94 
95  // Muon ID
96  bool pass_id = false;
97  if (muonIDlevel == 1) pass_id = muon::isLooseMuon(mu);
98  else if (muonIDlevel == 3) pass_id = muon::isTightMuon(mu,pv);
99  else pass_id = muon::isMediumMuon(mu);
100 
101  if (!pass_id) return false;
102 
103  // Muon impact parameter
104  float d0 = std::abs(mu.muonBestTrack()->dxy(pv_position));
105  float dz = std::abs(mu.muonBestTrack()->dz(pv_position));
106  if (d0>d0_cut || dz>dz_cut) return false;
107 
108  return true;
109  }
110 }
111 
113  theElectronTag_(ps.getParameter<edm::InputTag>("electronCollection")),
114  theElectronCollection_(consumes<edm::View<reco::GsfElectron> >(theElectronTag_)),
115  theElectronVIDTag_(ps.getParameter<edm::InputTag>("electronVID")),
116  theElectronVIDMap_(consumes<edm::ValueMap<bool> >(theElectronVIDTag_)),
117  theMuonTag_(ps.getParameter<edm::InputTag>("muonCollection")),
118  theMuonCollection_(consumes<reco::MuonCollection>(theMuonTag_)),
119  thePfMETTag_(ps.getParameter<edm::InputTag>("pfMetCollection")),
120  thePfMETCollection_(consumes<reco::PFMETCollection>(thePfMETTag_)),
121  thePfJetTag_(ps.getParameter<edm::InputTag>("pfJetCollection")),
122  thePfJetCollection_(consumes<reco::PFJetCollection>(thePfJetTag_)),
123  theJetTagTag_(ps.getParameter<edm::InputTag>("jetTagCollection")),
124  theJetTagCollection_(consumes<reco::JetTagCollection>(theJetTagTag_)),
125  theVertexCollectionTag_(ps.getParameter<edm::InputTag>("vertexCollection")),
126  theVertexCollection_(consumes<reco::VertexCollection>(theVertexCollectionTag_)),
127  theConversionCollectionTag_(ps.getParameter<edm::InputTag>("conversionCollection")),
128  theConversionCollection_(consumes<reco::ConversionCollection>(theConversionCollectionTag_)),
129  theBeamSpotTag_(ps.getParameter<edm::InputTag>("beamSpot")),
130  theBeamSpot_(consumes<reco::BeamSpot>(theBeamSpotTag_)),
131 
132  num_genTriggerEventFlag_(new GenericTriggerEventFlag(ps.getParameter<edm::ParameterSet>("numGenericTriggerEventPSet"),consumesCollector(), *this)),
133  den_lep_genTriggerEventFlag_(new GenericTriggerEventFlag(ps.getParameter<edm::ParameterSet>("den_lep_GenericTriggerEventPSet"),consumesCollector(), *this)),
134  den_HT_genTriggerEventFlag_(new GenericTriggerEventFlag(ps.getParameter<edm::ParameterSet>("den_HT_GenericTriggerEventPSet"),consumesCollector(), *this)),
135 
136  folderName_(ps.getParameter<std::string>("folderName")),
137 
138  muonIDlevel_(ps.getUntrackedParameter<int>("muonIDlevel")),
139 
140  jetPtCut_(ps.getUntrackedParameter<double>("jetPtCut")),
141  jetEtaCut_(ps.getUntrackedParameter<double>("jetEtaCut")),
142  metCut_(ps.getUntrackedParameter<double>("metCut")),
143  htCut_(ps.getUntrackedParameter<double>("htCut")),
144 
145  nmusCut_(ps.getUntrackedParameter<double>("nmus")),
146  nelsCut_(ps.getUntrackedParameter<double>("nels")),
147  lep_pt_plateau_(ps.getUntrackedParameter<double>("leptonPtPlateau")),
148  lep_counting_threshold_(ps.getUntrackedParameter<double>("leptonCountingThreshold")),
149  lep_iso_cut_(ps.getUntrackedParameter<double>("lepIsoCut")),
150  lep_eta_cut_(ps.getUntrackedParameter<double>("lepEtaCut")),
151  lep_d0_cut_b_(ps.getUntrackedParameter<double>("lep_d0_cut_b")),
152  lep_dz_cut_b_(ps.getUntrackedParameter<double>("lep_dz_cut_b")),
153  lep_d0_cut_e_(ps.getUntrackedParameter<double>("lep_d0_cut_e")),
154  lep_dz_cut_e_(ps.getUntrackedParameter<double>("lep_dz_cut_e")),
155  ptbins_(ps.getParameter< std::vector<double> >("ptbins")),
156  htbins_(ps.getParameter< std::vector<double> >("htbins")),
157 
158  nbins_eta_(ps.getUntrackedParameter<int>("nbins_eta")),
159  nbins_phi_(ps.getUntrackedParameter<int>("nbins_phi")),
160  nbins_npv_(ps.getUntrackedParameter<int>("nbins_npv")),
161  etabins_min_(ps.getUntrackedParameter<double>("etabins_min")),
162  etabins_max_(ps.getUntrackedParameter<double>("etabins_max")),
163  phibins_min_(ps.getUntrackedParameter<double>("phibins_min")),
164  phibins_max_(ps.getUntrackedParameter<double>("phibins_max")),
165  npvbins_min_(ps.getUntrackedParameter<double>("npvbins_min")),
166  npvbins_max_(ps.getUntrackedParameter<double>("npvbins_max")),
167 
168  h_pfHTTurnOn_num_(nullptr),
169  h_pfHTTurnOn_den_(nullptr),
170  h_lepPtTurnOn_num_(nullptr),
171  h_lepPtTurnOn_den_(nullptr),
172  h_lepEtaTurnOn_num_(nullptr),
173  h_lepEtaTurnOn_den_(nullptr),
174  h_lepPhiTurnOn_num_(nullptr),
175  h_lepPhiTurnOn_den_(nullptr),
176  h_NPVTurnOn_num_(nullptr),
177  h_NPVTurnOn_den_(nullptr)
178  {
179  edm::LogInfo("LepHTMonitor")
180  << "Constructor LepHTMonitor::LepHTMonitor\n";
181  }
182 
184  edm::LogInfo("LepHTMonitor")
185  << "Destructor LepHTMonitor::~LepHTMonitor\n";
186 }
187 
189  edm::LogInfo("LepHTMonitor") << "LepHTMonitor::beginRun\n";
190 }
191 
193  const edm::Run &iRun, const edm::EventSetup &iSetup) {
194  edm::LogInfo("LepHTMonitor") << "LepHTMonitor::bookHistograms\n";
195  //book at beginRun
196  ibooker.cd();
197  ibooker.setCurrentFolder("HLT/SUSY/LepHT/" + folderName_);
198 
199 
200  bool is_mu = false;
201  bool is_ele = false;
202  if (theElectronTag_.label().empty() and not theMuonTag_.label().empty()) {
203  is_mu=true;
204  } else if (not theElectronTag_.label().empty() and theMuonTag_.label().empty()) {
205  is_ele=true;
206  }
207  //Cosmetic axis names
208  std::string lepton="lepton", Lepton="Lepton";
209  if (is_mu && !is_ele) {
210  lepton="muon";
211  Lepton="Muon";
212  }else if (is_ele && !is_mu) {
213  lepton="electron";
214  Lepton="Electron";
215  }
216  //Initialize trigger flags
217  if ( num_genTriggerEventFlag_ && num_genTriggerEventFlag_->on() ) num_genTriggerEventFlag_->initRun( iRun, iSetup );
220 
221 
222  //Convert to vfloat for picky TH1F constructor
223  vector<float> f_ptbins;
224  for(double ptbin : ptbins_) f_ptbins.push_back(static_cast<float>(ptbin));
225  vector<float> f_htbins;
226  for(double htbin : htbins_) f_htbins.push_back(static_cast<float>(htbin));
227 
228  //num and den hists to be divided in harvesting step to make turn on curves
229  h_pfHTTurnOn_num_ = ibooker.book1D("pfHTTurnOn_num", "Numerator;Offline H_{T} [GeV];", f_htbins.size()-1, f_htbins.data());
230  h_pfHTTurnOn_den_ = ibooker.book1D("pfHTTurnOn_den","Denominator;Offline H_{T} [GeV];", f_htbins.size()-1, f_htbins.data());
231 
232  h_lepPtTurnOn_num_ = ibooker.book1D("lepPtTurnOn_num", ("Numerator;Offline "+lepton+" p_{T} [GeV];").c_str(), f_ptbins.size()-1, f_ptbins.data());
233  h_lepPtTurnOn_den_ = ibooker.book1D("lepPtTurnOn_den", ("Denominator;Offline "+lepton+" p_{T} [GeV];").c_str(), f_ptbins.size()-1, f_ptbins.data());
234  h_lepEtaTurnOn_num_ = ibooker.book1D("lepEtaTurnOn_num", "Numerator;Offline lepton #eta;", nbins_eta_,etabins_min_,etabins_max_);
235  h_lepEtaTurnOn_den_ = ibooker.book1D("lepEtaTurnOn_den", "Denominator;Offline lepton #eta;", nbins_eta_,etabins_min_,etabins_max_);
236  h_lepPhiTurnOn_num_ = ibooker.book1D("lepPhiTurnOn_num", "Numerator;Offline lepton #phi;", nbins_phi_,phibins_min_,phibins_max_);
237  h_lepPhiTurnOn_den_ = ibooker.book1D("lepPhiTurnOn_den", "Denominator;Offline lepton #phi;", nbins_phi_,phibins_min_,phibins_max_);
238 
239  h_lepEtaPhiTurnOn_num_ = ibooker.book2D("lepEtaPhiTurnOn_num", "Numerator;Offline lepton #eta;Offline lepton #phi;", nbins_eta_/2,etabins_min_,etabins_max_,nbins_phi_/2,phibins_min_,phibins_max_);
240  h_lepEtaPhiTurnOn_den_ = ibooker.book2D("lepEtaPhiTurnOn_den", "Denominator;Offline lepton #eta;Offline lepton #phi;", nbins_eta_/2,etabins_min_,etabins_max_,nbins_phi_/2,phibins_min_,phibins_max_);
241 
242  h_NPVTurnOn_num_ = ibooker.book1D("NPVTurnOn_num", "Numerator;N_{PV};", nbins_npv_,npvbins_min_,npvbins_max_);
243  h_NPVTurnOn_den_ = ibooker.book1D("NPVTurnOn_den", "Denominator;N_{PV};", nbins_npv_,npvbins_min_,npvbins_max_);
244 
245  ibooker.cd();
246 }
247 
248 
249 void LepHTMonitor::analyze(const edm::Event &e, const edm::EventSetup &eSetup) {
250  edm::LogInfo("LepHTMonitor") << "LepHTMonitor::analyze\n";
251 
252  //Find whether main and auxilliary triggers fired
253  bool hasFired = false;
254  bool hasFiredAuxiliary = false;
255  bool hasFiredLeptonAuxiliary = false;
256  if (den_lep_genTriggerEventFlag_->on() && den_lep_genTriggerEventFlag_->accept( e, eSetup) ) hasFiredLeptonAuxiliary=true;
257  if (den_HT_genTriggerEventFlag_->on() && den_HT_genTriggerEventFlag_->accept( e, eSetup) ) hasFiredAuxiliary=true;
258  if (num_genTriggerEventFlag_->on() && num_genTriggerEventFlag_->accept( e, eSetup) ) hasFired=true;
259 
260  if (!(hasFiredAuxiliary || hasFiredLeptonAuxiliary)) return;
261  int npv=0;
262  //Vertex
264  if (not theVertexCollectionTag_.label().empty()) {
265  e.getByToken(theVertexCollection_, VertexCollection);
266  if ( !VertexCollection.isValid() ) {
267  edm::LogWarning("LepHTMonitor")
268  << "Invalid VertexCollection: " << theVertexCollectionTag_.label() << '\n';
269  }
270  else npv = VertexCollection->size();
271  }
272 
273 
274  //Get electron ID map
275  edm::Handle<edm::ValueMap<bool> > ele_id_decisions;
276  if (not theElectronVIDTag_.label().empty()) {
277  e.getByToken(theElectronVIDMap_ ,ele_id_decisions);
278  if (!ele_id_decisions.isValid()) {
279  edm::LogWarning("LepHTMonitor")
280  << "Invalid Electron VID map: " << theElectronVIDTag_.label() << '\n';
281  }
282  }
283 
284  //Conversions
286  if (not theConversionCollectionTag_.label().empty()) {
287  e.getByToken(theConversionCollection_, ConversionCollection);
288  if ( !ConversionCollection.isValid() ) {
289  edm::LogWarning("LepHTMonitor")
290  << "Invalid ConversionCollection: " << theConversionCollectionTag_.label() << '\n';
291  }
292  }
293 
294  //Beam Spot
296  if (not theBeamSpotTag_.label().empty()) {
297  e.getByToken(theBeamSpot_, BeamSpot);
298  if ( !BeamSpot.isValid() ) {
299  edm::LogWarning("LepHTMonitor")
300  << "Invalid BeamSpot: " << theBeamSpotTag_.label() << '\n';
301  }
302  }
303 
304  //MET
305  edm::Handle<reco::PFMETCollection> pfMETCollection;
306  if (not thePfMETTag_.label().empty()) {
307  e.getByToken(thePfMETCollection_, pfMETCollection);
308  if ( !pfMETCollection.isValid() ) {
309  edm::LogWarning("LepHTMonitor")
310  << "Invalid PFMETCollection: " << thePfMETTag_.label() << '\n';
311  }
312  }
313 
314  //Jets
315  edm::Handle<reco::PFJetCollection> pfJetCollection;
316  if (not thePfJetTag_.label().empty()) {
317  e.getByToken (thePfJetCollection_,pfJetCollection);
318  if ( !pfJetCollection.isValid() ) {
319  edm::LogWarning("LepHTMonitor")
320  << "Invalid PFJetCollection: " << thePfJetTag_.label() << '\n';
321  }
322  }
323 
324  //Electron
326  if (not theElectronTag_.label().empty()) {
327  e.getByToken (theElectronCollection_, ElectronCollection);
328  if ( !ElectronCollection.isValid() ) {
329  edm::LogWarning("LepHTMonitor")
330  << "Invalid GsfElectronCollection: " << theElectronTag_.label() << '\n';
331  }
332  }
333 
334  //Muon
336  if (not theMuonTag_.label().empty()) {
337  e.getByToken (theMuonCollection_, MuonCollection);
338  if ( !MuonCollection.isValid() ) {
339  edm::LogWarning("LepHTMonitor")
340  << "Invalid MuonCollection: " << theMuonTag_.label() << '\n';
341  }
342  }
343 
344  //Get offline HT
345  double pfHT = -1.0;
346  if (pfJetCollection.isValid()) {
347  pfHT=0.0;
348  for(auto const &pfjet: *pfJetCollection) {
349  if (pfjet.pt() < jetPtCut_) continue;
350  if (std::abs(pfjet.eta()) > jetEtaCut_) continue;
351  pfHT += pfjet.pt();
352  }
353  }
354 
355  //Get offline MET
356  double pfMET = -1.0;
357  if (pfMETCollection.isValid() && !pfMETCollection->empty()) {
358  pfMET = pfMETCollection->front().et();
359  }
360 
361 
362  //Find offline leptons and keep track of pt,eta of leading and trailing leptons
363  double lep_max_pt = -1.0;
364  double lep_eta=0;
365  double lep_phi=0;
366  double trailing_ele_eta=0;
367  double trailing_ele_phi=0;
368  double trailing_mu_eta=0;
369  double trailing_mu_phi=0;
370  double min_ele_pt= -1.0;
371  double min_mu_pt=-1.0;
372  int nels=0;
373  int nmus=0;
374  if (VertexCollection.isValid() && !VertexCollection->empty()) {//for quality checks
375  //Try to find a reco electron
376  if (ElectronCollection.isValid()
377  && ConversionCollection.isValid()
378  && BeamSpot.isValid()
379  && ele_id_decisions.isValid()) {
380  size_t index=0;
381  for(auto const &electron: *ElectronCollection) {
382  const auto el = ElectronCollection->ptrAt(index);
383  bool pass_id = (*ele_id_decisions)[el];
384  if (isGood(electron, VertexCollection->front().position(),
385  BeamSpot->position(), ConversionCollection, pass_id,
388  {
389  if (electron.pt()>lep_max_pt) {lep_max_pt=electron.pt(); lep_eta=electron.eta();lep_phi=electron.phi();}
390  if (electron.pt()<min_ele_pt || min_ele_pt<0) { min_ele_pt=electron.pt(); trailing_ele_eta=electron.eta(); trailing_ele_phi=electron.phi();}
391  nels++;
392  }
393  index++;
394  }
395  }
396 
397  //Try to find a reco muon
398  if (MuonCollection.isValid()) {
399  for(auto const &muon: *MuonCollection) {
401  if (muon.pt()>lep_max_pt) {lep_max_pt=muon.pt(); lep_eta=muon.eta();lep_phi=muon.phi();}
402  if (muon.pt()<min_mu_pt || min_mu_pt<0) {min_mu_pt=muon.pt(); trailing_mu_eta=muon.eta(); trailing_mu_phi=muon.phi();}
403  nmus++;
404  }
405  }
406  }
407  }
408 
409 
410  //Fill single lepton triggers with leading lepton pT
411  float lep_pt = lep_max_pt;
412 
413  //For dilepton triggers, use trailing rather than leading lepton
414  if (nmusCut_>=2) {lep_pt = min_mu_pt; lep_eta = trailing_mu_eta; lep_phi = trailing_mu_phi;}
415  if (nelsCut_>=2) {lep_pt = min_ele_pt; lep_eta = trailing_ele_eta; lep_phi = trailing_ele_phi;}
416  if (nelsCut_>=1 && nmusCut_>=1) {
417  if (min_ele_pt<min_mu_pt) {
418  lep_pt = min_ele_pt;
419  lep_eta = trailing_ele_eta;
420  lep_phi = trailing_ele_phi;
421  } else {
422  lep_pt = min_mu_pt;
423  lep_eta = trailing_mu_eta;
424  lep_phi = trailing_mu_phi;
425  }
426  }
427 
428  const bool nleps_cut = nels>=nelsCut_ && nmus>=nmusCut_;
429  bool lep_plateau = lep_pt>lep_pt_plateau_ || lep_pt_plateau_<0.0;
430 
431  //Fill lepton pT and eta histograms
432  if (hasFiredLeptonAuxiliary || !e.isRealData()) {
433 
434  if (nleps_cut && (pfMET>metCut_ || metCut_<0.0) && (pfHT>htCut_ || htCut_<0.0)) {
435  if (h_lepPtTurnOn_den_) {
436  if (lep_pt > ptbins_.back()) lep_pt = ptbins_.back()-1; //Overflow protection
437  h_lepPtTurnOn_den_->Fill(lep_pt);
438  }
439  if (h_lepPtTurnOn_num_ && hasFired) h_lepPtTurnOn_num_->Fill(lep_pt);
440 
441  if (lep_plateau) {
442  //Fill Eta and Phi histograms for leptons above pT threshold
444  if (h_lepEtaTurnOn_num_ && hasFired) h_lepEtaTurnOn_num_->Fill(lep_eta);
446  if (h_lepPhiTurnOn_num_ && hasFired) h_lepPhiTurnOn_num_->Fill(lep_phi);
447  if (h_lepEtaPhiTurnOn_den_) h_lepEtaPhiTurnOn_den_->Fill(lep_eta,lep_phi);
448  if (h_lepEtaPhiTurnOn_num_ && hasFired) h_lepEtaPhiTurnOn_num_->Fill(lep_eta,lep_phi);
449 
450  //Fill NPV histograms
452  if (h_NPVTurnOn_num_ && hasFired) h_NPVTurnOn_num_->Fill(npv);
453  }
454  }
455  }
456 
457  //Fill HT turn-on histograms
458  if (hasFiredAuxiliary || !e.isRealData()) {
459  if (nleps_cut && lep_plateau ) {
460  if (h_pfHTTurnOn_den_) {
461  if (pfHT > htbins_.back()) pfHT = htbins_.back()-1; //Overflow protection
462  h_pfHTTurnOn_den_->Fill(pfHT);
463  }
464  if (h_pfHTTurnOn_num_ && hasFired) h_pfHTTurnOn_num_->Fill(pfHT);
465  }
466  }
467 }
468 
469 
470 void LepHTMonitor::endRun(const edm::Run &run, const edm::EventSetup &eSetup) {
471  edm::LogInfo("LepHTMonitor") << "LepHTMonitor::endRun\n";
472 }
473 
474 //define this as a plug-in
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:677
edm::EDGetTokenT< edm::ValueMap< bool > > theElectronVIDMap_
Definition: LepHTMonitor.h:71
double lep_d0_cut_e_
Definition: LepHTMonitor.h:107
float etabins_max_
Definition: LepHTMonitor.h:117
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
Definition: GsfElectron.h:185
float npvbins_min_
Definition: LepHTMonitor.h:120
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
double eta() const final
momentum pseudorapidity
double lep_iso_cut_
Definition: LepHTMonitor.h:103
double jetEtaCut_
Definition: LepHTMonitor.h:96
std::string folderName_
Definition: LepHTMonitor.h:91
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
MonitorElement * h_pfHTTurnOn_num_
Definition: LepHTMonitor.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::InputTag thePfMETTag_
Definition: LepHTMonitor.h:74
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
double jetPtCut_
Definition: LepHTMonitor.h:95
double htCut_
Definition: LepHTMonitor.h:98
double lep_dz_cut_e_
Definition: LepHTMonitor.h:108
MonitorElement * h_lepEtaTurnOn_den_
Definition: LepHTMonitor.h:130
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
math::XYZPoint Point
point in the space
Definition: BeamSpot.h:29
MonitorElement * h_pfHTTurnOn_den_
Definition: LepHTMonitor.h:126
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
float etabins_min_
Definition: LepHTMonitor.h:116
MonitorElement * h_lepPhiTurnOn_num_
Definition: LepHTMonitor.h:131
#define nullptr
bool isRealData() const
Definition: EventBase.h:64
const Point & position() const
position
Definition: Vertex.h:109
MonitorElement * h_NPVTurnOn_num_
Definition: LepHTMonitor.h:135
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 &)
void Fill(long long x)
std::vector< double > ptbins_
Definition: LepHTMonitor.h:111
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
Definition: LepHTMonitor.h:75
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
double nmusCut_
Definition: LepHTMonitor.h:99
double lep_d0_cut_b_
Definition: LepHTMonitor.h:105
std::unique_ptr< GenericTriggerEventFlag > den_lep_genTriggerEventFlag_
Definition: LepHTMonitor.h:88
virtual TrackRef muonBestTrack() const
Definition: Muon.h:63
edm::EDGetTokenT< edm::View< reco::GsfElectron > > theElectronCollection_
Definition: LepHTMonitor.h:69
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
edm::InputTag thePfJetTag_
Definition: LepHTMonitor.h:76
edm::InputTag theElectronTag_
Definition: LepHTMonitor.h:68
edm::EDGetTokenT< reco::BeamSpot > theBeamSpot_
Definition: LepHTMonitor.h:86
MonitorElement * h_lepPtTurnOn_den_
Definition: LepHTMonitor.h:128
MonitorElement * h_lepPtTurnOn_num_
Definition: LepHTMonitor.h:127
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
def pv(vc)
Definition: MetAnalyzer.py:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
Definition: LepHTMonitor.h:84
const int mu
Definition: Constants.h:22
~LepHTMonitor() override
edm::InputTag theMuonTag_
Definition: LepHTMonitor.h:72
void analyze(const edm::Event &e, const edm::EventSetup &eSetup) override
bool isValid() const
Definition: HandleBase.h:74
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
static bool hasMatchedConversion(const reco::GsfElectron &ele, const edm::Handle< 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::PFJetCollection > thePfJetCollection_
Definition: LepHTMonitor.h:77
double lep_counting_threshold_
Definition: LepHTMonitor.h:102
float phibins_max_
Definition: LepHTMonitor.h:119
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * h_NPVTurnOn_den_
Definition: LepHTMonitor.h:136
const MuonPFIsolation & pfIsolationR04() const
Definition: Muon.h:168
float npvbins_max_
Definition: LepHTMonitor.h:121
float phibins_min_
Definition: LepHTMonitor.h:118
std::string const & label() const
Definition: InputTag.h:36
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
Definition: LepHTMonitor.h:87
double metCut_
Definition: LepHTMonitor.h:97
std::vector< PFJet > PFJetCollection
collection of PFJet objects
fixed size matrix
MonitorElement * h_lepEtaPhiTurnOn_den_
Definition: LepHTMonitor.h:134
HLT enums.
std::vector< double > htbins_
Definition: LepHTMonitor.h:112
double lep_eta_cut_
Definition: LepHTMonitor.h:104
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:184
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &e) override
const Point & position() const
position
Definition: BeamSpot.h:62
double lep_pt_plateau_
Definition: LepHTMonitor.h:101
double nelsCut_
Definition: LepHTMonitor.h:100
Definition: Lepton.py:1
void endRun(const edm::Run &run, const edm::EventSetup &eSetup) override
edm::EDGetTokenT< reco::VertexCollection > theVertexCollection_
Definition: LepHTMonitor.h:82
std::unique_ptr< GenericTriggerEventFlag > den_HT_genTriggerEventFlag_
Definition: LepHTMonitor.h:89
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
edm::InputTag theConversionCollectionTag_
Definition: LepHTMonitor.h:83
double lep_dz_cut_b_
Definition: LepHTMonitor.h:106
edm::InputTag theElectronVIDTag_
Definition: LepHTMonitor.h:70
MonitorElement * h_lepEtaPhiTurnOn_num_
Definition: LepHTMonitor.h:133
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:629
MonitorElement * h_lepPhiTurnOn_den_
Definition: LepHTMonitor.h:132
LepHTMonitor(const edm::ParameterSet &ps)
edm::InputTag theVertexCollectionTag_
Definition: LepHTMonitor.h:81
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
Definition: LepHTMonitor.h:73
Definition: Run.h:44
edm::InputTag theBeamSpotTag_
Definition: LepHTMonitor.h:85
MonitorElement * h_lepEtaTurnOn_num_
Definition: LepHTMonitor.h:129
float sumChargedHadronPt
sum-pt of charged Hadron
Collection of PF MET.