CMS 3D CMS Logo

SingleTopTChannelLeptonDQM.cc
Go to the documentation of this file.
10 #include <iostream>
14 using namespace std;
16 
17 // maximal number of leading jets
18 // to be used for top mass estimate
19 static const unsigned int MAXJETS = 4;
20 // nominal mass of the W boson to
21 // be used for the top mass estimate
22 static const double WMASS = 80.4;
23 
24 MonitorEnsemble::MonitorEnsemble(const char* label,
25  const edm::ParameterSet& cfg,
26  const edm::VParameterSet& vcfg,
28  : label_(label),
29  pvSelect_(nullptr),
30  jetIDSelect_(nullptr),
31  includeBTag_(false),
32  lowerEdge_(-1.),
33  upperEdge_(-1.),
34  logged_(0) {
35  // sources have to be given; this PSet is not optional
36  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
37  muons_ = iC.consumes<edm::View<reco::PFCandidate>>(
38  sources.getParameter<edm::InputTag>("muons"));
40  sources.getParameter<edm::InputTag>("elecs_gsf"));
41  elecs_ = iC.consumes<edm::View<reco::PFCandidate>>(
42  sources.getParameter<edm::InputTag>("elecs"));
43  jets_ = iC.consumes<edm::View<reco::Jet>>(
44  sources.getParameter<edm::InputTag>("jets"));
45  for (edm::InputTag const& tag :
46  sources.getParameter<std::vector<edm::InputTag>>("mets"))
47  mets_.push_back(iC.consumes<edm::View<reco::MET>>(tag));
48  pvs_ = iC.consumes<edm::View<reco::Vertex>>(
49  sources.getParameter<edm::InputTag>("pvs"));
50  // electronExtras are optional; they may be omitted or
51  // empty
52  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
53  edm::ParameterSet elecExtras =
54  cfg.getParameter<edm::ParameterSet>("elecExtras");
55  // select is optional; in case it's not found no
56  // selection will be applied
57  if (elecExtras.existsAs<std::string>("select")) {
58  elecSelect_ = vcfg[1].getParameter<std::string>("select");
59  }
60  // isolation is optional; in case it's not found no
61  // isolation will be applied
62  if (elecExtras.existsAs<std::string>("isolation")) {
63  elecIso_ = elecExtras.getParameter<std::string>("isolation");
64  }
65 
66 
67  // electronId is optional; in case it's not found the
68  // InputTag will remain empty
69  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
70  edm::ParameterSet elecId =
71  elecExtras.getParameter<edm::ParameterSet>("electronId");
72  electronId_ = iC.consumes<edm::ValueMap<float>>(
73  elecId.getParameter<edm::InputTag>("src"));
74  eidCutValue_ = elecId.getParameter<double>("cutValue");
75  }
76  }
77  // pvExtras are opetional; they may be omitted or empty
78  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
79  edm::ParameterSet pvExtras =
80  cfg.getParameter<edm::ParameterSet>("pvExtras");
81  // select is optional; in case it's not found no
82  // selection will be applied
83  if (pvExtras.existsAs<std::string>("select")) {
85  pvExtras.getParameter<std::string>("select")));
86  }
87  }
88  // muonExtras are optional; they may be omitted or empty
89  if (cfg.existsAs<edm::ParameterSet>(
90  "muonExtras")) { // && vcfg.existsAs<std::vector<edm::ParameterSet>
91  // >("selection")){
92  edm::ParameterSet muonExtras =
93  cfg.getParameter<edm::ParameterSet>("muonExtras");
94 
95  // select is optional; in case it's not found no
96  // selection will be applied
97  if (muonExtras.existsAs<std::string>("select")) {
98  muonSelect_ = vcfg[1].getParameter<std::string>("select");
99  }
100  // isolation is optional; in case it's not found no
101  // isolation will be applied
102  if (muonExtras.existsAs<std::string>("isolation")) {
103  muonIso_ = muonExtras.getParameter<std::string>("isolation");
104  }
105  }
106 
107 
108  // jetExtras are optional; they may be omitted or
109  // empty
110  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
111  edm::ParameterSet jetExtras =
112  cfg.getParameter<edm::ParameterSet>("jetExtras");
113  // jetCorrector is optional; in case it's not found
114  // the InputTag will remain empty
115  if (jetExtras.existsAs<std::string>("jetCorrector")) {
116  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
117  }
118  // read jetID information if it exists
119  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
120  edm::ParameterSet jetID =
121  jetExtras.getParameter<edm::ParameterSet>("jetID");
122  jetIDLabel_ = iC.consumes<reco::JetIDValueMap>(
123  jetID.getParameter<edm::InputTag>("label"));
125  jetID.getParameter<std::string>("select")));
126  }
127  // select is optional; in case it's not found no
128  // selection will be applied (only implemented for
129  // CaloJets at the moment)
130  if (jetExtras.existsAs<std::string>("select")) {
131 
132  jetSelect_ = jetExtras.getParameter<std::string>("select");
133  jetSelect_ = vcfg[2].getParameter<std::string>("select");
134  }
135 
136  // jetBDiscriminators are optional; in case they are
137  // not found the InputTag will remain empty; they
138  // consist of pairs of edm::JetFlavorAssociation's &
139  // corresponding working points
140  includeBTag_ = jetExtras.existsAs<edm::ParameterSet>("jetBTaggers");
141  if (includeBTag_) {
142 
143  edm::ParameterSet btagCombVtx =
144  jetExtras.getParameter<edm::ParameterSet>("jetBTaggers")
145  .getParameter<edm::ParameterSet>("combinedSecondaryVertex");
146  btagCombVtx_ = iC.consumes<reco::JetTagCollection>(
147  btagCombVtx.getParameter<edm::InputTag>("label"));
148  btagCombVtxWP_ = btagCombVtx.getParameter<double>("workingPoint");
149  }
150  }
151 
152  // triggerExtras are optional; they may be omitted or empty
153  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
154  edm::ParameterSet triggerExtras =
155  cfg.getParameter<edm::ParameterSet>("triggerExtras");
156  triggerTable_ = iC.consumes<edm::TriggerResults>(
157  triggerExtras.getParameter<edm::InputTag>("src"));
158  triggerPaths_ =
159  triggerExtras.getParameter<std::vector<std::string>>("paths");
160  }
161 
162  // massExtras is optional; in case it's not found no mass
163  // window cuts are applied for the same flavor monitor
164  // histograms
165  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
166  edm::ParameterSet massExtras =
167  cfg.getParameter<edm::ParameterSet>("massExtras");
168  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
169  upperEdge_ = massExtras.getParameter<double>("upperEdge");
170  }
171 
172  // setup the verbosity level for booking histograms;
173  // per default the verbosity level will be set to
174  // STANDARD. This will also be the chosen level in
175  // the case when the monitoring PSet is not found
177  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
179  cfg.getParameter<edm::ParameterSet>("monitoring");
180  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
181  verbosity_ = DEBUG;
182  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
183  verbosity_ = VERBOSE;
184  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
185  verbosity_ = STANDARD;
186  }
187  // and don't forget to do the histogram booking
188  directory_ = cfg.getParameter<std::string>("directory");
189 
190 
193 
194 
195 
198 
199 }
200 
202  // set up the current directory path
203  std::string current(directory_);
204  current += label_;
205  ibooker.setCurrentFolder(current);
206 
207  // determine number of bins for trigger monitoring
208  unsigned int nPaths = triggerPaths_.size();
209 
210  // --- [STANDARD] --- //
211  // number of selected primary vertices
212  hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{pvs}", 100, 0., 100.);
213  // pt of the leading muon
214  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 250.);
215  // muon multiplicity before std isolation
216  hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{20}(#mu)", 10, 0., 10.);
217  // muon multiplicity after std isolation
218  hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", "N_{Iso}(#mu)", 10, 0., 10.);
219  // pt of the leading electron
220  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 250.);
221  // electron multiplicity before std isolation
222  hists_["elecMult_"] = ibooker.book1D("ElecMult", "N_{30}(e)", 10, 0., 10.);
223  // electron multiplicity after std isolation
224  hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.);
225  // multiplicity of jets with pt>20 (corrected to L2+L3)
226  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.);
227  // trigger efficiency estimates for single lepton triggers
228  hists_["triggerEff_"] = ibooker.book1D("TriggerEff",
229  "Eff(trigger)", nPaths, 0., nPaths);
230  // monitored trigger occupancy for single lepton triggers
231  hists_["triggerMon_"] = ibooker.book1D("TriggerMon",
232  "Mon(trigger)", nPaths, 0., nPaths);
233  // MET (calo)
234  hists_["metCalo_"] = ibooker.book1D("METCalo", "MET_{Calo}", 50, 0., 200.);
235  // W mass estimate
236  hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.);
237  // Top mass estimate
238  hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.);
239  // W mass transverse estimate mu
240  hists_["MTWm_"] = ibooker.book1D("MTWm", "M_{T}^{W}(#mu)", 60, 0., 300.);
241  // Top mass transverse estimate mu
242  hists_["mMTT_"] = ibooker.book1D("mMTT", "M_{T}^{t}(#mu)", 50, 0., 500.);
243 
244  // W mass transverse estimate e
245  hists_["MTWe_"] = ibooker.book1D("MTWe", "M_{T}^{W}(e)", 60, 0., 300.);
246  // Top mass transverse estimate e
247  hists_["eMTT_"] = ibooker.book1D("eMTT", "M_{T}^{t}(e)", 50, 0., 500.);
248 
249  // set bin labels for trigger monitoring
251 
252  if (verbosity_ == STANDARD) return;
253 
254  // --- [VERBOSE] --- //
255 
256  // eta of the leading muon
257  hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu)", 30, -3., 3.);
258  // std isolation variable of the leading muon
259  hists_["muonPFRelIso_"] = ibooker.book1D("MuonPFRelIso",
260  "PFIso_{Rel}(#mu)", 50, 0., 1.);
261  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu)", 50, 0., 1.);
262 
263  // eta of the leading electron
264  hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e)", 30, -3., 3.);
265  // std isolation variable of the leading electron
266  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.);
267  hists_["elecPFRelIso_"] = ibooker.book1D("ElecPFRelIso",
268  "PFIso_{Rel}(e)", 50, 0., 1.);
269 
270  // multiplicity of btagged jets (for track counting high efficiency) with
271  // pt(L2L3)>30
272  // hists_["jetMultBEff_"] = ibooker.book1D("JetMultBEff",
273  // "N_{30}(b/eff)", 10, 0., 10.);
274  // btag discriminator for track counting high efficiency for jets with
275  // pt(L2L3)>30
276  // hists_["jetBDiscEff_"] = ibooker.book1D("JetBDiscEff",
277  // "Disc_{b/eff}(jet)", 100, 0., 10.);
278 
279  // eta of the 1. leading jet
280  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta (jet1)", 50, -5., 5.);
281  // eta of the 2. leading jet
282  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta (jet2)", 50, -5., 5.);
283 
284  // pt of the 1. leading jet (corrected to L2+L3)
285  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.);
286  // pt of the 2. leading jet (corrected to L2+L3)
287  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.);
288 
289  // eta and pt of the b-tagged jet (filled only when nJets==2)
290  hists_["TaggedJetEta_"] = ibooker.book1D("TaggedJetEta",
291  "#eta (Tagged jet)", 50, -5., 5.);
292  hists_["TaggedJetPt_"] = ibooker.book1D("TaggedJetPt",
293  "pt_{L2L3}(Tagged jet)", 60, 0., 300.);
294 
295  // eta and pt of the jet not passing b-tag (filled only when nJets==2)
296  hists_["UnTaggedJetEta_"] = ibooker.book1D("UnTaggedJetEta",
297  "#eta (UnTagged jet)", 50, -5., 5.);
298  hists_["UnTaggedJetPt_"] = ibooker.book1D("UnTaggedJetPt",
299  "pt_{L2L3}(UnTagged jet)", 60, 0., 300.);
300 
301  // eta and pt of the most forward jet in the event with nJets==2
302  hists_["FwdJetEta_"] = ibooker.book1D("FwdJetEta", "#eta (Fwd jet)", 50, -5., 5.);
303  hists_["FwdJetPt_"] = ibooker.book1D("FwdJetPt",
304  "pt_{L2L3}(Fwd jet)", 60, 0., 300.);
305 
306  // 2D histogram (pt,eta) of the b-tagged jet (filled only when nJets==2)
307  hists_["TaggedJetPtEta_"] = ibooker.book2D("TaggedJetPt_Eta",
308  "(pt vs #eta)_{L2L3}(Tagged jet)", 60, 0., 300., 50, -5., 5.);
309 
310  // 2D histogram (pt,eta) of the not-b tagged jet (filled only when nJets==2)
311  hists_["UnTaggedJetPtEta_"] = ibooker.book2D("UnTaggedJetPt_Eta",
312  "(pt vs #eta)_{L2L3}(UnTagged jet)", 60, 0., 300., 50, -5., 5.);
313 
314  // MET (tc)
315  hists_["metTC_"] = ibooker.book1D("METTC", "MET_{TC}", 50, 0., 200.);
316  // MET (pflow)
317  hists_["metPflow_"] = ibooker.book1D("METPflow", "MET_{Pflow}", 50, 0., 200.);
318 
319  // dz for muons (to suppress cosmis)
320  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
321  // dxy for muons (to suppress cosmics)
322  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY",
323  "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
324 
325  // set axes titles for dxy for muons
326  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
327  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
328 
329  if (verbosity_ == VERBOSE) return;
330 
331  // --- [DEBUG] --- //
332 
333  // relative muon isolation from charged hadrons for the leading muon
334  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIso",
335  "Iso_{ChHad}(#mu)", 100, 0., 1.);
336  // relative muon isolation from neutral hadrons for the leading muon
337  hists_["muonNeuHadIso_"] = ibooker.book1D("MuonNeuHadIso",
338  "Iso_{NeuHad}(#mu)", 100, 0., 1.);
339  // relative muon isolation from photons for the leading muon
340  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIso", "Iso_{Ph}(#mu)", 100, 0., 1.);
341 
342  // relative electron isolation from charged hadrons for the leading electron
343  hists_["elecChHadIso_"] = ibooker.book1D("ElecChHadIso",
344  "Iso_{ChHad}(e)", 100, 0., 1.);
345  // relative electron isolation from neutral hadrons for the leading electron
346  hists_["elecNeuHadIso_"] = ibooker.book1D("ElecNeuHadIso",
347  "Iso_{NeuHad}(e)", 100, 0., 1.);
348  // relative electron isolation from photons for the leading electron
349  hists_["elecPhIso_"] = ibooker.book1D("ElecPhIso", "Iso_{Ph}(e)", 100, 0., 1.);
350 
351 
352 
353  // multiplicity of btagged jets (for combined secondary vertex) with
354  // pt(L2L3)>30
355  hists_["jetMultBCombVtx_"] = ibooker.book1D("JetMultBCombVtx",
356  "N_{30}(b/CSV)", 10, 0., 10.);
357  // btag discriminator for combined secondary vertex
358  hists_["jetBDiscCombVtx_"] = ibooker.book1D("JetBDiscCombVtx",
359  "Disc_{b/CSV}(Jet)", 60, -1., 2.);
360  // btag discriminator for combined secondary vertex for 1. leading jet
361  hists_["jet1BDiscCombVtx_"] = ibooker.book1D("Jet1BDiscCombVtx",
362  "Disc_{b/CSV}(Jet1)", 60, -1., 2.);
363  // btag discriminator for combined secondary vertex for 2. leading jet
364  hists_["jet2BDiscCombVtx_"] = ibooker.book1D("Jet2BDiscCombVtx",
365  "Disc_{b/CSV}(Jet2)", 60, -1., 2.);
366 
367  // pt of the 1. leading jet (uncorrected)
368  hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
369  // pt of the 2. leading jet (uncorrected)
370  hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
371 
372  // selected events
373  hists_["eventLogger_"] = ibooker.book2D("EventLogger",
374  "Logged Events", 9, 0., 9., 10, 0., 10.);
375 
376  // set axes titles for selected events
377  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
378  hists_["eventLogger_"]->setBinLabel(1, "Run", 1);
379  hists_["eventLogger_"]->setBinLabel(2, "Block", 1);
380  hists_["eventLogger_"]->setBinLabel(3, "Event", 1);
381  hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1);
382  hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1);
383  hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1);
384  hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1);
385  hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1);
386  hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1);
387  hists_["eventLogger_"]->setAxisTitle("logged evts", 2);
388  return;
389 }
390 
392  const edm::EventSetup& setup) {
393  // fetch trigger event if configured such
396  if (!event.getByToken(triggerTable_, triggerTable)) return;
397  }
398 
399  /*
400  ------------------------------------------------------------
401 
402  Primary Vertex Monitoring
403 
404  ------------------------------------------------------------
405  */
406 
407  // fill monitoring plots for primary vertices
409  if (!event.getByToken(pvs_, pvs)) return;
410  unsigned int pvMult = 0;
411  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin();
412  pv != pvs->end(); ++pv) {
413  if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++;
414  }
415  fill("pvMult_", pvMult);
416 
417  /*
418  ------------------------------------------------------------
419 
420  Electron Monitoring
421 
422  ------------------------------------------------------------
423  */
424 
425  // fill monitoring plots for electrons
429 
431 
432  if (!event.getByToken(elecs_, elecs)) return;
433 
434  if (!event.getByToken(elecs_gsf_, elecs_gsf)) return;
435 
436  // check availability of electron id
438  if (!electronId_.isUninitialized()) {
439  if (!event.getByToken(electronId_, electronId)) {
440  return;
441  }
442  }
443  // loop electron collection
444  unsigned int eMult = 0, eMultIso = 0;
445  std::vector<const reco::GsfElectron*> isoElecs;
447 
448  unsigned int idx_gsf = 0;
449  for (elec_it = elecs->begin(); elec_it != elecs->end(); ++elec_it) {
450  if (elec_it->gsfElectronRef().isNull()) continue;
451 
452  reco::GsfElectronRef elec = elec_it->gsfElectronRef();
453  if (elec->gsfTrack().isNull()) continue;
454 
455  // restrict to electrons with good electronId
456  if (electronId_.isUninitialized() ? true : ((double)(*electronId)[elec] >=
457  eidCutValue_)) {
458  if ((*elecSelect)(*elec_it)) {
459  double isolationRel =
460  (elec->dr03TkSumPt() + elec->dr03EcalRecHitSumEt() +
461  elec->dr03HcalTowerSumEt()) /
462  elec->pt();
463 
464  double isolationChHad =
465  elec->pt() /
466  (elec->pt() + elec->pfIsolationVariables().sumChargedHadronPt);
467  double isolationNeuHad =
468  elec->pt() /
469  (elec->pt() + elec->pfIsolationVariables().sumNeutralHadronEt);
470  double isolationPhoton =
471  elec->pt() /
472  (elec->pt() + elec->pfIsolationVariables().sumPhotonEt);
473  double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt;
474  double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt;
475  double el_PhIso = elec->pfIsolationVariables().sumPhotonEt;
476  double PFisolationRel =
477  (el_ChHadIso +
478  max(0., el_NeHadIso + el_PhIso -
479  0.5 * elec->pfIsolationVariables().sumPUPt)) /
480  elec->pt();
481 
482  if (eMult == 0) {
483  // restrict to the leading electron
484  fill("elecPt_", elec->pt());
485  fill("elecEta_", elec->eta());
486  fill("elecRelIso_", isolationRel);
487  fill("elecPFRelIso_", PFisolationRel);
488  fill("elecChHadIso_", isolationChHad);
489  fill("elecNeuHadIso_", isolationNeuHad);
490  fill("elecPhIso_", isolationPhoton);
491  }
492  // in addition to the multiplicity counter buffer the iso
493  // electron candidates for later overlap check with jets
494  ++eMult;
495  if ((*elecIso)(*elec_it)) {
496  if (eMultIso == 0) e = *elec;
497  isoElecs.push_back(&(*elec));
498  ++eMultIso;
499  }
500  }
501  }
502  idx_gsf++;
503  }
504 
505  fill("elecMult_", eMult);
506  fill("elecMultIso_", eMultIso);
507 
508  /*
509  ------------------------------------------------------------
510 
511  Muon Monitoring
512 
513  ------------------------------------------------------------
514  */
515 
516  // fill monitoring plots for muons
517  unsigned int mMult = 0, mMultIso = 0;
518 
522  reco::Muon mu;
523 
524  if (!event.getByToken(muons_, muons)) return;
525  for (muonit = muons->begin(); muonit != muons->end();
526  ++muonit) { // for now, to use Reco::Muon need to substitute muonit
527  // with muon
528  // and comment the MuonRef and PFCandidate parts
529 
530  if (muonit->muonRef().isNull()) continue;
531  reco::MuonRef muon = muonit->muonRef();
532 
533  if (muon->innerTrack().isNull()) continue;
534 
535  // restrict to globalMuons
536  if (muon->isGlobalMuon()) {
537  fill("muonDelZ_", muon->globalTrack()->vz());
538  fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy());
539 
540  // apply selection
541  if ((*muonSelect)(*muonit)) {
542 
543  double isolationRel =
544  (muon->isolationR03().sumPt + muon->isolationR03().emEt +
545  muon->isolationR03().hadEt) /
546  muon->pt();
547  double isolationChHad =
548  muon->pt() /
549  (muon->pt() + muon->pfIsolationR04().sumChargedHadronPt);
550  double isolationNeuHad =
551  muon->pt() /
552  (muon->pt() + muon->pfIsolationR04().sumNeutralHadronEt);
553  double isolationPhoton =
554  muon->pt() / (muon->pt() + muon->pfIsolationR04().sumPhotonEt);
555  double PFisolationRel = (muon->pfIsolationR04().sumChargedHadronPt +
556  muon->pfIsolationR04().sumNeutralHadronEt +
557  muon->pfIsolationR04().sumPhotonEt) /
558  muon->pt();
559 
560  if (mMult == 0) {
561  // restrict to leading muon
562  fill("muonPt_", muon->pt());
563  fill("muonEta_", muon->eta());
564  fill("muonRelIso_", isolationRel);
565  fill("muonChHadIso_", isolationChHad);
566  fill("muonNeuHadIso_", isolationNeuHad);
567  fill("muonPhIso_", isolationPhoton);
568  fill("muonPFRelIso_", PFisolationRel);
569  }
570  ++mMult;
571 
572  if ((*muonIso)(*muonit)) {
573  if (mMultIso == 0) mu = *muon;
574  ++mMultIso;
575  }
576  }
577  }
578  }
579  fill("muonMult_", mMult);
580  fill("muonMultIso_", mMultIso);
581 
582  /*
583  ------------------------------------------------------------
584 
585  Jet Monitoring
586 
587  ------------------------------------------------------------
588  */
589  // check availability of the btaggers
591  if (includeBTag_) {
592 
593  if (!event.getByToken(btagCombVtx_, btagCombVtx)) return;
594  }
595 
596  // load jet corrector if configured such
597  const JetCorrector* corrector = 0;
598  if (!jetCorrector_.empty()) {
599  // check whether a jet correcto is in the event setup or not
601  JetCorrectionsRecord>())) {
602  corrector = JetCorrector::getJetCorrector(jetCorrector_, setup);
603  } else {
604  edm::LogVerbatim("SingleTopTChannelLeptonDQM")
605  << "\n"
606  << "-----------------------------------------------------------------"
607  "-------------------- \n"
608  << " No JetCorrectionsRecord available from EventSetup:\n"
609  << " - Jets will not be corrected.\n"
610  << " - If you want to change this add the following lines to your "
611  "cfg file:\n"
612  << "\n"
613  << " ## load jet corrections\n"
614  << " "
615  "process.load(\"JetMETCorrections.Configuration."
616  "JetCorrectionServicesAllAlgos_cff\") \n"
617  << " process.prefer(\"ak5CaloL2L3\")\n"
618  << "\n"
619  << "-----------------------------------------------------------------"
620  "-------------------- \n";
621  }
622  }
623 
624  // loop jet collection
625  std::vector<reco::Jet> correctedJets;
626  unsigned int mult = 0,
627  multBCombVtx = 0,multNoBCombVtx = 0;
628 
630  if (!event.getByToken(jets_, jets)) return;
631 
633  if (jetIDSelect_) {
634  if (!event.getByToken(jetIDLabel_, jetID)) return;
635  }
636 
637  vector<double> bJetDiscVal;
638  vector<double> NobJetDiscVal;
639  reco::Jet TaggedJetCand;
640  reco::Jet UnTaggedJetCand;
641  reco::Jet FwdJetCand;
642  for (edm::View<reco::Jet>::const_iterator jet = jets->begin();
643  jet != jets->end(); ++jet) {
644  // check jetID for calo jets
645  unsigned int idx = jet - jets->begin();
646  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
647  if (jetIDSelect_ &&
648  dynamic_cast<const reco::CaloJet*>(jets->refAt(idx).get())) {
649  if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue;
650  }
651  }
652 
653  // check additional jet selection for calo, pf and bare reco jets
654  if (dynamic_cast<const reco::CaloJet*>(&*jet)) {
655  reco::CaloJet sel = dynamic_cast<const reco::CaloJet&>(*jet);
656  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
657  if ( jetSelectCalo==0)
659  if (!((*jetSelectCalo)(sel))) {
660  continue;
661  }
662  } else if (dynamic_cast<const reco::PFJet*>(&*jet)) {
663  reco::PFJet sel = dynamic_cast<const reco::PFJet&>(*jet);
664  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
665  if ( jetSelectPF==0)
667  if (!((*jetSelectPF)(sel))) continue;
668  } else {
669  reco::Jet sel = *jet;
670  sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
671  if ( jetSelectJet==0)
673 
674  if (!((*jetSelectJet)(sel))) continue;
675  }
676 
677 
678  // prepare jet to fill monitor histograms
679  reco::Jet monitorJet = *jet;
680  monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.);
681  correctedJets.push_back(monitorJet);
682 
683  ++mult; // determine jet multiplicity
684  if (includeBTag_) {
685  // fill b-discriminators
686  edm::RefToBase<reco::Jet> jetRef = jets->refAt(idx);
687  if ((*btagCombVtx)[jetRef] > btagCombVtxWP_){
688 
689  if (multBCombVtx == 0) {
690  TaggedJetCand = monitorJet;
691  // TaggedJetCand = *jet;
692  bJetDiscVal.push_back((*btagCombVtx)[jetRef]);
693 
694  } else if (multBCombVtx == 1) {
695  bJetDiscVal.push_back((*btagCombVtx)[jetRef]);
696  if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet;
697  // TaggedJetCand = *jet;
698  }
699  ++multBCombVtx;
700  } else {
701  if (multNoBCombVtx == 0) {
702  UnTaggedJetCand = monitorJet;
703  NobJetDiscVal.push_back((*btagCombVtx)[jetRef]);
704 
705  } else if (multNoBCombVtx == 1) {
706  NobJetDiscVal.push_back((*btagCombVtx)[jetRef]);
707  if (NobJetDiscVal[1] < NobJetDiscVal[0]) UnTaggedJetCand = monitorJet;
708  }
709 
710  ++multNoBCombVtx;
711  }
712 
713 
714 
715 
716  if (mult == 1) {
717  fill("jet1BDiscCombVtx_", (*btagCombVtx)[jetRef]);
718  } else if (mult == 2) {
719  fill("jet2BDiscCombVtx_", (*btagCombVtx)[jetRef]);
720  }
721 
722  fill("jetBDiscCombVtx_", (*btagCombVtx)[jetRef]);
723  }
724  // fill pt (raw or L2L3) for the leading jets
725  if (mult == 1) {
726  fill("jet1Pt_", monitorJet.pt());
727  fill("jet1Eta_", monitorJet.eta());
728  fill("jet1PtRaw_", jet->pt());
729  FwdJetCand = monitorJet;
730  }
731 
732  if (mult == 2) {
733  fill("jet2Pt_", monitorJet.pt());
734  fill("jet2Eta_", monitorJet.eta());
735  fill("jet2PtRaw_", jet->pt());
736 
737  if (abs(monitorJet.eta()) > abs(FwdJetCand.eta())) {
738  FwdJetCand = monitorJet;
739  }
740 
741  fill("FwdJetPt_", FwdJetCand.pt());
742  fill("FwdJetEta_", FwdJetCand.eta());
743  }
744  }
745 
746  if (multNoBCombVtx == 1 && multBCombVtx == 1) {
747 
748  fill("TaggedJetPtEta_", TaggedJetCand.pt(), TaggedJetCand.eta());
749  fill("UnTaggedJetPtEta_", UnTaggedJetCand.pt(), UnTaggedJetCand.eta());
750 
751  fill("TaggedJetPt_", TaggedJetCand.pt());
752  fill("TaggedJetEta_", TaggedJetCand.eta());
753  fill("UnTaggedJetPt_", UnTaggedJetCand.pt());
754  fill("UnTaggedJetEta_", UnTaggedJetCand.eta());
755  }
756 
757  fill("jetMult_", mult);
758  fill("jetMultBCombVtx_", multBCombVtx);
759 
760  /*
761  ------------------------------------------------------------
762 
763  MET Monitoring
764 
765  ------------------------------------------------------------
766  */
767 
768  // fill monitoring histograms for met
769  reco::MET mET;
770  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET>>>::const_iterator
771  met_ = mets_.begin();
772  met_ != mets_.end(); ++met_) {
774  if (!event.getByToken(*met_, met)) continue;
775  if (met->begin() != met->end()) {
776  unsigned int idx = met_ - mets_.begin();
777  if (idx == 0) {
778  fill("metCalo_", met->begin()->et());
779  }
780  if (idx == 1) {
781  fill("metTC_", met->begin()->et());
782  }
783  if (idx == 2) {
784  fill("metPflow_", met->begin()->et());
785  mET = *(met->begin());
786  }
787  }
788  }
789 
790  /*
791  ------------------------------------------------------------
792 
793  Event Monitoring
794 
795  ------------------------------------------------------------
796  */
797 
798  // fill W boson and top mass estimates
799  Calculate eventKinematics(MAXJETS, WMASS);
800  double wMass = eventKinematics.massWBoson(correctedJets);
801  double topMass = eventKinematics.massTopQuark(correctedJets);
802  if (wMass >= 0 && topMass >= 0) {
803  fill("massW_", wMass);
804  fill("massTop_", topMass);
805  }
806  // fill plots for trigger monitoring
807  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
808  (lowerEdge_ < wMass && wMass < upperEdge_)) {
810  fill(event, *triggerTable, "trigger", triggerPaths_);
811  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
812  // log runnumber, lumi block, event number & some
813  // more pysics infomation for interesting events
814  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
815  fill("eventLogger_", 1.5, logged_ + 0.5,
816  event.eventAuxiliary().luminosityBlock());
817  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
818  if (correctedJets.size() > 0)
819  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
820  if (correctedJets.size() > 1)
821  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
822  if (correctedJets.size() > 2)
823  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
824  if (correctedJets.size() > 3)
825  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
826  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
827  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
828  ++logged_;
829  }
830  }
831  if (multBCombVtx != 0 && mMultIso == 1) {
832 
833  double mtW = eventKinematics.tmassWBoson(&mu, mET, TaggedJetCand);
834  fill("MTWm_", mtW);
835  double MTT = eventKinematics.tmassTopQuark(&mu, mET, TaggedJetCand);
836  fill("mMTT_", MTT);
837  }
838 
839  if (multBCombVtx != 0 && eMultIso == 1) {
840  double mtW = eventKinematics.tmassWBoson(&e, mET, TaggedJetCand);
841  fill("MTWe_", mtW);
842  double MTT = eventKinematics.tmassTopQuark(&e, mET, TaggedJetCand);
843  fill("eMTT_", MTT);
844  }
845 }
846 }
847 
849  const edm::ParameterSet& cfg)
850  : vertexSelect_(nullptr),
851  beamspot_(""),
852  beamspotSelect_(nullptr),
853  MuonStep(nullptr),
854  PFMuonStep(nullptr),
855  ElectronStep(nullptr),
856  PFElectronStep(nullptr),
857  PvStep(nullptr),
858  METStep(nullptr) {
859  JetSteps.clear();
860  CaloJetSteps.clear();
861  PFJetSteps.clear();
862 
863  // configure preselection
864  edm::ParameterSet presel =
865  cfg.getParameter<edm::ParameterSet>("preselection");
866  if (presel.existsAs<edm::ParameterSet>("trigger")) {
868  presel.getParameter<edm::ParameterSet>("trigger");
869  triggerTable__ = consumes<edm::TriggerResults>(
870  trigger.getParameter<edm::InputTag>("src"));
871  triggerPaths_ = trigger.getParameter<std::vector<std::string>>("select");
872  }
873  if (presel.existsAs<edm::ParameterSet>("vertex")) {
874  edm::ParameterSet vertex = presel.getParameter<edm::ParameterSet>("vertex");
875  vertex_ = vertex.getParameter<edm::InputTag>("src");
876  vertex__ =
877  consumes<reco::Vertex>(vertex.getParameter<edm::InputTag>("src"));
879  vertex.getParameter<std::string>("select")));
880  }
881  if (presel.existsAs<edm::ParameterSet>("beamspot")) {
883  presel.getParameter<edm::ParameterSet>("beamspot");
884  beamspot_ = beamspot.getParameter<edm::InputTag>("src");
885  beamspot__ =
886  consumes<reco::BeamSpot>(beamspot.getParameter<edm::InputTag>("src"));
888  beamspot.getParameter<std::string>("select")));
889  }
890  // conifgure the selection
891  std::vector<edm::ParameterSet> sel =
892  cfg.getParameter<std::vector<edm::ParameterSet>>("selection");
893 
894  for (unsigned int i = 0; i < sel.size(); ++i) {
895  selectionOrder_.push_back(sel.at(i).getParameter<std::string>("label"));
896  selection_[selectionStep(selectionOrder_.back())] = std::make_pair(
897  sel.at(i),
898  std::unique_ptr<SingleTopTChannelLepton::MonitorEnsemble>(
900  selectionStep(selectionOrder_.back()).c_str(),
901  cfg.getParameter<edm::ParameterSet>("setup"),
902  cfg.getParameter<std::vector<edm::ParameterSet>>("selection"),
903  consumesCollector())));
904  }
905  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin();
906  selIt != selectionOrder_.end(); ++selIt) {
907  std::string key = selectionStep(*selIt), type = objectType(*selIt);
908  if (selection_.find(key) != selection_.end()) {
909  using std::unique_ptr;
910 
911  if (type == "muons") {
913  consumesCollector()));
914  }
915  if (type == "muons/pf") {
918  }
919  if (type == "elecs") {
922  }
923  if (type == "elecs/pf") {
926  }
927  if (type == "pvs") {
929  consumesCollector()));
930  }
931  if (type == "jets") {
932  JetSteps.push_back(std::unique_ptr<SelectionStep<reco::Jet>>(
934  consumesCollector())));
935  }
936  if (type == "jets/pf") {
937  PFJetSteps.push_back(std::unique_ptr<SelectionStep<reco::PFJet>>(
939  consumesCollector())));
940  }
941  if (type == "jets/calo") {
942  CaloJetSteps.push_back(std::unique_ptr<SelectionStep<reco::CaloJet>>(
944  consumesCollector())));
945  }
946  if (type == "met") {
948  consumesCollector()));
949  }
950  }
951  }
952 }
954  edm::Run const &, edm::EventSetup const & ){
955 
956  for (auto selIt = selection_.begin(); selIt != selection_.end(); ++selIt) {
957  selIt->second.second->book(ibooker);
958  }
959 }
961  const edm::EventSetup& setup) {
964  if (!event.getByToken(triggerTable__, triggerTable)) return;
965  if (!accept(event, *triggerTable, triggerPaths_)) return;
966  }
967  if (!beamspot__.isUninitialized()) {
969  if (!event.getByToken(beamspot__, beamspot)) return;
970  if (!(*beamspotSelect_)(*beamspot)) return;
971  }
972 
973  if (!vertex__.isUninitialized()) {
975  if (!event.getByToken(vertex__, vertex)) return;
977  if (!(*vertexSelect_)(*pv)) return;
978  }
979 
980  // apply selection steps
981  unsigned int passed = 0;
982  unsigned int nJetSteps = -1;
983  unsigned int nPFJetSteps = -1;
984  unsigned int nCaloJetSteps = -1;
985  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin();
986  selIt != selectionOrder_.end(); ++selIt) {
987  std::string key = selectionStep(*selIt), type = objectType(*selIt);
988  if (selection_.find(key) != selection_.end()) {
989  if (type == "empty") {
990  selection_[key].second->fill(event, setup);
991  }
992  if (type == "presel") {
993  selection_[key].second->fill(event, setup);
994  }
995  if (type == "elecs" && ElectronStep != 0) {
996  if (ElectronStep->select(event)) {
997  ++passed;
998  selection_[key].second->fill(event, setup);
999  } else
1000  break;
1001  }
1002  if (type == "elecs/pf" && PFElectronStep != 0) {
1003 
1004  if (PFElectronStep->select(event, "electron")) {
1005  ++passed;
1006 
1007  selection_[key].second->fill(event, setup);
1008 
1009  } else
1010  break;
1011  }
1012  if (type == "muons" && MuonStep != 0) {
1013  if (MuonStep->select(event)) {
1014  ++passed;
1015  selection_[key].second->fill(event, setup);
1016  } else
1017  break;
1018  }
1019  if (type == "muons/pf" && PFMuonStep != 0) {
1020  if (PFMuonStep->select(event, "muon")) {
1021  ++passed;
1022  selection_[key].second->fill(event, setup);
1023  } else
1024  break;
1025  }
1026  if (type == "jets") {
1027  nJetSteps++;
1028  if (JetSteps[nJetSteps]) {
1029  if (JetSteps[nJetSteps]->select(event, setup)) {
1030  ++passed;
1031  selection_[key].second->fill(event, setup);
1032  } else
1033  break;
1034  }
1035  }
1036  if (type == "jets/pf") {
1037  nPFJetSteps++;
1038  if (PFJetSteps[nPFJetSteps]) {
1039  if (PFJetSteps[nPFJetSteps]->select(event, setup)) {
1040  ++passed;
1041  selection_[key].second->fill(event, setup);
1042  } else
1043  break;
1044  }
1045  }
1046  if (type == "jets/calo") {
1047  nCaloJetSteps++;
1048  if (CaloJetSteps[nCaloJetSteps]) {
1049  if (CaloJetSteps[nCaloJetSteps]->select(event, setup)) {
1050  ++passed;
1051  selection_[key].second->fill(event, setup);
1052  } else
1053  break;
1054  }
1055  }
1056  if (type == "met" && METStep != 0) {
1057  if (METStep->select(event)) {
1058  ++passed;
1059  selection_[key].second->fill(event, setup);
1060  } else
1061  break;
1062  }
1063  }
1064  }
1065 }
std::vector< std::string > selectionOrder_
std::unique_ptr< StringCutObjectSelector< reco::PFJet > > jetSelectPF
std::map< std::string, MonitorElement * > hists_
type
Definition: HCALResponse.h:21
std::string objectType(const std::string &label)
T getParameter(std::string const &) const
virtual double pt() const final
transverse momentum
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
std::unique_ptr< StringCutObjectSelector< reco::CaloJet > > jetSelectCalo
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::vector< std::string > triggerPaths_
trigger paths
Level verbosity_
verbosity level for booking
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > elecSelect
virtual double eta() const final
momentum pseudorapidity
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
Base class for all types of Jets.
Definition: Jet.h:20
int logged_
number of logged interesting events
std::vector< std::unique_ptr< SelectionStep< reco::CaloJet > > > CaloJetSteps
std::vector< std::unique_ptr< SelectionStep< reco::Jet > > > JetSteps
double massTopQuark(const std::vector< reco::Jet > &jets)
calculate t-quark mass estimate
edm::EDGetTokenT< reco::JetTagCollection > btagCombVtx_
RunNumber_t run() const
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
edm::EDGetTokenT< edm::TriggerResults > triggerTable__
trigger table
std::string muonIso_
extra isolation criterion on muon
#define nullptr
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::string muonSelect_
extra selection on muons
edm::EDGetTokenT< edm::View< reco::PFCandidate > > muons_
Jets made from PFObjects.
Definition: PFJet.h:21
double massWBoson(const std::vector< reco::Jet > &jets)
calculate W boson mass estimate
SingleTopTChannelLeptonDQM(const edm::ParameterSet &cfg)
default constructor
LuminosityBlockNumber_t luminosityBlock() const
const eventsetup::EventSetupRecord * find(const eventsetup::EventSetupRecordKey &) const
Definition: EventSetup.cc:91
edm::InputTag vertex_
primary vertex
Helper class for the calculation of a top and a W boson mass estime.
std::string elecSelect_
extra selection on electrons
double lowerEdge_
mass window upper and lower edge
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
std::vector< edm::ParameterSet > sel
Definition: MET.h:42
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
vector< PseudoJet > jets
edm::EDGetTokenT< edm::View< reco::GsfElectron > > elecs_gsf_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
def pv(vc)
Definition: MetAnalyzer.py:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
const int mu
Definition: Constants.h:22
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonIso
double tmassTopQuark(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate top quark transverse mass estimate
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
bool isNull() const
Checks for null.
Definition: Ref.h:249
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > elecIso
std::unique_ptr< SelectionStep< reco::PFCandidate > > PFElectronStep
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
EventAuxiliary const & eventAuxiliary() const
Definition: Event.h:78
std::string selectionStep(const std::string &label)
double tmassWBoson(reco::RecoCandidate *lep, const reco::MET &met, const reco::Jet &b)
calculate W boson transverse mass estimate
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::unique_ptr< SelectionStep< reco::GsfElectron > > ElectronStep
met
===> hadronic RAZOR
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
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
edm::EDGetTokenT< edm::View< reco::PFCandidate > > elecs_
std::unique_ptr< SelectionStep< reco::MET > > METStep
static const unsigned int MAXJETS
std::vector< edm::EDGetTokenT< edm::View< reco::MET > > > mets_
considers a vector of METs
Templated helper class to allow a selection on a certain object collection.
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
edm::EDGetTokenT< edm::View< reco::Jet > > jets_
input sources for monitoring
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
edm::EDGetTokenT< reco::Vertex > vertex__
static EventSetupRecordKey makeKey()
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
edm::EDGetTokenT< reco::BeamSpot > beamspot__
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< SingleTopTChannelLepton::MonitorEnsemble > > > selection_
bool isUninitialized() const
Definition: EDGetToken.h:73
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup) override
do this during the event loop
std::vector< std::unique_ptr< SelectionStep< reco::PFJet > > > PFJetSteps
std::unique_ptr< SelectionStep< reco::Muon > > MuonStep
EventNumber_t event() const
Definition: event.py:1
Definition: Run.h:42
std::unique_ptr< SelectionStep< reco::PFCandidate > > PFMuonStep
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect
std::string elecIso_
extra isolation criterion on electron
std::unique_ptr< StringCutObjectSelector< reco::Jet > > jetSelectJet