CMS 3D CMS Logo

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