CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SingleTopTChannelLeptonDQM.cc
Go to the documentation of this file.
10 #include <iostream>
14 using namespace std;
15 namespace SingleTopTChannelLepton {
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")) {
178  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")
184  if (monitoring.getParameter<std::string>("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  fill("jetMultBCombVtx_", multBCombVtx);
760 
761  /*
762  ------------------------------------------------------------
763 
764  MET Monitoring
765 
766  ------------------------------------------------------------
767  */
768 
769  // fill monitoring histograms for met
770  reco::MET mET;
771  for (std::vector<edm::EDGetTokenT<edm::View<reco::MET>>>::const_iterator
772  met_ = mets_.begin();
773  met_ != mets_.end(); ++met_) {
775  if (!event.getByToken(*met_, met)) continue;
776  if (met->begin() != met->end()) {
777  unsigned int idx = met_ - mets_.begin();
778  if (idx == 0) {
779  fill("metCalo_", met->begin()->et());
780  }
781  if (idx == 1) {
782  fill("metTC_", met->begin()->et());
783  }
784  if (idx == 2) {
785  fill("metPflow_", met->begin()->et());
786  mET = *(met->begin());
787  }
788  }
789  }
790 
791  /*
792  ------------------------------------------------------------
793 
794  Event Monitoring
795 
796  ------------------------------------------------------------
797  */
798 
799  // fill W boson and top mass estimates
800  Calculate eventKinematics(MAXJETS, WMASS);
801  double wMass = eventKinematics.massWBoson(correctedJets);
802  double topMass = eventKinematics.massTopQuark(correctedJets);
803  if (wMass >= 0 && topMass >= 0) {
804  fill("massW_", wMass);
805  fill("massTop_", topMass);
806  }
807  // fill plots for trigger monitoring
808  if ((lowerEdge_ == -1. && upperEdge_ == -1.) ||
809  (lowerEdge_ < wMass && wMass < upperEdge_)) {
811  fill(event, *triggerTable, "trigger", triggerPaths_);
812  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
813  // log runnumber, lumi block, event number & some
814  // more pysics infomation for interesting events
815  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
816  fill("eventLogger_", 1.5, logged_ + 0.5,
817  event.eventAuxiliary().luminosityBlock());
818  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
819  if (correctedJets.size() > 0)
820  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
821  if (correctedJets.size() > 1)
822  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
823  if (correctedJets.size() > 2)
824  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
825  if (correctedJets.size() > 3)
826  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
827  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
828  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
829  ++logged_;
830  }
831  }
832  if (multBCombVtx != 0 && mMultIso == 1) {
833 
834  double mtW = eventKinematics.tmassWBoson(&mu, mET, TaggedJetCand);
835  fill("MTWm_", mtW);
836  double MTT = eventKinematics.tmassTopQuark(&mu, mET, TaggedJetCand);
837  fill("mMTT_", MTT);
838  }
839 
840  if (multBCombVtx != 0 && eMultIso == 1) {
841  double mtW = eventKinematics.tmassWBoson(&e, mET, TaggedJetCand);
842  fill("MTWe_", mtW);
843  double MTT = eventKinematics.tmassTopQuark(&e, mET, TaggedJetCand);
844  fill("eMTT_", MTT);
845  }
846 }
847 }
848 
850  const edm::ParameterSet& cfg)
851  : vertexSelect_(nullptr),
852  beamspot_(""),
853  beamspotSelect_(nullptr),
854  MuonStep(nullptr),
855  PFMuonStep(nullptr),
856  ElectronStep(nullptr),
857  PFElectronStep(nullptr),
858  PvStep(nullptr),
859  METStep(nullptr) {
860  JetSteps.clear();
861  CaloJetSteps.clear();
862  PFJetSteps.clear();
863 
864  // configure preselection
865  edm::ParameterSet presel =
866  cfg.getParameter<edm::ParameterSet>("preselection");
867  if (presel.existsAs<edm::ParameterSet>("trigger")) {
868  edm::ParameterSet trigger =
869  presel.getParameter<edm::ParameterSet>("trigger");
870  triggerTable__ = consumes<edm::TriggerResults>(
871  trigger.getParameter<edm::InputTag>("src"));
872  triggerPaths_ = trigger.getParameter<std::vector<std::string>>("select");
873  }
874  if (presel.existsAs<edm::ParameterSet>("vertex")) {
875  edm::ParameterSet vertex = presel.getParameter<edm::ParameterSet>("vertex");
876  vertex_ = vertex.getParameter<edm::InputTag>("src");
877  vertex__ =
878  consumes<reco::Vertex>(vertex.getParameter<edm::InputTag>("src"));
880  vertex.getParameter<std::string>("select")));
881  }
882  if (presel.existsAs<edm::ParameterSet>("beamspot")) {
884  presel.getParameter<edm::ParameterSet>("beamspot");
885  beamspot_ = beamspot.getParameter<edm::InputTag>("src");
886  beamspot__ =
887  consumes<reco::BeamSpot>(beamspot.getParameter<edm::InputTag>("src"));
889  beamspot.getParameter<std::string>("select")));
890  }
891  // conifgure the selection
892  std::vector<edm::ParameterSet> sel =
893  cfg.getParameter<std::vector<edm::ParameterSet>>("selection");
894 
895  for (unsigned int i = 0; i < sel.size(); ++i) {
896  selectionOrder_.push_back(sel.at(i).getParameter<std::string>("label"));
897  selection_[selectionStep(selectionOrder_.back())] = std::make_pair(
898  sel.at(i),
899  std::unique_ptr<SingleTopTChannelLepton::MonitorEnsemble>(
901  selectionStep(selectionOrder_.back()).c_str(),
902  cfg.getParameter<edm::ParameterSet>("setup"),
903  cfg.getParameter<std::vector<edm::ParameterSet>>("selection"),
904  consumesCollector())));
905  }
906  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin();
907  selIt != selectionOrder_.end(); ++selIt) {
908  std::string key = selectionStep(*selIt), type = objectType(*selIt);
909  if (selection_.find(key) != selection_.end()) {
910  using std::unique_ptr;
911 
912  if (type == "muons") {
914  consumesCollector()));
915  }
916  if (type == "muons/pf") {
919  }
920  if (type == "elecs") {
923  }
924  if (type == "elecs/pf") {
927  }
928  if (type == "pvs") {
930  consumesCollector()));
931  }
932  if (type == "jets") {
933  JetSteps.push_back(std::unique_ptr<SelectionStep<reco::Jet>>(
935  consumesCollector())));
936  }
937  if (type == "jets/pf") {
938  PFJetSteps.push_back(std::unique_ptr<SelectionStep<reco::PFJet>>(
940  consumesCollector())));
941  }
942  if (type == "jets/calo") {
943  CaloJetSteps.push_back(std::unique_ptr<SelectionStep<reco::CaloJet>>(
945  consumesCollector())));
946  }
947  if (type == "met") {
949  consumesCollector()));
950  }
951  }
952  }
953 }
955  edm::Run const &, edm::EventSetup const & ){
956 
957  for (auto selIt = selection_.begin(); selIt != selection_.end(); ++selIt) {
958  selIt->second.second->book(ibooker);
959  }
960 }
962  const edm::EventSetup& setup) {
965  if (!event.getByToken(triggerTable__, triggerTable)) return;
966  if (!accept(event, *triggerTable, triggerPaths_)) return;
967  }
968  if (!beamspot__.isUninitialized()) {
970  if (!event.getByToken(beamspot__, beamspot)) return;
971  if (!(*beamspotSelect_)(*beamspot)) return;
972  }
973 
974  if (!vertex__.isUninitialized()) {
976  if (!event.getByToken(vertex__, vertex)) return;
978  if (!(*vertexSelect_)(*pv)) return;
979  }
980 
981  // apply selection steps
982  unsigned int passed = 0;
983  unsigned int nJetSteps = -1;
984  unsigned int nPFJetSteps = -1;
985  unsigned int nCaloJetSteps = -1;
986  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin();
987  selIt != selectionOrder_.end(); ++selIt) {
988  std::string key = selectionStep(*selIt), type = objectType(*selIt);
989  if (selection_.find(key) != selection_.end()) {
990  if (type == "empty") {
991  selection_[key].second->fill(event, setup);
992  }
993  if (type == "presel") {
994  selection_[key].second->fill(event, setup);
995  }
996  if (type == "elecs" && ElectronStep != 0) {
997  if (ElectronStep->select(event)) {
998  ++passed;
999  selection_[key].second->fill(event, setup);
1000  } else
1001  break;
1002  }
1003  if (type == "elecs/pf" && PFElectronStep != 0) {
1004 
1005  if (PFElectronStep->select(event, "electron")) {
1006  ++passed;
1007 
1008  selection_[key].second->fill(event, setup);
1009 
1010  } else
1011  break;
1012  }
1013  if (type == "muons" && MuonStep != 0) {
1014  if (MuonStep->select(event)) {
1015  ++passed;
1016  selection_[key].second->fill(event, setup);
1017  } else
1018  break;
1019  }
1020  if (type == "muons/pf" && PFMuonStep != 0) {
1021  if (PFMuonStep->select(event, "muon")) {
1022  ++passed;
1023  selection_[key].second->fill(event, setup);
1024  } else
1025  break;
1026  }
1027  if (type == "jets") {
1028  nJetSteps++;
1029  if (JetSteps[nJetSteps]) {
1030  if (JetSteps[nJetSteps]->select(event, setup)) {
1031  ++passed;
1032  selection_[key].second->fill(event, setup);
1033  } else
1034  break;
1035  }
1036  }
1037  if (type == "jets/pf") {
1038  nPFJetSteps++;
1039  if (PFJetSteps[nPFJetSteps]) {
1040  if (PFJetSteps[nPFJetSteps]->select(event, setup)) {
1041  ++passed;
1042  selection_[key].second->fill(event, setup);
1043  } else
1044  break;
1045  }
1046  }
1047  if (type == "jets/calo") {
1048  nCaloJetSteps++;
1049  if (CaloJetSteps[nCaloJetSteps]) {
1050  if (CaloJetSteps[nCaloJetSteps]->select(event, setup)) {
1051  ++passed;
1052  selection_[key].second->fill(event, setup);
1053  } else
1054  break;
1055  }
1056  }
1057  if (type == "met" && METStep != 0) {
1058  if (METStep->select(event)) {
1059  ++passed;
1060  selection_[key].second->fill(event, setup);
1061  } else
1062  break;
1063  }
1064  }
1065  }
1066 }
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
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
std::unique_ptr< StringCutObjectSelector< reco::CaloJet > > jetSelectCalo
tuple cfg
Definition: looper.py:293
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
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
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
#define MAXJETS
Definition: myFastSimVal.cc:30
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
tuple corrector
Definition: mvaPFMET_cff.py:86
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
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
bool isNull() const
Checks for null.
Definition: Ref.h:249
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:77
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:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::unique_ptr< SelectionStep< reco::GsfElectron > > ElectronStep
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
do this during the event loop
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > vertexSelect_
string cut selector
tuple muons
Definition: patZpeak.py:38
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
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 double eta() const final
momentum pseudorapidity
volatile std::atomic< bool > shutdown_flag false
std::vector< std::unique_ptr< SelectionStep< reco::PFJet > > > PFJetSteps
std::unique_ptr< SelectionStep< reco::Muon > > MuonStep
EventNumber_t event() const
Definition: Run.h:43
std::unique_ptr< SelectionStep< reco::PFCandidate > > PFMuonStep
virtual double pt() const final
transverse momentum
std::unique_ptr< StringCutObjectSelector< reco::PFCandidate, true > > muonSelect
std::string elecIso_
extra isolation criterion on electron
std::unique_ptr< StringCutObjectSelector< reco::Jet > > jetSelectJet