CMS 3D CMS Logo

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