CMS 3D CMS Logo

TopDiLeptonOfflineDQM.cc
Go to the documentation of this file.
1 //#include <algorithm>
11 
12 namespace TopDiLeptonOffline {
13 
15  : label_(label),
16  eidCutValue_(0.),
17  elecIso_(nullptr),
18  elecSelect_(nullptr),
19  muonIso_(nullptr),
20  muonSelect_(nullptr),
21  jetIDSelect_(nullptr),
22  lowerEdge_(-1.),
23  upperEdge_(-1.),
24  elecMuLogged_(0),
25  diMuonLogged_(0),
26  diElecLogged_(0) {
27  // sources have to be given; this PSet is not optional
28  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
29  muons_ = iC.consumes<edm::View<reco::PFCandidate>>(sources.getParameter<edm::InputTag>("muons"));
30  elecs_ = iC.consumes<edm::View<reco::PFCandidate>>(sources.getParameter<edm::InputTag>("elecs"));
31  jets_ = iC.consumes<edm::View<reco::Jet>>(sources.getParameter<edm::InputTag>("jets"));
32  for (edm::InputTag const& tag : sources.getParameter<std::vector<edm::InputTag>>("mets"))
33  mets_.push_back(iC.consumes<edm::View<reco::MET>>(tag));
34 
35  // elecExtras are optional; they may be omitted or empty
36  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
37  edm::ParameterSet elecExtras = cfg.getParameter<edm::ParameterSet>("elecExtras");
38  // select is optional; in case it's not found no
39  // selection will be applied
40  if (elecExtras.existsAs<std::string>("select")) {
41  elecSelect_.reset(
43  }
44  // isolation is optional; in case it's not found no
45  // isolation will be applied
46  if (elecExtras.existsAs<std::string>("isolation")) {
47  elecIso_.reset(
48  new StringCutObjectSelector<reco::PFCandidate>(elecExtras.getParameter<std::string>("isolation")));
49  }
50  // electronId is optional; in case it's not found the
51  // InputTag will remain empty
52  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
53  edm::ParameterSet elecId = elecExtras.getParameter<edm::ParameterSet>("electronId");
54  electronId_ = iC.consumes<edm::ValueMap<float>>(elecId.getParameter<edm::InputTag>("src"));
55  eidCutValue_ = elecId.getParameter<double>("cutValue");
56  // eidPattern_= elecId.getParameter<int>("pattern");
57  }
58  }
59  // muonExtras are optional; they may be omitted or empty
60  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
61  edm::ParameterSet muonExtras = cfg.getParameter<edm::ParameterSet>("muonExtras");
62  // select is optional; in case it's not found no
63  // selection will be applied
64  if (muonExtras.existsAs<std::string>("select")) {
65  muonSelect_.reset(
67  }
68  // isolation is optional; in case it's not found no
69  // isolation will be applied
70  if (muonExtras.existsAs<std::string>("isolation")) {
71  muonIso_.reset(
73  }
74  }
75  // jetExtras are optional; they may be omitted or empty
76  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
77  edm::ParameterSet jetExtras = cfg.getParameter<edm::ParameterSet>("jetExtras");
78  // jetCorrector is optional; in case it's not found
79  // the InputTag will remain empty
80  if (jetExtras.existsAs<std::string>("jetCorrector")) {
81  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
82  }
83  // read jetID information if it exists
84  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
85  edm::ParameterSet jetID = jetExtras.getParameter<edm::ParameterSet>("jetID");
86  jetIDLabel_ = iC.consumes<reco::JetIDValueMap>(jetID.getParameter<edm::InputTag>("label"));
88  }
89  // select is optional; in case it's not found no
90  // selection will be applied (only implemented for
91  // CaloJets at the moment)
92  if (jetExtras.existsAs<std::string>("select")) {
93  jetSelect_ = jetExtras.getParameter<std::string>("select");
94  }
95  }
96  // triggerExtras are optional; they may be omitted or empty
97  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
98  edm::ParameterSet triggerExtras = cfg.getParameter<edm::ParameterSet>("triggerExtras");
99  triggerTable_ = iC.consumes<edm::TriggerResults>(triggerExtras.getParameter<edm::InputTag>("src"));
100  elecMuPaths_ = triggerExtras.getParameter<std::vector<std::string>>("pathsELECMU");
101  diMuonPaths_ = triggerExtras.getParameter<std::vector<std::string>>("pathsDIMUON");
102  }
103  // massExtras is optional; in case it's not found no mass
104  // window cuts are applied for the same flavor monitor
105  // histograms
106  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
107  edm::ParameterSet massExtras = cfg.getParameter<edm::ParameterSet>("massExtras");
108  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
109  upperEdge_ = massExtras.getParameter<double>("upperEdge");
110  }
111 
112  // setup the verbosity level for booking histograms;
113  // per default the verbosity level will be set to
114  // STANDARD. This will also be the chosen level in
115  // the case when the monitoring PSet is not found
117  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
118  edm::ParameterSet monitoring = cfg.getParameter<edm::ParameterSet>("monitoring");
119  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
120  verbosity_ = DEBUG;
121  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
123  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
125  }
126  // and don't forget to do the histogram booking
127  directory_ = cfg.getParameter<std::string>("directory");
128  }
129 
131  // set up the current directory path
132  std::string current(directory_);
133  current += label_;
134  ibooker.setCurrentFolder(current);
135 
136  // determine number of bins for trigger monitoring
137  unsigned int nElecMu = elecMuPaths_.size();
138  unsigned int nDiMuon = diMuonPaths_.size();
139 
140  // --- [STANDARD] --- //
141  // Run Number
142  hists_["RunNumb_"] = ibooker.book1D("RunNumber", "Run Nr.", 1.e4, 1.5e5, 3.e5);
143  // invariant mass of opposite charge lepton pair (only filled for same flavor)
144  hists_["invMass_"] = ibooker.book1D("InvMass", "M(lep1, lep2)", 80, 0., 320.);
145  // invariant mass of opposite charge lepton pair (only filled for same flavor)
146  hists_["invMassLog_"] = ibooker.book1D("InvMassLog", "log_{10}(M(lep1, lep2))", 80, .1, 2.5);
147  // invariant mass of same charge lepton pair (log10 for low mass region, only
148  // filled for same flavor)
149  hists_["invMassWC_"] = ibooker.book1D("InvMassWC", "M_{WC}(L1, L2)", 80, 0., 320.);
150  // invariant mass of same charge lepton pair (log10 for low mass region, only
151  // filled for same flavor)
152  hists_["invMassWCLog_"] = ibooker.book1D("InvMassLogWC", "log_{10}(M_{WC})", 80, .1, 2.5);
153  // decay channel [1]: muon/muon, [2]:elec/elec, [3]:elec/muon
154  hists_["decayChannel_"] = ibooker.book1D("DecayChannel", "Decay Channel", 3, 0, 3);
155  // trigger efficiency estimates for the electron muon channel
156  hists_["elecMuEff_"] = ibooker.book1D("ElecMuEff", "Eff(e/#mu paths)", nElecMu, 0., nElecMu);
157  // monitored trigger occupancy for the electron muon channel
158  hists_["elecMuMon_"] = ibooker.book1D("ElecMuMon", "Mon(e/#mu paths)", nElecMu, 0., nElecMu);
159  // trigger efficiency estimates for the di muon channel
160  hists_["diMuonEff_"] = ibooker.book1D("DiMuonEff", "Eff(#mu/#mu paths)", nDiMuon, 0., nDiMuon);
161  // monitored trigger occupancy for the di muon channel
162  hists_["diMuonMon_"] = ibooker.book1D("DiMuonMon", "Mon(#mu/#mu paths)", nDiMuon, 0., nDiMuon);
163  // pt of the leading lepton
164  hists_["lep1Pt_"] = ibooker.book1D("Lep1Pt", "pt(lep1)", 50, 0., 200.);
165  // pt of the 2. leading lepton
166  hists_["lep2Pt_"] = ibooker.book1D("Lep2Pt", "pt(lep2)", 50, 0., 200.);
167  // multiplicity of jets with pt>30 (corrected to L2+L3)
168  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 21, -0.5, 20.5);
169  // MET (calo)
170  hists_["metCalo_"] = ibooker.book1D("METCalo", "MET_{Calo}", 50, 0., 200.);
171 
172  // set bin labels for trigger monitoring
175  // set bin labels for decayChannel_
176  hists_["decayChannel_"]->setBinLabel(1, "#mu e", 1);
177  hists_["decayChannel_"]->setBinLabel(2, "#mu #mu", 1);
178  hists_["decayChannel_"]->setBinLabel(3, "e e", 1);
179 
180  if (verbosity_ == STANDARD)
181  return;
182 
183  // --- [VERBOSE] --- //
184  // mean eta of the candidate leptons
185  hists_["sumEtaL1L2_"] = ibooker.book1D("SumEtaL1L2", "<#eta>(lep1, lep2)", 100, -5., 5.);
186  // deltaEta between the 2 candidate leptons
187  hists_["dEtaL1L2_"] = ibooker.book1D("DEtaL1L2", "#Delta#eta(lep1,lep2)", 80, -4., 4.);
188  // deltaPhi between the 2 candidate leptons
189  hists_["dPhiL1L2_"] = ibooker.book1D("DPhiL1L2", "#Delta#phi(lep1,lep2)", 64, -3.2, 3.2);
190  // pt of the candidate electron (depending on the decay channel)
191  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 200.);
192  // relative isolation of the candidate electron (depending on the decay
193  // channel)
194  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.);
195  // pt of the canddiate muon (depending on the decay channel)
196  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 200.);
197  // relative isolation of the candidate muon (depending on the decay channel)
198  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu) (#Delta#beta Corrected)", 50, 0., 1.);
199  // pt of the 1. leading jet (corrected to L2+L3)
200  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.);
201  // pt of the 2. leading jet (corrected to L2+L3)
202  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.);
203  // MET (PF)
204  hists_["metPflow_"] = ibooker.book1D("METPflow", "MET_{Pflow}", 50, 0., 200.);
205  // MET (TC)
206  hists_["metTC_"] = ibooker.book1D("METTC", "MET_{TC}", 50, 0., 200.);
207  // dz for muons (to suppress cosmis)
208  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
209  // dxy for muons (to suppress cosmics)
210  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -1., 1., 50, -1., 1.);
211  // lepton multiplicity after std isolation
212  hists_["lepMultIso_"] = ibooker.book2D("LepMultIso", "N_{Iso}(e) vs N_{Iso}(#mu)", 5, 0., 5., 5, 0., 5.);
213 
214  // set axes titles for dxy for muons
215  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
216  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
217  // set axes titles for lepton multiplicity after std isolation
218  hists_["lepMultIso_"]->setAxisTitle("N_{Iso}(#mu)", 1);
219  hists_["lepMultIso_"]->setAxisTitle("N_{Iso}(elec)", 2);
220 
221  if (verbosity_ == VERBOSE)
222  return;
223 
224  // --- [DEBUG] --- //
225  // electron multiplicity after std isolation
226  hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 11, -0.5, 10.5);
227  // muon multiplicity after std isolation
228  hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", "N_{Iso}(#mu)", 11, -0.5, 10.5);
229  // charged hadron isolation component of the candidate muon (depending on the
230  // decay channel)
231  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIsoComp", "ChHad_{IsoComponent}(#mu)", 50, 0., 5.);
232  // neutral hadron isolation component of the candidate muon (depending on the
233  // decay channel)
234  hists_["muonNeHadIso_"] = ibooker.book1D("MuonNeHadIsoComp", "NeHad_{IsoComponent}(#mu)", 50, 0., 5.);
235  // photon isolation component of the candidate muon (depending on the decay
236  // channel)
237  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIsoComp", "Photon_{IsoComponent}(#mu)", 50, 0., 5.);
238  // charged hadron isolation component of the candidate electron (depending on
239  // the decay channel)
240  hists_["elecChHadIso_"] = ibooker.book1D("ElectronChHadIsoComp", "ChHad_{IsoComponent}(e)", 50, 0., 5.);
241  // neutral hadron isolation component of the candidate electron (depending on
242  // the decay channel)
243  hists_["elecNeHadIso_"] = ibooker.book1D("ElectronNeHadIsoComp", "NeHad_{IsoComponent}(e)", 50, 0., 5.);
244  // photon isolation component of the candidate electron (depending on the
245  // decay channel)
246  hists_["elecPhIso_"] = ibooker.book1D("ElectronPhIsoComp", "Photon_{IsoComponent}(e)", 50, 0., 5.);
247  // eta of the leading jet
248  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta(jet1)", 30, -5., 5.);
249  // eta of the 2. leading jet
250  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta(jet2)", 30, -5., 5.);
251  // pt of the 1. leading jet (not corrected)
252  hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
253  // pt of the 2. leading jet (not corrected)
254  hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
255  // deltaEta between the 2 leading jets
256  hists_["dEtaJet1Jet2_"] = ibooker.book1D("DEtaJet1Jet2", "#Delta#eta(jet1,jet2)", 80, -4., 4.);
257  // deltaEta between the lepton and the leading jet
258  hists_["dEtaJet1Lep1_"] = ibooker.book1D("DEtaJet1Lep1", "#Delta#eta(jet1,lep1)", 80, -4., 4.);
259  // deltaEta between the lepton and MET
260  hists_["dEtaLep1MET_"] = ibooker.book1D("DEtaLep1MET", "#Delta#eta(lep1,MET)", 80, -4., 4.);
261  // deltaEta between leading jet and MET
262  hists_["dEtaJet1MET_"] = ibooker.book1D("DEtaJet1MET", "#Delta#eta(jet1,MET)", 80, -4., 4.);
263  // deltaPhi of 2 leading jets
264  hists_["dPhiJet1Jet2_"] = ibooker.book1D("DPhiJet1Jet2", "#Delta#phi(jet1,jet2)", 64, -3.2, 3.2);
265  // deltaPhi of 1. lepton and 1. jet
266  hists_["dPhiJet1Lep1_"] = ibooker.book1D("DPhiJet1Lep1", "#Delta#phi(jet1,lep1)", 64, -3.2, 3.2);
267  // deltaPhi of 1. lepton and MET
268  hists_["dPhiLep1MET_"] = ibooker.book1D("DPhiLep1MET", "#Delta#phi(lep1,MET)", 64, -3.2, 3.2);
269  // deltaPhi of 1. jet and MET
270  hists_["dPhiJet1MET_"] = ibooker.book1D("DPhiJet1MET", "#Delta#phi(jet1,MET)", 64, -3.2, 3.2);
271  // selected dimuon events
272  hists_["diMuonLogger_"] = ibooker.book2D("DiMuonLogger", "Logged DiMuon Events", 8, 0., 8., 10, 0., 10.);
273  // selected dielec events
274  hists_["diElecLogger_"] = ibooker.book2D("DiElecLogger", "Logged DiElec Events", 8, 0., 8., 10, 0., 10.);
275  // selected elemu events
276  hists_["elecMuLogger_"] = ibooker.book2D("ElecMuLogger", "Logged ElecMu Events", 8, 0., 8., 10, 0., 10.);
277 
278  // set bin labels for trigger monitoring
279  loggerBinLabels(std::string("diMuonLogger_"));
280  loggerBinLabels(std::string("diElecLogger_"));
281  loggerBinLabels(std::string("elecMuLogger_"));
282  return;
283  }
284 
286  // fetch trigger event if configured such
289  if (!event.getByToken(triggerTable_, triggerTable))
290  return;
291  }
292  /*
293  ------------------------------------------------------------
294 
295  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
296  value=5.0)
297 
298  ------------------------------------------------------------
299  */
300 
301  if (!event.eventAuxiliary().run())
302  return;
303  fill("RunNumb_", event.eventAuxiliary().run());
304 
305  double dummy = 5.;
306  fill("InstLumi_", dummy);
307 
308  /*
309  ------------------------------------------------------------
310 
311  Muon Selection
312 
313  ------------------------------------------------------------
314  */
315 
316  std::vector<const reco::PFCandidate*> isoMuons;
317 
320 
321  if (!event.getByToken(muons_, muons))
322  return;
323 
324  for (edm::View<reco::PFCandidate>::const_iterator muonit = muons->begin(); muonit != muons->end(); ++muonit) {
325  if (muonit->muonRef().isNull())
326  continue;
327  reco::MuonRef muon = muonit->muonRef();
328 
329  if (muon->innerTrack().isNull())
330  continue;
331 
332  if (muon->isGlobalMuon()) {
333  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
334  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
335 
336  // apply selection
337  if (!muonSelect_ || (*muonSelect_)(*muonit)) {
338  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
339  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
340  double phoEt = muon->pfIsolationR04().sumPhotonEt;
341 
342  double pfRelIso = (chHadPt + std::max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
343  muon->pt(); // CB dBeta corrected iso!
344 
345  fill("muonRelIso_", pfRelIso);
346 
347  fill("muonChHadIso_", chHadPt);
348  fill("muonNeHadIso_", neHadEt);
349  fill("muonPhIso_", phoEt);
350 
351  if (!muonIso_ || (*muonIso_)(*muonit))
352  isoMuons.push_back(&(*muonit));
353  }
354  }
355  }
356 
357  fill("muonMultIso_", isoMuons.size());
358 
359  /*
360  ------------------------------------------------------------
361 
362  Electron Selection
363 
364  ------------------------------------------------------------
365  */
366 
367  // buffer isolated electronss
368  std::vector<const reco::PFCandidate*> isoElecs;
370  if (!electronId_.isUninitialized()) {
371  if (!event.getByToken(electronId_, electronId))
372  return;
373  }
375  if (!event.getByToken(elecs_, elecs))
376  return;
377 
378  for (edm::View<reco::PFCandidate>::const_iterator elec = elecs->begin(); elec != elecs->end(); ++elec) {
379  if (elec->gsfElectronRef().isNull()) {
380  continue;
381  }
382  reco::GsfElectronRef gsf_el = elec->gsfElectronRef();
383  // restrict to electrons with good electronId
384  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[gsf_el] >= eidCutValue_)) {
385  // apply preselection
386  if (!elecSelect_ || (*elecSelect_)(*elec)) {
387  double el_ChHadIso = gsf_el->pfIsolationVariables().sumChargedHadronPt;
388  double el_NeHadIso = gsf_el->pfIsolationVariables().sumNeutralHadronEt;
389  double el_PhIso = gsf_el->pfIsolationVariables().sumPhotonEt;
390  double el_pfRelIso =
391  (el_ChHadIso + std::max(0., el_NeHadIso + el_PhIso - 0.5 * gsf_el->pfIsolationVariables().sumPUPt)) /
392  gsf_el->pt();
393  fill("elecRelIso_", el_pfRelIso);
394  fill("elecChHadIso_", el_ChHadIso);
395  fill("elecNeHadIso_", el_NeHadIso);
396  fill("elecPhIso_", el_PhIso);
397  if (!elecIso_ || (*elecIso_)(*elec))
398  isoElecs.push_back(&(*elec));
399  }
400  }
401  }
402  fill("elecMultIso_", isoElecs.size());
403 
404  /*
405  ------------------------------------------------------------
406 
407  Jet Selection
408 
409  ------------------------------------------------------------
410  */
411 
412  const JetCorrector* corrector = nullptr;
413  if (!jetCorrector_.empty()) {
414  // check whether a jet correcto is in the event setup or not
415  if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey<JetCorrectionsRecord>())) {
417  } else {
418  edm::LogVerbatim("TopDiLeptonOfflineDQM") << "\n"
419  << "-----------------------------------------------------------------"
420  "-------------------- \n"
421  << " No JetCorrectionsRecord available from EventSetup: "
422  " \n"
423  << " - Jets will not be corrected. "
424  " \n"
425  << " - If you want to change this add the following lines to your "
426  "cfg file: \n"
427  << " "
428  " \n"
429  << " ## load jet corrections "
430  " \n"
431  << " "
432  "process.load(\"JetMETCorrections.Configuration."
433  "JetCorrectionServicesAllAlgos_cff\") \n"
434  << " process.prefer(\"ak5CaloL2L3\") "
435  " \n"
436  << " "
437  " \n"
438  << "-----------------------------------------------------------------"
439  "-------------------- \n";
440  }
441  }
442 
443  unsigned int mult = 0;
444  // buffer leadingJets
445  std::vector<reco::Jet> leadingJets;
447  if (!event.getByToken(jets_, jets))
448  return;
449 
451  if (jetIDSelect_) {
452  if (!event.getByToken(jetIDLabel_, jetID))
453  return;
454  }
455 
456  for (edm::View<reco::Jet>::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) {
457  unsigned int idx = jet - jets->begin();
458  if (jetIDSelect_ && dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
459  if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)]))
460  continue;
461  }
462  // chekc additional jet selection for calo, pf and bare reco jets
463  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
464  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
465  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
467  if (!jetSelect(sel)) {
468  continue;
469  }
470  } else if (dynamic_cast<const reco::PFJet*>(&*jet)) {
471  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
472  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
474  if (!jetSelect(sel))
475  continue;
476  } else {
477  reco::Jet sel = *jet;
478  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
480  if (!jetSelect(sel))
481  continue;
482  }
483  // check for overlaps
484  bool overlap = false;
485  for (std::vector<const reco::PFCandidate*>::const_iterator elec = isoElecs.begin(); elec != isoElecs.end();
486  ++elec) {
487  if (reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), jet->phi()) < 0.4) {
488  overlap = true;
489  break;
490  }
491  }
492  if (overlap) {
493  continue;
494  }
495  // prepare jet to fill monitor histograms
496  reco::Jet monitorJet = *jet;
497  monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
498  ++mult; // determine jet multiplicity
499  if (idx == 0) {
500  leadingJets.push_back(monitorJet);
501  fill("jet1Pt_", monitorJet.pt());
502  fill("jet1PtRaw_", jet->pt());
503  fill("jet1Eta_", jet->eta());
504  }
505  if (idx == 1) {
506  leadingJets.push_back(monitorJet);
507  fill("jet2Pt_", monitorJet.pt());
508  fill("jet2PtRaw_", jet->pt());
509  fill("jet2Eta_", jet->eta());
510  }
511  }
512  if (leadingJets.size() > 1) {
513  fill("dEtaJet1Jet2_", leadingJets[0].eta() - leadingJets[1].eta());
514  fill("dPhiJet1Jet2_", reco::deltaPhi(leadingJets[0].phi(), leadingJets[1].phi()));
515  if (!isoMuons.empty()) {
516  if (isoElecs.empty() || isoMuons[0]->pt() > isoElecs[0]->pt()) {
517  fill("dEtaJet1Lep1_", isoMuons[0]->eta() - leadingJets[0].eta());
518  fill("dPhiJet1Lep1_", reco::deltaPhi(isoMuons[0]->phi(), leadingJets[0].phi()));
519  }
520  }
521  if (!isoElecs.empty()) {
522  if (isoMuons.empty() || isoElecs[0]->pt() > isoMuons[0]->pt()) {
523  fill("dEtaJet1Lep1_", isoElecs[0]->eta() - leadingJets[0].eta());
524  fill("dPhiJet1Lep1_", reco::deltaPhi(isoElecs[0]->phi(), leadingJets[0].phi()));
525  }
526  }
527  }
528  fill("jetMult_", mult);
529 
530  /*
531  ------------------------------------------------------------
532 
533  MET Selection
534 
535  ------------------------------------------------------------
536  */
537 
538  // buffer for event logging
540  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET>>>::const_iterator met_ = mets_.begin(); met_ != mets_.end();
541  ++met_) {
543  if (!event.getByToken(*met_, met))
544  continue;
545 
546  if (met->begin() != met->end()) {
547  unsigned int idx = met_ - mets_.begin();
548  if (idx == 0) {
549  caloMET = *met->begin();
550  fill("metCalo_", met->begin()->et());
551  if (!leadingJets.empty()) {
552  fill("dEtaJet1MET_", leadingJets[0].eta() - met->begin()->eta());
553  fill("dPhiJet1MET_", reco::deltaPhi(leadingJets[0].phi(), met->begin()->phi()));
554  }
555  if (!isoMuons.empty()) {
556  if (isoElecs.empty() || isoMuons[0]->pt() > isoElecs[0]->pt()) {
557  fill("dEtaLep1MET_", isoMuons[0]->eta() - met->begin()->eta());
558  fill("dPhiLep1MET_", reco::deltaPhi(isoMuons[0]->phi(), met->begin()->phi()));
559  }
560  }
561  if (!isoElecs.empty()) {
562  if (isoMuons.empty() || isoElecs[0]->pt() > isoMuons[0]->pt()) {
563  fill("dEtaLep1MET_", isoElecs[0]->eta() - met->begin()->eta());
564  fill("dPhiLep1MET_", reco::deltaPhi(isoElecs[0]->phi(), met->begin()->phi()));
565  }
566  }
567  }
568  if (idx == 1) {
569  fill("metTC_", met->begin()->et());
570  }
571  if (idx == 2) {
572  fill("metPflow_", met->begin()->et());
573  }
574  }
575  }
576 
577  /*
578  ------------------------------------------------------------
579 
580  Event Monitoring
581 
582  ------------------------------------------------------------
583  */
584 
585  // check number of isolated leptons
586  fill("lepMultIso_", isoMuons.size(), isoElecs.size());
587  // ELECMU channel
588  if (decayChannel(isoMuons, isoElecs) == ELECMU) {
589  fill("decayChannel_", 0.5);
590  double mass = (isoElecs[0]->p4() + isoMuons[0]->p4()).mass();
591  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
592  fill("dEtaL1L2_", isoElecs[0]->eta() - isoMuons[0]->eta());
593  fill("sumEtaL1L2_", (isoElecs[0]->eta() + isoMuons[0]->eta()) / 2);
594  fill("dPhiL1L2_", reco::deltaPhi(isoElecs[0]->phi(), isoMuons[0]->eta()));
595  fill("elecPt_", isoElecs[0]->pt());
596  fill("muonPt_", isoMuons[0]->pt());
597  fill("lep1Pt_", isoElecs[0]->pt() > isoMuons[0]->pt() ? isoElecs[0]->pt() : isoMuons[0]->pt());
598  fill("lep2Pt_", isoElecs[0]->pt() > isoMuons[0]->pt() ? isoMuons[0]->pt() : isoElecs[0]->pt());
599  // fill plots for trigger monitoring
601  fill(event, *triggerTable, "elecMu", elecMuPaths_);
602  if (elecMuLogged_ <= hists_.find("elecMuLogger_")->second->getNbinsY()) {
603  // log runnumber, lumi block, event number & some
604  // more pysics infomation for interesting events
605  fill("elecMuLogger_", 0.5, elecMuLogged_ + 0.5, event.eventAuxiliary().run());
606  fill("elecMuLogger_", 1.5, elecMuLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
607  fill("elecMuLogger_", 2.5, elecMuLogged_ + 0.5, event.eventAuxiliary().event());
608  fill("elecMuLogger_", 3.5, elecMuLogged_ + 0.5, isoMuons[0]->pt());
609  fill("elecMuLogger_", 4.5, elecMuLogged_ + 0.5, isoElecs[0]->pt());
610  if (!leadingJets.empty())
611  fill("elecMuLogger_", 5.5, elecMuLogged_ + 0.5, leadingJets[0].pt());
612  if (leadingJets.size() > 1)
613  fill("elecMuLogger_", 6.5, elecMuLogged_ + 0.5, leadingJets[1].pt());
614  fill("elecMuLogger_", 7.5, elecMuLogged_ + 0.5, caloMET.et());
615  ++elecMuLogged_;
616  }
617  }
618  }
619 
620  // DIMUON channel
621  if (decayChannel(isoMuons, isoElecs) == DIMUON) {
622  fill("decayChannel_", 1.5);
623  int charge = isoMuons[0]->charge() * isoMuons[1]->charge();
624  double mass = (isoMuons[0]->p4() + isoMuons[1]->p4()).mass();
625 
626  fill(charge < 0 ? "invMass_" : "invMassWC_", mass);
627  fill(charge < 0 ? "invMassLog_" : "invMassWCLog_", log10(mass));
628  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
629  fill("dEtaL1L2_", isoMuons[0]->eta() - isoMuons[1]->eta());
630  fill("sumEtaL1L2_", (isoMuons[0]->eta() + isoMuons[1]->eta()) / 2);
631  fill("dPhiL1L2_", reco::deltaPhi(isoMuons[0]->phi(), isoMuons[1]->phi()));
632  fill("muonPt_", isoMuons[0]->pt());
633  fill("muonPt_", isoMuons[1]->pt());
634  fill("lep1Pt_", isoMuons[0]->pt());
635  fill("lep2Pt_", isoMuons[1]->pt());
636  // fill plots for trigger monitoring
638  fill(event, *triggerTable, "diMuon", diMuonPaths_);
639  if (diMuonLogged_ <= hists_.find("diMuonLogger_")->second->getNbinsY()) {
640  // log runnumber, lumi block, event number & some
641  // more pysics infomation for interesting events
642  fill("diMuonLogger_", 0.5, diMuonLogged_ + 0.5, event.eventAuxiliary().run());
643  fill("diMuonLogger_", 1.5, diMuonLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
644  fill("diMuonLogger_", 2.5, diMuonLogged_ + 0.5, event.eventAuxiliary().event());
645  fill("diMuonLogger_", 3.5, diMuonLogged_ + 0.5, isoMuons[0]->pt());
646  fill("diMuonLogger_", 4.5, diMuonLogged_ + 0.5, isoMuons[1]->pt());
647  if (!leadingJets.empty())
648  fill("diMuonLogger_", 5.5, diMuonLogged_ + 0.5, leadingJets[0].pt());
649  if (leadingJets.size() > 1)
650  fill("diMuonLogger_", 6.5, diMuonLogged_ + 0.5, leadingJets[1].pt());
651  fill("diMuonLogger_", 7.5, diMuonLogged_ + 0.5, caloMET.et());
652  ++diMuonLogged_;
653  }
654  }
655  }
656 
657  // DIELEC channel
658  if (decayChannel(isoMuons, isoElecs) == DIELEC) {
659  fill("decayChannel_", 2.5);
660  int charge = isoElecs[0]->charge() * isoElecs[1]->charge();
661  double mass = (isoElecs[0]->p4() + isoElecs[1]->p4()).mass();
662  fill(charge < 0 ? "invMass_" : "invMassWC_", mass);
663  fill(charge < 0 ? "invMassLog_" : "invMassWCLog_", log10(mass));
664  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < mass && mass < upperEdge_)) {
665  fill("dEtaL1L2_", isoElecs[0]->eta() - isoElecs[1]->eta());
666  fill("sumEtaL1L2_", (isoElecs[0]->eta() + isoElecs[1]->eta()) / 2);
667  fill("dPhiL1L2_", reco::deltaPhi(isoElecs[0]->phi(), isoElecs[1]->phi()));
668  fill("elecPt_", isoElecs[0]->pt());
669  fill("elecPt_", isoElecs[1]->pt());
670  fill("lep1Pt_", isoElecs[0]->pt());
671  fill("lep2Pt_", isoElecs[1]->pt());
672  if (diElecLogged_ <= hists_.find("diElecLogger_")->second->getNbinsY()) {
673  // log runnumber, lumi block, event number & some
674  // more pysics infomation for interesting events
675  fill("diElecLogger_", 0.5, diElecLogged_ + 0.5, event.eventAuxiliary().run());
676  fill("diElecLogger_", 1.5, diElecLogged_ + 0.5, event.eventAuxiliary().luminosityBlock());
677  fill("diElecLogger_", 2.5, diElecLogged_ + 0.5, event.eventAuxiliary().event());
678  fill("diElecLogger_", 3.5, diElecLogged_ + 0.5, isoElecs[0]->pt());
679  fill("diElecLogger_", 4.5, diElecLogged_ + 0.5, isoElecs[1]->pt());
680  if (!leadingJets.empty())
681  fill("diElecLogger_", 5.5, diElecLogged_ + 0.5, leadingJets[0].pt());
682  if (leadingJets.size() > 1)
683  fill("diElecLogger_", 6.5, diElecLogged_ + 0.5, leadingJets[1].pt());
684  fill("diElecLogger_", 7.5, diElecLogged_ + 0.5, caloMET.et());
685  ++diElecLogged_;
686  }
687  }
688  }
689  }
690 } // namespace TopDiLeptonOffline
691 
693  : vertexSelect_(nullptr),
694  beamspotSelect_(nullptr),
695  MuonStep(nullptr),
696  ElectronStep(nullptr),
697  PvStep(nullptr),
698  METStep(nullptr) {
699  JetSteps.clear();
700  CaloJetSteps.clear();
701  PFJetSteps.clear();
702  // configure the preselection
703  edm::ParameterSet presel = cfg.getParameter<edm::ParameterSet>("preselection");
704  if (presel.existsAs<edm::ParameterSet>("trigger")) {
706  // triggerTable_=trigger.getParameter<edm::InputTag>("src");
707  triggerTable_ = consumes<edm::TriggerResults>(trigger.getParameter<edm::InputTag>("src"));
708  triggerPaths_ = trigger.getParameter<std::vector<std::string>>("select");
709  }
710  if (presel.existsAs<edm::ParameterSet>("vertex")) {
712  vertex_ = consumes<std::vector<reco::Vertex>>(vertex.getParameter<edm::InputTag>("src"));
713  vertexSelect_.reset(new StringCutObjectSelector<reco::Vertex>(vertex.getParameter<std::string>("select")));
714  }
715  if (presel.existsAs<edm::ParameterSet>("beamspot")) {
717  beamspot_ = consumes<reco::BeamSpot>(beamspot.getParameter<edm::InputTag>("src"));
719  }
720 
721  // conifgure the selection
722  sel_ = cfg.getParameter<std::vector<edm::ParameterSet>>("selection");
723  setup_ = cfg.getParameter<edm::ParameterSet>("setup");
724  for (unsigned int i = 0; i < sel_.size(); ++i) {
725  selectionOrder_.push_back(sel_.at(i).getParameter<std::string>("label"));
727  std::make_pair(sel_.at(i),
728  std::unique_ptr<TopDiLeptonOffline::MonitorEnsemble>(new TopDiLeptonOffline::MonitorEnsemble(
729  selectionStep(selectionOrder_.back()).c_str(), setup_, consumesCollector())));
730  }
731  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end();
732  ++selIt) {
733  std::string key = selectionStep(*selIt), type = objectType(*selIt);
734  if (selection_.find(key) != selection_.end()) {
735  if (type == "muons") {
737  }
738  if (type == "elecs") {
740  }
741  if (type == "pvs") {
743  }
744  if (type == "jets") {
747  }
748  if (type == "jets/pf") {
751  }
752  if (type == "jets/calo") {
755  }
756  if (type == "met") {
758  }
759  }
760  }
761 }
762 
763 void TopDiLeptonOfflineDQM::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) {
764  for (auto selIt = selection_.begin(); selIt != selection_.end(); ++selIt) {
765  selIt->second.second->book(ibooker);
766  }
767 }
771  if (!event.getByToken(triggerTable_, triggerTable))
772  return;
773  if (!accept(event, *triggerTable, triggerPaths_))
774  return;
775  }
776  if (!vertex_.isUninitialized()) {
778  if (!event.getByToken(vertex_, vertex))
779  return;
780  if (vertex->empty() || !(*vertexSelect_)(vertex->front()))
781  return;
782  }
783  if (!beamspot_.isUninitialized()) {
785  if (!event.getByToken(beamspot_, beamspot))
786  return;
787  if (!(*beamspotSelect_)(*beamspot))
788  return;
789  }
790  unsigned int passed = 0;
791 
792  unsigned int nJetSteps = -1;
793 
794  unsigned int nPFJetSteps = -1;
795 
796  unsigned int nCaloJetSteps = -1;
797  // apply selection steps
798  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end();
799  ++selIt) {
800  std::string key = selectionStep(*selIt), type = objectType(*selIt);
801  if (selection_.find(key) != selection_.end()) {
802  if (type == "empty") {
803  selection_[key].second->fill(event, setup);
804  }
805  if (type == "muons" && MuonStep != nullptr) {
806  if (MuonStep->select(event)) {
807  ++passed;
808  selection_[key].second->fill(event, setup);
809  } else
810  break;
811  }
812  if (type == "elecs" && ElectronStep != nullptr) {
813  if (ElectronStep->select(event, "electron")) {
814  ++passed;
815  selection_[key].second->fill(event, setup);
816  } else
817  break;
818  }
819  if (type == "jets" && !JetSteps.empty()) {
820  nJetSteps++;
821  if (JetSteps[nJetSteps] != nullptr) {
822  if (JetSteps[nJetSteps]->select(event, setup)) {
823  ++passed;
824  selection_[key].second->fill(event, setup);
825  } else
826  break;
827  }
828  }
829 
830  if (type == "jets/pf" && !PFJetSteps.empty()) {
831  nPFJetSteps++;
832  if (PFJetSteps[nPFJetSteps] != nullptr) {
833  if (PFJetSteps[nPFJetSteps]->select(event, setup)) {
834  ++passed;
835  selection_[key].second->fill(event, setup);
836  } else
837  break;
838  }
839  }
840 
841  if (type == "jets/calo" && !CaloJetSteps.empty()) {
842  nCaloJetSteps++;
843  if (CaloJetSteps[nCaloJetSteps] != nullptr) {
844  if (CaloJetSteps[nCaloJetSteps]->select(event, setup)) {
845  ++passed;
846  selection_[key].second->fill(event, setup);
847  } else
848  break;
849  }
850  }
851 
852  if (type == "met" && METStep != nullptr) {
853  ++passed;
854  if (METStep->select(event)) {
855  selection_[key].second->fill(event, setup);
856  } else
857  break;
858  }
859  }
860  }
861 }
TopDiLeptonOfflineDQM::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: TopDiLeptonOfflineDQM.cc:763
TopDiLeptonOfflineDQM::sel_
std::vector< edm::ParameterSet > sel_
Definition: TopDiLeptonOfflineDQM.h:349
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
JetTag.h
TopDiLeptonOfflineDQM::vertexSelect_
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
Definition: TopDiLeptonOfflineDQM.h:326
reco::Jet::scaleEnergy
virtual void scaleEnergy(double fScale)
scale energy of the jet
CaloJet.h
mps_fire.i
i
Definition: mps_fire.py:355
TopDiLeptonOffline::MonitorEnsemble::elecSelect_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecSelect_
extra selection on electrons
Definition: TopDiLeptonOfflineDQM.h:153
TopDiLeptonOffline::MonitorEnsemble::mets_
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
Definition: TopDiLeptonOfflineDQM.h:124
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
TopDiLeptonOffline::MonitorEnsemble
Definition: TopDiLeptonOfflineDQM.h:52
TopDiLeptonOffline::MonitorEnsemble::diMuonPaths_
std::vector< std::string > diMuonPaths_
trigger paths for di muon channel
Definition: TopDiLeptonOfflineDQM.h:132
muon
Definition: MuonCocktails.h:17
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edm::Run
Definition: Run.h:45
TopDiLeptonOfflineDQM::TopDiLeptonOfflineDQM
TopDiLeptonOfflineDQM(const edm::ParameterSet &cfg)
default constructor
Definition: TopDiLeptonOfflineDQM.cc:692
reco::deltaPhi
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
edm::EDGetTokenT
Definition: EDGetToken.h:33
TopDiLeptonOffline::MonitorEnsemble::decayChannel
DecayChannel decayChannel(const std::vector< const reco::PFCandidate * > &muons, const std::vector< const reco::PFCandidate * > &elecs) const
determine dileptonic decay channel
Definition: TopDiLeptonOfflineDQM.h:231
TopDiLeptonOfflineDQM.h
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
TopDiLeptonOfflineDQM::selectionOrder_
std::vector< std::string > selectionOrder_
Definition: TopDiLeptonOfflineDQM.h:334
PFJet.h
singleTopDQM_cfi.elecExtras
elecExtras
Definition: singleTopDQM_cfi.py:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TopDiLeptonOfflineDQM::objectType
std::string objectType(const std::string &label)
Definition: TopDiLeptonOfflineDQM.h:313
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:71
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
HLTObjectsMonitor_cfi.beamspot
beamspot
Definition: HLTObjectsMonitor_cfi.py:11
TopDiLeptonOffline::MonitorEnsemble::loggerBinLabels
void loggerBinLabels(std::string hist)
set labels for event logging histograms
Definition: TopDiLeptonOfflineDQM.h:182
TopDiLeptonOffline::MonitorEnsemble::DIMUON
Definition: TopDiLeptonOfflineDQM.h:60
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
TopDiLeptonOffline::MonitorEnsemble::DEBUG
Definition: TopDiLeptonOfflineDQM.h:55
topSingleLeptonDQM_PU_cfi.electronId
electronId
when omitted electron plots will be filled w/o cut on electronId
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::Handle< edm::TriggerResults >
TopDiLeptonOffline::MonitorEnsemble::jetIDLabel_
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
Definition: TopDiLeptonOfflineDQM.h:164
TopDiLeptonOfflineDQM::JetSteps
std::vector< std::unique_ptr< SelectionStep< reco::Jet > > > JetSteps
Definition: TopDiLeptonOfflineDQM.h:345
dqmdumpme.first
first
Definition: dqmdumpme.py:55
JetCorrector
Definition: JetCorrector.h:19
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
slimmedMETs_cfi.caloMET
caloMET
Definition: slimmedMETs_cfi.py:17
TopDiLeptonOffline::MonitorEnsemble::muons_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
Definition: TopDiLeptonOfflineDQM.h:120
edm::Ref< MuonCollection >
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
TopDiLeptonOffline::MonitorEnsemble::triggerTable_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
Definition: TopDiLeptonOfflineDQM.h:127
TopDiLeptonOffline::MonitorEnsemble::jetIDSelect_
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
Definition: TopDiLeptonOfflineDQM.h:166
pfClustersFromHGC3DClusters_cfi.corrector
corrector
Definition: pfClustersFromHGC3DClusters_cfi.py:4
JetCorrectionsRecord.h
TopDiLeptonOfflineDQM::PvStep
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
Definition: TopDiLeptonOfflineDQM.h:343
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
TopDiLeptonOffline::MonitorEnsemble::electronId_
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
Definition: TopDiLeptonOfflineDQM.h:135
TopDiLeptonOffline::MonitorEnsemble::triggerBinLabels
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
Definition: TopDiLeptonOfflineDQM.h:207
reco::MET
Definition: MET.h:41
TopDiLeptonOffline::MonitorEnsemble::elecMuPaths_
std::vector< std::string > elecMuPaths_
Definition: TopDiLeptonOfflineDQM.h:130
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TopDiLeptonOffline::MonitorEnsemble::directory_
std::string directory_
Definition: TopDiLeptonOfflineDQM.h:179
PVValHelper::eta
Definition: PVValidationHelpers.h:69
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
singleTopDQM_cfi.muonExtras
muonExtras
Definition: singleTopDQM_cfi.py:56
TopDiLeptonOffline::MonitorEnsemble::VERBOSE
Definition: TopDiLeptonOfflineDQM.h:55
beamspot
Definition: BeamSpotWrite2Txt.h:8
TopDiLeptonOffline::MonitorEnsemble::ELECMU
Definition: TopDiLeptonOfflineDQM.h:60
singleTopDQM_cfi.elecs
elecs
Definition: singleTopDQM_cfi.py:41
TopDiLeptonOffline::MonitorEnsemble::label_
std::string label_
instance label
Definition: TopDiLeptonOfflineDQM.h:117
TopDiLeptonOffline::MonitorEnsemble::lowerEdge_
double lowerEdge_
mass window upper and lower edge
Definition: TopDiLeptonOfflineDQM.h:171
TopDiLeptonOfflineDQM::analyze
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
do this during the event loop
Definition: TopDiLeptonOfflineDQM.cc:768
EDGetToken.h
TopDiLeptonOfflineDQM::beamspotSelect_
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
Definition: TopDiLeptonOfflineDQM.h:330
TopDiLeptonOfflineDQM::PFJetSteps
std::vector< std::unique_ptr< SelectionStep< reco::PFJet > > > PFJetSteps
Definition: TopDiLeptonOfflineDQM.h:347
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TopDiLeptonOffline::MonitorEnsemble::jetCorrector_
std::string jetCorrector_
jetCorrector
Definition: TopDiLeptonOfflineDQM.h:162
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
TopDiLeptonOfflineDQM::ElectronStep
std::unique_ptr< SelectionStep< reco::PFCandidate > > ElectronStep
Definition: TopDiLeptonOfflineDQM.h:342
TopDiLeptonOffline::MonitorEnsemble::eidCutValue_
double eidCutValue_
Definition: TopDiLeptonOfflineDQM.h:149
singleTopDQM_cfi.massExtras
massExtras
Definition: singleTopDQM_cfi.py:70
edm::View< reco::PFCandidate >
funct::true
true
Definition: Factorize.h:173
TopDiLeptonOfflineDQM::vertex_
edm::EDGetTokenT< std::vector< reco::Vertex > > vertex_
primary vertex
Definition: TopDiLeptonOfflineDQM.h:324
TopDiLeptonOfflineDQM::selectionStep
std::string selectionStep(const std::string &label)
Definition: TopDiLeptonOfflineDQM.h:316
TopDiLeptonOffline::MonitorEnsemble::diMuonLogged_
int diMuonLogged_
Definition: TopDiLeptonOfflineDQM.h:174
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
edm::ParameterSet
Definition: ParameterSet.h:36
TopDiLeptonOffline::MonitorEnsemble::elecMuLogged_
int elecMuLogged_
number of logged interesting events
Definition: TopDiLeptonOfflineDQM.h:174
TopDiLeptonOfflineDQM::METStep
std::unique_ptr< SelectionStep< reco::MET > > METStep
Definition: TopDiLeptonOfflineDQM.h:344
EDConsumerBase.h
TopDiLeptonOfflineDQM::beamspot_
edm::EDGetTokenT< reco::BeamSpot > beamspot_
beamspot
Definition: TopDiLeptonOfflineDQM.h:328
TopDiLeptonOffline::MonitorEnsemble::upperEdge_
double upperEdge_
Definition: TopDiLeptonOfflineDQM.h:171
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TopDiLeptonOffline::MonitorEnsemble::diElecLogged_
int diElecLogged_
Definition: TopDiLeptonOfflineDQM.h:174
edm::LogVerbatim
Definition: MessageLogger.h:297
JetCorrector::getJetCorrector
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing
Definition: JetCorrector.cc:48
goodZToMuMu_cfi.overlap
overlap
Definition: goodZToMuMu_cfi.py:108
TopDiLeptonOfflineDQM::setup_
edm::ParameterSet setup_
Definition: TopDiLeptonOfflineDQM.h:350
edm::EventSetup
Definition: EventSetup.h:57
TopDiLeptonOffline::MonitorEnsemble::elecIso_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate > > elecIso_
extra isolation criterion on electron
Definition: TopDiLeptonOfflineDQM.h:151
looper.cfg
cfg
Definition: looper.py:297
TopDiLeptonOffline::MonitorEnsemble::book
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
Definition: TopDiLeptonOfflineDQM.cc:130
TopDiLeptonOffline::MonitorEnsemble::muonSelect_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect_
extra selection on muons
Definition: TopDiLeptonOfflineDQM.h:159
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
type
type
Definition: HCALResponse.h:21
singleTopDQM_cfi.jetExtras
jetExtras
Definition: singleTopDQM_cfi.py:60
singleTopDQM_cfi.monitoring
monitoring
Definition: singleTopDQM_cfi.py:46
TopDiLeptonOffline::MonitorEnsemble::DIELEC
Definition: TopDiLeptonOfflineDQM.h:60
TopDiLeptonOfflineDQM::MuonStep
std::unique_ptr< SelectionStep< reco::PFCandidate > > MuonStep
Definition: TopDiLeptonOfflineDQM.h:341
metsig::jet
Definition: SignAlgoResolutions.h:47
TopDiLeptonOffline
Definition: TopDiLeptonOfflineDQM.cc:12
edm::ValueMap< float >
dqm::implementation::IBooker::book2D
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:177
TopDiLeptonOfflineDQM::CaloJetSteps
std::vector< std::unique_ptr< SelectionStep< reco::CaloJet > > > CaloJetSteps
Definition: TopDiLeptonOfflineDQM.h:346
StringCutObjectSelector< reco::PFCandidate >
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
TriggerAnalyzer.passed
passed
Definition: TriggerAnalyzer.py:62
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
TopDiLeptonOfflineDQM::triggerPaths_
std::vector< std::string > triggerPaths_
trigger paths
Definition: TopDiLeptonOfflineDQM.h:322
SelectionStep
Templated helper class to allow a selection on a certain object collection.
Definition: TopDQMHelpers.h:237
TopDiLeptonOffline::MonitorEnsemble::jetSelect_
std::string jetSelect_
Definition: TopDiLeptonOfflineDQM.h:169
reco::deltaR
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
TopDiLeptonOfflineDQM::triggerTable_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
Definition: TopDiLeptonOfflineDQM.h:316
VarParsing.mult
mult
Definition: VarParsing.py:659
dqm::implementation::IBooker
Definition: DQMStore.h:43
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
trigger
Definition: HLTPrescaleTableCond.h:8
TopDiLeptonOffline::MonitorEnsemble::elecs_
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
Definition: TopDiLeptonOfflineDQM.h:121
TopDiLeptonOfflineDQM::selection_
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< TopDiLeptonOffline::MonitorEnsemble > > > selection_
Definition: TopDiLeptonOfflineDQM.h:340
ConsumesCollector.h
dummy
Definition: DummySelector.h:38
TopDiLeptonOffline::MonitorEnsemble::STANDARD
Definition: TopDiLeptonOfflineDQM.h:55
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
event
Definition: event.py:1
TopDiLeptonOffline::MonitorEnsemble::verbosity_
Level verbosity_
verbosity level for booking
Definition: TopDiLeptonOfflineDQM.h:111
TopDiLeptonOffline::MonitorEnsemble::jets_
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
Definition: TopDiLeptonOfflineDQM.h:119
edm::Event
Definition: Event.h:73
TopDiLeptonOffline::MonitorEnsemble::MonitorEnsemble
MonitorEnsemble(const char *label, const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition: TopDiLeptonOfflineDQM.cc:14
crabWrapper.key
key
Definition: crabWrapper.py:19
TopDiLeptonOffline::MonitorEnsemble::muonIso_
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonIso_
extra isolation criterion on muon
Definition: TopDiLeptonOfflineDQM.h:156
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::TriggerResults
Definition: TriggerResults.h:35
vertexPlots.e4
e4
Definition: vertexPlots.py:64
TopDiLeptonOffline::MonitorEnsemble::hists_
std::map< std::string, MonitorElement * > hists_
Definition: TopDiLeptonOfflineDQM.h:177
TopDiLeptonOffline::MonitorEnsemble::fill
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
Definition: TopDiLeptonOfflineDQM.cc:285
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
TopDQMHelpers.h