CMS 3D CMS Logo

TopSingleLeptonDQM_miniAOD.cc
Go to the documentation of this file.
7 #include <iostream>
11 
16 
18 
19 using namespace std;
21 
22  // maximal number of leading jets
23  // to be used for top mass estimate
24  static const unsigned int MAXJETS = 4;
25  // nominal mass of the W boson to
26  // be used for the top mass estimate
27  static const double WMASS = 80.4;
28 
29  MonitorEnsemble::MonitorEnsemble(const char* label, const edm::ParameterSet& cfg, edm::ConsumesCollector&& iC)
30  : label_(label),
31  elecIso_(nullptr),
32  elecSelect_(nullptr),
33  pvSelect_(nullptr),
34  muonIso_(nullptr),
35  muonSelect_(nullptr),
36  jetIDSelect_(nullptr),
37  jetSelect(nullptr),
38  includeBTag_(false),
39  lowerEdge_(-1.),
40  upperEdge_(-1.),
41  logged_(0) {
42  // sources have to be given; this PSet is not optional
43  edm::ParameterSet sources = cfg.getParameter<edm::ParameterSet>("sources");
44  // muons_ = iC.consumes<edm::View<reco::PFCandidate> >(
45  // sources.getParameter<edm::InputTag>("muons"));
46 
47  muons_ = iC.consumes<edm::View<pat::Muon>>(sources.getParameter<edm::InputTag>("muons"));
48 
49  elecs_ = iC.consumes<edm::View<pat::Electron>>(sources.getParameter<edm::InputTag>("elecs"));
50  pvs_ = iC.consumes<edm::View<reco::Vertex>>(sources.getParameter<edm::InputTag>("pvs"));
51  jets_ = iC.consumes<edm::View<pat::Jet>>(sources.getParameter<edm::InputTag>("jets"));
52  for (edm::InputTag const& tag : sources.getParameter<std::vector<edm::InputTag>>("mets"))
53  mets_.push_back(iC.consumes<edm::View<pat::MET>>(tag));
54  // electronExtras are optional; they may be omitted or
55  // empty
56  if (cfg.existsAs<edm::ParameterSet>("elecExtras")) {
57  edm::ParameterSet elecExtras = cfg.getParameter<edm::ParameterSet>("elecExtras");
58  // select is optional; in case it's not found no
59  // selection will be applied
60  if (elecExtras.existsAs<std::string>("select")) {
62  }
63  // isolation is optional; in case it's not found no
64  // isolation will be applied
65  if (elecExtras.existsAs<std::string>("isolation")) {
66  elecIso_.reset(new StringCutObjectSelector<pat::Electron>(elecExtras.getParameter<std::string>("isolation")));
67  }
68 
69  if (elecExtras.existsAs<std::string>("rho")) {
70  rhoTag = elecExtras.getParameter<edm::InputTag>("rho");
71  }
72  // electronId is optional; in case it's not found the
73  // InputTag will remain empty
74  if (elecExtras.existsAs<edm::ParameterSet>("electronId")) {
75  edm::ParameterSet elecId = elecExtras.getParameter<edm::ParameterSet>("electronId");
76  electronId_ = iC.consumes<edm::ValueMap<float>>(elecId.getParameter<edm::InputTag>("src"));
77  eidCutValue_ = elecId.getParameter<double>("cutValue");
78  }
79  }
80  // pvExtras are opetional; they may be omitted or empty
81  if (cfg.existsAs<edm::ParameterSet>("pvExtras")) {
82  edm::ParameterSet pvExtras = cfg.getParameter<edm::ParameterSet>("pvExtras");
83  // select is optional; in case it's not found no
84  // selection will be applied
85  if (pvExtras.existsAs<std::string>("select")) {
86  pvSelect_.reset(new StringCutObjectSelector<reco::Vertex>(pvExtras.getParameter<std::string>("select")));
87  }
88  }
89  // muonExtras are optional; they may be omitted or empty
90  if (cfg.existsAs<edm::ParameterSet>("muonExtras")) {
91  edm::ParameterSet muonExtras = cfg.getParameter<edm::ParameterSet>("muonExtras");
92  // select is optional; in case it's not found no
93  // selection will be applied
94  if (muonExtras.existsAs<std::string>("select")) {
95  muonSelect_.reset(new StringCutObjectSelector<pat::Muon>(muonExtras.getParameter<std::string>("select")));
96  }
97  // isolation is optional; in case it's not found no
98  // isolation will be applied
99  if (muonExtras.existsAs<std::string>("isolation")) {
100  muonIso_.reset(new StringCutObjectSelector<pat::Muon>(muonExtras.getParameter<std::string>("isolation")));
101  }
102  }
103 
104  // jetExtras are optional; they may be omitted or
105  // empty
106  if (cfg.existsAs<edm::ParameterSet>("jetExtras")) {
107  edm::ParameterSet jetExtras = cfg.getParameter<edm::ParameterSet>("jetExtras");
108  // jetCorrector is optional; in case it's not found
109  // the InputTag will remain empty
110  if (jetExtras.existsAs<std::string>("jetCorrector")) {
111  jetCorrector_ = jetExtras.getParameter<std::string>("jetCorrector");
112  }
113  // read jetID information if it exists
114  if (jetExtras.existsAs<edm::ParameterSet>("jetID")) {
115  edm::ParameterSet jetID = jetExtras.getParameter<edm::ParameterSet>("jetID");
116  jetIDLabel_ = iC.consumes<reco::JetIDValueMap>(jetID.getParameter<edm::InputTag>("label"));
118  }
119  // select is optional; in case it's not found no
120  // selection will be applied (only implemented for
121  // CaloJets at the moment)
122  if (jetExtras.existsAs<std::string>("select")) {
123  jetSelect_ = jetExtras.getParameter<std::string>("select");
125  }
126  }
127 
128  // triggerExtras are optional; they may be omitted or empty
129  if (cfg.existsAs<edm::ParameterSet>("triggerExtras")) {
130  edm::ParameterSet triggerExtras = cfg.getParameter<edm::ParameterSet>("triggerExtras");
131  triggerTable_ = iC.consumes<edm::TriggerResults>(triggerExtras.getParameter<edm::InputTag>("src"));
132  triggerPaths_ = triggerExtras.getParameter<std::vector<std::string>>("paths");
133  }
134 
135  // massExtras is optional; in case it's not found no mass
136  // window cuts are applied for the same flavor monitor
137  // histograms
138  if (cfg.existsAs<edm::ParameterSet>("massExtras")) {
139  edm::ParameterSet massExtras = cfg.getParameter<edm::ParameterSet>("massExtras");
140  lowerEdge_ = massExtras.getParameter<double>("lowerEdge");
141  upperEdge_ = massExtras.getParameter<double>("upperEdge");
142  }
143 
144  // setup the verbosity level for booking histograms;
145  // per default the verbosity level will be set to
146  // STANDARD. This will also be the chosen level in
147  // the case when the monitoring PSet is not found
149  if (cfg.existsAs<edm::ParameterSet>("monitoring")) {
150  edm::ParameterSet monitoring = cfg.getParameter<edm::ParameterSet>("monitoring");
151  if (monitoring.getParameter<std::string>("verbosity") == "DEBUG")
152  verbosity_ = DEBUG;
153  if (monitoring.getParameter<std::string>("verbosity") == "VERBOSE")
155  if (monitoring.getParameter<std::string>("verbosity") == "STANDARD")
157  }
158  // and don't forget to do the histogram booking
159  directory_ = cfg.getParameter<std::string>("directory");
160  // book(ibooker);
161  }
162 
164  // set up the current directory path
165  std::string current(directory_);
166  current += label_;
167  ibooker.setCurrentFolder(current);
168 
169  // determine number of bins for trigger monitoring
170  //unsigned int nPaths = triggerPaths_.size();
171 
172  // --- [STANDARD] --- //
173  // Run Number
174  //hists_["RunNumb_"] = ibooker.book1D("RunNumber", "Run Nr.", 1.e4, 1.5e5, 3.e5);
175  // instantaneous luminosity
176  //hists_["InstLumi_"] = ibooker.book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3);
177  // number of selected primary vertices
178  hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{good pvs}", 50, 0., 50.);
179  // pt of the leading muon
180  hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu TightId, TightIso)", 40, 0., 200.);
181  // muon multiplicity before std isolation
182  hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{loose}(#mu)", 10, 0., 10.);
183  // muon multiplicity after std isolation
184  //hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso",
185  // "N_{TightIso}(#mu)", 10, 0., 10.);
186 
187  hists_["muonMultTight_"] = ibooker.book1D("MuonMultTight", "N_{TightIso,TightId}(#mu)", 10, 0., 10.);
188 
189  // pt of the leading electron
190  hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e TightId, TightIso)", 40, 0., 200.);
191  // electron multiplicity before std isolation
192  //hists_["elecMult_"] = ibooker.book1D("ElecMult", "N_{looseId}(e)", 10, 0., 10.);
193  // electron multiplicity after std isolation
194  //hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.);
195  // multiplicity of jets with pt>20 (corrected to L2+L3)
196  hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.);
197  hists_["jetLooseMult_"] = ibooker.book1D("JetLooseMult", "N_{30,loose}(jet)", 10, 0., 10.);
198 
199  // trigger efficiency estimates for single lepton triggers
200  //hists_["triggerEff_"] = ibooker.book1D("TriggerEff",
201  // "Eff(trigger)", nPaths, 0., nPaths);
202  // monitored trigger occupancy for single lepton triggers
203  //hists_["triggerMon_"] = ibooker.book1D("TriggerMon",
204  // "Mon(trigger)", nPaths, 0., nPaths);
205  // MET (calo)
206  hists_["slimmedMETs_"] = ibooker.book1D("slimmedMETs", "MET_{slimmed}", 40, 0., 200.);
207  // W mass estimate
208  hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.);
209  // Top mass estimate
210  hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.);
211  // b-tagged Top mass
212  hists_["massBTop_"] = ibooker.book1D("MassBTop", "M(Top, 1 b-tag)", 50, 0., 500.);
213  // set bin labels for trigger monitoring
215 
216  if (verbosity_ == STANDARD)
217  return;
218 
219  // --- [VERBOSE] --- //
220  // eta of the leading muon
221  hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu TightId,TightIso)", 30, -3., 3.);
222  // relative isolation of the candidate muon (depending on the decay channel)
223  hists_["muonPhi_"] = ibooker.book1D("MuonPhi", "#phi(#mu TightId,TightIso)", 40, -4., 4.);
224  hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu TightId) (#Delta#beta Corrected)", 50, 0., 1.);
225 
226  // eta of the leading electron
227  hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e TightId, TightIso)", 30, -3., 3.);
228  hists_["elecPhi_"] = ibooker.book1D("ElecPhi", "#phi(e TightId, TightIso)", 40, -4., 4.);
229  // std isolation variable of the leading electron
230  hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e TightId)", 50, 0., 1.);
231 
232  hists_["elecMultTight_"] = ibooker.book1D("ElecMultTight", "N_{TightIso,TightId}(e)", 10, 0., 10.);
233 
234  // multiplicity of btagged jets (for track counting high efficiency) with
235  // pt(L2L3)>30
236  //hists_["jetMultBEff_"] = ibooker.book1D("JetMultBEff",
237  // "N_{30}(TCHE)", 10, 0., 10.);
238  // btag discriminator for track counting high efficiency for jets with
239  // pt(L2L3)>30
240  //hists_["jetBDiscEff_"] = ibooker.book1D("JetBDiscEff",
241  // "Disc_{TCHE}(jet)", 100, 0., 10.);
242  // eta of the 1. leading jet (corrected to L2+L3)
243  hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta_{30,loose}(jet1)", 60, -3., 3.);
244  // pt of the 1. leading jet (corrected to L2+L3)
245  hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{30,loose}(jet1)", 60, 0., 300.);
246  // eta of the 2. leading jet (corrected to L2+L3)
247  hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta_{30,loose}(jet2)", 60, -3., 3.);
248  // pt of the 2. leading jet (corrected to L2+L3)
249  hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{30,loose}(jet2)", 60, 0., 300.);
250  // eta of the 3. leading jet (corrected to L2+L3)
251  hists_["jet3Eta_"] = ibooker.book1D("Jet3Eta", "#eta_{30,loose}(jet3)", 60, -3., 3.);
252  // pt of the 3. leading jet (corrected to L2+L3)
253  hists_["jet3Pt_"] = ibooker.book1D("Jet3Pt", "pt_{30,loose}(jet3)", 60, 0., 300.);
254  // eta of the 4. leading jet (corrected to L2+L3)
255  hists_["jet4Eta_"] = ibooker.book1D("Jet4Eta", "#eta_{30,loose}(jet4)", 60, -3., 3.);
256  // pt of the 4. leading jet (corrected to L2+L3)
257  hists_["jet4Pt_"] = ibooker.book1D("Jet4Pt", "pt_{30,loose}(jet4)", 60, 0., 300.);
258  // MET (tc)
259  hists_["slimmedMETsNoHF_"] = ibooker.book1D("slimmedMETsNoHF", "MET_{slimmedNoHF}", 40, 0., 200.);
260  // MET (pflow)
261  hists_["slimmedMETsPuppi_"] = ibooker.book1D("slimmedMETsPuppi", "MET_{slimmedPuppi}", 40, 0., 200.);
262  // dz for muons (to suppress cosmis)
263  hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.);
264  // dxy for muons (to suppress cosmics)
265  hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1);
266 
267  // set axes titles for dxy for muons
268  hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1);
269  hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2);
270 
271  if (verbosity_ == VERBOSE)
272  return;
273 
274  // --- [DEBUG] --- //
275  // charged hadron isolation component of the candidate muon (depending on the
276  // decay channel)
277  hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIsoComp", "ChHad_{IsoComponent}(#mu TightId)", 50, 0., 5.);
278  // neutral hadron isolation component of the candidate muon (depending on the
279  // decay channel)
280  hists_["muonNeHadIso_"] = ibooker.book1D("MuonNeHadIsoComp", "NeHad_{IsoComponent}(#mu TightId)", 50, 0., 5.);
281  // photon isolation component of the candidate muon (depending on the decay
282  // channel)
283  hists_["muonPhIso_"] = ibooker.book1D("MuonPhIsoComp", "Photon_{IsoComponent}(#mu TightId)", 50, 0., 5.);
284  // charged hadron isolation component of the candidate electron (depending on
285  // the decay channel)
286  hists_["elecChHadIso_"] = ibooker.book1D("ElectronChHadIsoComp", "ChHad_{IsoComponent}(e TightId)", 50, 0., 5.);
287  // neutral hadron isolation component of the candidate electron (depending on
288  // the decay channel)
289  hists_["elecNeHadIso_"] = ibooker.book1D("ElectronNeHadIsoComp", "NeHad_{IsoComponent}(e TightId)", 50, 0., 5.);
290  // photon isolation component of the candidate electron (depending on the
291  // decay channel)
292  hists_["elecPhIso_"] = ibooker.book1D("ElectronPhIsoComp", "Photon_{IsoComponent}(e TightId)", 50, 0., 5.);
293  // multiplicity of btagged jets (for track counting high purity) with
294  // pt(L2L3)>30
295  //hists_["jetMultBPur_"] = ibooker.book1D("JetMultBPur",
296  // "N_{30}(TCHP)", 10, 0., 10.);
297  // btag discriminator for track counting high purity
298  //hists_["jetBDiscPur_"] = ibooker.book1D("JetBDiscPur",
299  // "Disc_{TCHP}(Jet)", 100, 0., 10.);
300  // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30
301  //hists_["jetMultBVtx_"] = ibooker.book1D("JetMultBVtx",
302  // "N_{30}(SSVHE)", 10, 0., 10.);
303  // btag discriminator for simple secondary vertex
304  //hists_["jetBDiscVtx_"] = ibooker.book1D("JetBDiscVtx",
305  // "Disc_{SSVHE}(Jet)", 35, -1., 6.);
306  // multiplicity for combined secondary vertex
307  hists_["jetMultBCSVM_"] = ibooker.book1D("JetMultBCSVM", "N_{30}(CSVM)", 10, 0., 10.);
308  // btag discriminator for combined secondary vertex
309  hists_["jetBCSV_"] = ibooker.book1D("JetDiscCSV", "BJet Disc_{CSV}(JET)", 100, -1., 2.);
310  // pt of the 1. leading jet (uncorrected)
311  //hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.);
312  // pt of the 2. leading jet (uncorrected)
313  //hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.);
314  // pt of the 3. leading jet (uncorrected)
315  //hists_["jet3PtRaw_"] = ibooker.book1D("Jet3PtRaw", "pt_{Raw}(jet3)", 60, 0., 300.);
316  // pt of the 4. leading jet (uncorrected)
317  //hists_["jet4PtRaw_"] = ibooker.book1D("Jet4PtRaw", "pt_{Raw}(jet4)", 60, 0., 300.);
318  // selected events
319  hists_["eventLogger_"] = ibooker.book2D("EventLogger", "Logged Events", 9, 0., 9., 10, 0., 10.);
320 
321  // set axes titles for selected events
322  hists_["eventLogger_"]->getTH1()->SetOption("TEXT");
323  hists_["eventLogger_"]->setBinLabel(1, "Run", 1);
324  hists_["eventLogger_"]->setBinLabel(2, "Block", 1);
325  hists_["eventLogger_"]->setBinLabel(3, "Event", 1);
326  hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1);
327  hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1);
328  hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1);
329  hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1);
330  hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1);
331  hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1);
332  hists_["eventLogger_"]->setAxisTitle("logged evts", 2);
333  return;
334  }
335 
337  // fetch trigger event if configured such
339 
341  if (!event.getByToken(triggerTable_, triggerTable))
342  return;
343  }
344 
345  /*
346  ------------------------------------------------------------
347 
348  Primary Vertex Monitoring
349 
350  ------------------------------------------------------------
351  */
352  // fill monitoring plots for primary verices
354  if (!event.getByToken(pvs_, pvs))
355  return;
356  const reco::Vertex& pver = pvs->front();
357 
358  unsigned int pvMult = 0;
359  if (pvs.isValid()) {
360  for (edm::View<reco::Vertex>::const_iterator pv = pvs->begin(); pv != pvs->end(); ++pv) {
361  bool isGood =
362  (!(pv->isFake()) && (pv->ndof() > 4.0) && (abs(pv->z()) < 24.0) && (abs(pv->position().Rho()) < 2.0));
363  if (!isGood)
364  continue;
365  pvMult++;
366  }
367  //std::cout<<" npv "<<testn<<endl;
368  }
369 
370  fill("pvMult_", pvMult);
371 
372  /*
373  ------------------------------------------------------------
374 
375  Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy
376  value=5.0)
377 
378  ------------------------------------------------------------
379  */
380 
381  //if (!event.eventAuxiliary().run()) return;
382 
383  //fill("RunNumb_", event.eventAuxiliary().run());
384 
385  //double dummy = 5.;
386  //fill("InstLumi_", dummy);
387 
388  /*
389  ------------------------------------------------------------
390 
391  Electron Monitoring
392 
393  ------------------------------------------------------------
394  */
395 
396  // fill monitoring plots for electrons
398  if (!event.getByToken(elecs_, elecs))
399  return;
400 
401  edm::Handle<double> _rhoHandle;
402  event.getByLabel(rhoTag, _rhoHandle);
403  //if (!event.getByToken(elecs_, elecs)) return;
404 
405  // check availability of electron id
407  if (!electronId_.isUninitialized()) {
408  if (!event.getByToken(electronId_, electronId))
409  return;
410  }
411 
412  // loop electron collection
413  unsigned int eMultIso = 0, eMult = 0;
414  std::vector<const pat::Electron*> isoElecs;
415 
416  for (edm::View<pat::Electron>::const_iterator elec = elecs->begin(); elec != elecs->end(); ++elec) {
417  if (true) { //loose id
418  if (!elecSelect_ || (*elecSelect_)(*elec)) {
419  double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt;
420  double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt;
421  double el_PhIso = elec->pfIsolationVariables().sumPhotonEt;
422 
423  double rho = _rhoHandle.isValid() ? (float)(*_rhoHandle) : 0;
424  double absEta = abs(elec->superCluster()->eta());
425  double eA = 0;
426  if (absEta < 1.000)
427  eA = 0.1703;
428  else if (absEta < 1.479)
429  eA = 0.1715;
430  else if (absEta < 2.000)
431  eA = 0.1213;
432  else if (absEta < 2.200)
433  eA = 0.1230;
434  else if (absEta < 2.300)
435  eA = 0.1635;
436  else if (absEta < 2.400)
437  eA = 0.1937;
438  else if (absEta < 5.000)
439  eA = 0.2393;
440 
441  double el_pfRelIso = (el_ChHadIso + max(0., el_NeHadIso + el_PhIso - rho * eA)) / elec->pt();
442 
443  ++eMult;
444 
445  if (eMult == 1) {
446  fill("elecRelIso_", el_pfRelIso);
447  fill("elecChHadIso_", el_ChHadIso);
448  fill("elecNeHadIso_", el_NeHadIso);
449  fill("elecPhIso_", el_PhIso);
450  }
451  //loose Iso
452  //if(!((el_pfRelIso<0.0994 && absEta<1.479)||(el_pfRelIso<0.107 && absEta>1.479)))continue;
453 
454  //tight Iso
455  if (!((el_pfRelIso < 0.0588 && absEta < 1.479) || (el_pfRelIso < 0.0571 && absEta > 1.479)))
456  continue;
457  ++eMultIso;
458 
459  if (eMultIso == 1) {
460  // restrict to the leading electron
461  fill("elecPt_", elec->pt());
462  fill("elecEta_", elec->eta());
463  fill("elecPhi_", elec->phi());
464  }
465  }
466  }
467  }
468  //fill("elecMult_", eMult);
469  fill("elecMultTight_", eMultIso);
470 
471  /*
472  ------------------------------------------------------------
473 
474  Muon Monitoring
475 
476  ------------------------------------------------------------
477  */
478 
479  // fill monitoring plots for muons
480  unsigned int mMult = 0, mTight = 0, mTightId = 0;
481 
484 
485  if (!event.getByToken(muons_, muons))
486  return;
487 
488  for (edm::View<pat::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
489  // restrict to globalMuons
490  if (muon->isGlobalMuon()) {
491  fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track!
492  fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy());
493 
494  // apply preselection loose muon
495  if (!muonSelect_ || (*muonSelect_)(*muon)) {
496  //loose muon count
497  ++mMult;
498 
499  double chHadPt = muon->pfIsolationR04().sumChargedHadronPt;
500  double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt;
501  double phoEt = muon->pfIsolationR04().sumPhotonEt;
502 
503  double pfRelIso = (chHadPt + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) /
504  muon->pt(); // CB dBeta corrected iso!
505 
506  if (!(muon->isGlobalMuon() && muon->isPFMuon() && muon->globalTrack()->normalizedChi2() < 10. &&
507  muon->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && muon->numberOfMatchedStations() > 1 &&
508  fabs(muon->muonBestTrack()->dxy(pver.position())) < 0.2 &&
509  fabs(muon->muonBestTrack()->dz(pver.position())) < 0.5 &&
510  muon->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
511  muon->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5))
512  continue;
513 
514  if (mTightId == 0) {
515  // restrict to leading muon
516  fill("muonRelIso_", pfRelIso);
517  fill("muonChHadIso_", chHadPt);
518  fill("muonNeHadIso_", neHadEt);
519  fill("muonPhIso_", phoEt);
520  //fill("muonRelIso_", pfRelIso);
521  }
522 
523  if (!(pfRelIso < 0.15))
524  continue;
525  //tight id
526  if (mTight == 0) {
527  // restrict to leading muon
528 
529  fill("muonPt_", muon->pt());
530  fill("muonEta_", muon->eta());
531  fill("muonPhi_", muon->phi());
532  }
533  mTight++;
534  mTightId++;
535  }
536  }
537  }
538  fill("muonMult_", mMult); //loose
539  fill("muonMultTight_", mTight); //tight id & iso
540 
541  /*
542  ------------------------------------------------------------
543 
544  Jet Monitoring
545 
546  ------------------------------------------------------------
547  */
548 
549  // loop jet collection
550  std::vector<pat::Jet> correctedJets;
551  std::vector<double> JetTagValues;
552  unsigned int mult = 0, loosemult = 0, multBCSVM = 0;
553 
555  if (!event.getByToken(jets_, jets)) {
556  return;
557  }
558 
559  for (edm::View<pat::Jet>::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) {
560  // check jetID for calo jets
561  //unsigned int idx = jet - jets->begin();
562 
563  pat::Jet sel = *jet;
564 
565  if (!(*jetSelect)(sel))
566  continue;
567  // if (!jetSelect(sel)) continue;
568 
569  // prepare jet to fill monitor histograms
570  pat::Jet monitorJet = *jet;
571 
572  ++mult;
573 
574  if (monitorJet.chargedHadronEnergyFraction() > 0 && monitorJet.chargedMultiplicity() > 0 &&
575  monitorJet.chargedEmEnergyFraction() < 0.99 && monitorJet.neutralHadronEnergyFraction() < 0.99 &&
576  monitorJet.neutralEmEnergyFraction() < 0.99 &&
577  (monitorJet.chargedMultiplicity() + monitorJet.neutralMultiplicity()) > 1) {
578  correctedJets.push_back(monitorJet);
579  ++loosemult; // determine jet multiplicity
580 
581  fill("jetBCSV_",
582  monitorJet.bDiscriminator(
583  "pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now.
584  if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89)
585  ++multBCSVM;
586 
587  // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV
588  // tagger
589  JetTagValues.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags"));
590  // }
591  // fill pt (raw or L2L3) for the leading four jets
592  if (loosemult == 1) {
593  //cout<<" jet id= "<<monitorJet.chargedHadronEnergyFraction()<<endl;
594 
595  fill("jet1Pt_", monitorJet.pt());
596  //fill("jet1PtRaw_", jet->pt());
597  fill("jet1Eta_", monitorJet.eta());
598  };
599  if (loosemult == 2) {
600  fill("jet2Pt_", monitorJet.pt());
601  //fill("jet2PtRaw_", jet->pt());
602  fill("jet2Eta_", monitorJet.eta());
603  }
604  if (loosemult == 3) {
605  fill("jet3Pt_", monitorJet.pt());
606  //fill("jet3PtRaw_", jet->pt());
607  fill("jet3Eta_", monitorJet.eta());
608  }
609  if (loosemult == 4) {
610  fill("jet4Pt_", monitorJet.pt());
611  //fill("jet4PtRaw_", jet->pt());
612  fill("jet4Eta_", monitorJet.eta());
613  }
614  }
615  }
616  fill("jetMult_", mult);
617  fill("jetLooseMult_", loosemult);
618  fill("jetMultBCSVM_", multBCSVM);
619 
620  /*
621  ------------------------------------------------------------
622 
623  MET Monitoring
624 
625  ------------------------------------------------------------
626  */
627 
628  // fill monitoring histograms for met
629  for (std::vector<edm::EDGetTokenT<edm::View<pat::MET>>>::const_iterator met_ = mets_.begin(); met_ != mets_.end();
630  ++met_) {
632  if (!event.getByToken(*met_, met))
633  continue;
634  if (met->begin() != met->end()) {
635  unsigned int idx = met_ - mets_.begin();
636  if (idx == 0)
637  fill("slimmedMETs_", met->begin()->et());
638  if (idx == 1)
639  fill("slimmedMETsNoHF_", met->begin()->et());
640  if (idx == 2)
641  fill("slimmedMETsPuppi_", met->begin()->et());
642  }
643  }
644 
645  /*
646  ------------------------------------------------------------
647 
648  Event Monitoring
649 
650  ------------------------------------------------------------
651  */
652 
653  // fill W boson and top mass estimates
654 
655  Calculate_miniAOD eventKinematics(MAXJETS, WMASS);
656  double wMass = eventKinematics.massWBoson(correctedJets);
657  double topMass = eventKinematics.massTopQuark(correctedJets);
658  if (wMass >= 0 && topMass >= 0) {
659  fill("massW_", wMass);
660  fill("massTop_", topMass);
661  }
662 
663  // Fill M3 with Btag (CSV Tight) requirement
664 
665  // if (!includeBTag_) return;
666  if (correctedJets.size() != JetTagValues.size())
667  return;
668  double btopMass = eventKinematics.massBTopQuark(correctedJets, JetTagValues, 0.89); //hard coded CSVv2 value
669 
670  if (btopMass >= 0)
671  fill("massBTop_", btopMass);
672 
673  // fill plots for trigger monitoring
674  if ((lowerEdge_ == -1. && upperEdge_ == -1.) || (lowerEdge_ < wMass && wMass < upperEdge_)) {
676  fill(event, *triggerTable, "trigger", triggerPaths_);
677  if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) {
678  // log runnumber, lumi block, event number & some
679  // more pysics infomation for interesting events
680  fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run());
681  fill("eventLogger_", 1.5, logged_ + 0.5, event.eventAuxiliary().luminosityBlock());
682  fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event());
683  //if (correctedJets.size() > 0)
684  if (!correctedJets.empty())
685  fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt());
686  if (correctedJets.size() > 1)
687  fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt());
688  if (correctedJets.size() > 2)
689  fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt());
690  if (correctedJets.size() > 3)
691  fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt());
692  fill("eventLogger_", 7.5, logged_ + 0.5, wMass);
693  fill("eventLogger_", 8.5, logged_ + 0.5, topMass);
694  ++logged_;
695  }
696  }
697  }
698 } // namespace TopSingleLepton_miniAOD
699 
701  : vertexSelect_(nullptr),
702  beamspot_(""),
703  beamspotSelect_(nullptr),
704  MuonStep(nullptr),
705  ElectronStep(nullptr),
706  PvStep(nullptr),
707  METStep(nullptr) {
708  JetSteps.clear();
709 
710  // configure preselection
711  edm::ParameterSet presel = cfg.getParameter<edm::ParameterSet>("preselection");
712  if (presel.existsAs<edm::ParameterSet>("trigger")) {
714  triggerTable__ = consumes<edm::TriggerResults>(trigger.getParameter<edm::InputTag>("src"));
715  triggerPaths_ = trigger.getParameter<std::vector<std::string>>("select");
716  }
717  if (presel.existsAs<edm::ParameterSet>("beamspot")) {
719  beamspot_ = beamspot.getParameter<edm::InputTag>("src");
720  beamspot__ = consumes<reco::BeamSpot>(beamspot.getParameter<edm::InputTag>("src"));
722  }
723 
724  // conifgure the selection
725  sel_ = cfg.getParameter<std::vector<edm::ParameterSet>>("selection");
726  setup_ = cfg.getParameter<edm::ParameterSet>("setup");
727  for (unsigned int i = 0; i < sel_.size(); ++i) {
728  selectionOrder_.push_back(sel_.at(i).getParameter<std::string>("label"));
729  selection_[selectionStep(selectionOrder_.back())] = std::make_pair(
730  sel_.at(i),
731  std::unique_ptr<TopSingleLepton_miniAOD::MonitorEnsemble>(new TopSingleLepton_miniAOD::MonitorEnsemble(
732  selectionStep(selectionOrder_.back()).c_str(), setup_, consumesCollector())));
733  }
734  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end();
735  ++selIt) {
736  std::string key = selectionStep(*selIt), type = objectType(*selIt);
737  if (selection_.find(key) != selection_.end()) {
738  if (type == "muons") {
740  }
741  if (type == "elecs") {
743  }
744  if (type == "pvs") {
746  }
747  if (type == "jets") {
750  }
751 
752  if (type == "met") {
754  }
755  }
756  }
757 }
758 void TopSingleLeptonDQM_miniAOD::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, edm::EventSetup const&) {
759  for (auto selIt = selection_.begin(); selIt != selection_.end(); ++selIt) {
760  selIt->second.second->book(ibooker);
761  }
762 }
766  if (!event.getByToken(triggerTable__, triggerTable))
767  return;
768  if (!accept(event, *triggerTable, triggerPaths_))
769  return;
770  }
771  if (!beamspot__.isUninitialized()) {
773  if (!event.getByToken(beamspot__, beamspot))
774  return;
775  if (!(*beamspotSelect_)(*beamspot))
776  return;
777  }
778 
779  unsigned int passed = 0;
780  unsigned int nJetSteps = -1;
781 
782  for (std::vector<std::string>::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end();
783  ++selIt) {
784  std::string key = selectionStep(*selIt), type = objectType(*selIt);
785  if (selection_.find(key) != selection_.end()) {
786  if (type == "empty") {
787  selection_[key].second->fill(event, setup);
788  }
789  if (type == "muons" && MuonStep != nullptr) {
790  if (MuonStep->select(event)) {
791  ++passed;
792 
793  selection_[key].second->fill(event, setup);
794  } else
795  break;
796  }
797 
798  if (type == "elecs" && ElectronStep != nullptr) {
799  if (ElectronStep->select(event)) {
800  ++passed;
801  selection_[key].second->fill(event, setup);
802  } else
803  break;
804  }
805 
806  if (type == "pvs" && PvStep != nullptr) {
807  if (PvStep->selectVertex(event)) {
808  ++passed;
809  selection_[key].second->fill(event, setup);
810  } else
811  break;
812  }
813 
814  if (type == "jets") {
815  nJetSteps++;
816  if (JetSteps[nJetSteps] != nullptr) {
817  if (JetSteps[nJetSteps]->select(event, setup)) {
818  ++passed;
819  selection_[key].second->fill(event, setup);
820  } else
821  break;
822  }
823  }
824 
825  if (type == "met" && METStep != nullptr) {
826  if (METStep->select(event)) {
827  ++passed;
828  selection_[key].second->fill(event, setup);
829  } else
830  break;
831  }
832  }
833  }
834 }
835 
836 // Local Variables:
837 // show-trailing-whitespace: t
838 // truncate-lines: t
839 // End:
TopSingleLepton_miniAOD::MonitorEnsemble::hists_
std::map< std::string, MonitorElement * > hists_
histogram container
Definition: TopSingleLeptonDQM_miniAOD.h:143
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
JetTag.h
TopSingleLeptonDQM_miniAOD::beamspot__
edm::EDGetTokenT< reco::BeamSpot > beamspot__
Definition: TopSingleLeptonDQM_miniAOD.h:217
CaloJet.h
mps_fire.i
i
Definition: mps_fire.py:355
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
funct::false
false
Definition: Factorize.h:34
TopSingleLepton_miniAOD::MonitorEnsemble::elecs_
edm::EDGetTokenT< edm::View< pat::Electron > > elecs_
Definition: TopSingleLeptonDQM_miniAOD.h:90
TopSingleLepton_miniAOD::MonitorEnsemble::label_
std::string label_
instance label
Definition: TopSingleLeptonDQM_miniAOD.h:84
TopSingleLepton_miniAOD::MonitorEnsemble::jetIDSelect_
std::unique_ptr< StringCutObjectSelector< reco::JetID > > jetIDSelect_
extra jetID selection on calo jets
Definition: TopSingleLeptonDQM_miniAOD.h:124
pat::Jet::bDiscriminator
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
muon
Definition: MuonCocktails.h:17
TopSingleLepton_miniAOD::MonitorEnsemble::mets_
std::vector< edm::EDGetTokenT< edm::View< pat::MET > > > mets_
considers a vector of METs
Definition: TopSingleLeptonDQM_miniAOD.h:86
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
JetCorrector.h
Muon.h
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
PFJet.h
singleTopDQM_cfi.elecExtras
elecExtras
Definition: singleTopDQM_cfi.py:52
pat::Jet::neutralHadronEnergyFraction
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:404
TopSingleLeptonDQM_miniAOD::triggerTable__
edm::EDGetTokenT< edm::TriggerResults > triggerTable__
trigger table
Definition: TopSingleLeptonDQM_miniAOD.h:205
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TopSingleLepton_miniAOD::MonitorEnsemble::rhoTag
edm::InputTag rhoTag
Definition: TopSingleLeptonDQM_miniAOD.h:98
TopSingleLepton_miniAOD::MonitorEnsemble::elecIso_
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecIso_
extra isolation criterion on electron
Definition: TopSingleLeptonDQM_miniAOD.h:105
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:71
TopSingleLeptonDQM_miniAOD.h
CalibrationSummaryClient_cfi.sources
sources
Definition: CalibrationSummaryClient_cfi.py:23
reco::Vertex::position
const Point & position() const
position
Definition: Vertex.h:114
HLTObjectsMonitor_cfi.beamspot
beamspot
Definition: HLTObjectsMonitor_cfi.py:11
TopSingleLepton_miniAOD::MonitorEnsemble
Definition: TopSingleLeptonDQM_miniAOD.h:30
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
topSingleLeptonDQM_PU_cfi.electronId
electronId
when omitted electron plots will be filled w/o cut on electronId
Definition: topSingleLeptonDQM_PU_cfi.py:39
TopSingleLepton_miniAOD::MonitorEnsemble::book
void book(DQMStore::IBooker &ibooker)
book histograms in subdirectory directory
Definition: TopSingleLeptonDQM_miniAOD.cc:163
TopSingleLeptonDQM_miniAOD::beamspotSelect_
std::unique_ptr< StringCutObjectSelector< reco::BeamSpot > > beamspotSelect_
string cut selector
Definition: TopSingleLeptonDQM_miniAOD.h:219
TopSingleLeptonDQM_miniAOD::selection_
std::map< std::string, std::pair< edm::ParameterSet, std::unique_ptr< TopSingleLepton_miniAOD::MonitorEnsemble > > > selection_
Definition: TopSingleLeptonDQM_miniAOD.h:230
TopSingleLeptonDQM_miniAOD::selectionOrder_
std::vector< std::string > selectionOrder_
Definition: TopSingleLeptonDQM_miniAOD.h:223
TopSingleLepton_miniAOD
Definition: TopSingleLeptonDQM_miniAOD.cc:20
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
edm::Handle< edm::TriggerResults >
training_settings.idx
idx
Definition: training_settings.py:16
TopSingleLeptonDQM_miniAOD::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: TopSingleLeptonDQM_miniAOD.cc:758
dqmdumpme.first
first
Definition: dqmdumpme.py:55
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
TopSingleLeptonDQM_miniAOD::triggerPaths_
std::vector< std::string > triggerPaths_
trigger paths
Definition: TopSingleLeptonDQM_miniAOD.h:211
TopSingleLepton_miniAOD::MonitorEnsemble::directory_
std::string directory_
Definition: TopSingleLeptonDQM_miniAOD.h:145
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
deltaR.h
JetCorrectionsRecord.h
TopSingleLepton_miniAOD::MAXJETS
static const unsigned int MAXJETS
Definition: TopSingleLeptonDQM_miniAOD.cc:24
TopSingleLepton_miniAOD::MonitorEnsemble::jetSelect_
std::string jetSelect_
Definition: TopSingleLeptonDQM_miniAOD.h:127
accept
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
TopSingleLeptonDQM_miniAOD::setup_
edm::ParameterSet setup_
Definition: TopSingleLeptonDQM_miniAOD.h:238
TopSingleLeptonDQM_miniAOD::METStep
std::unique_ptr< SelectionStep< pat::MET > > METStep
Definition: TopSingleLeptonDQM_miniAOD.h:234
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
TopSingleLepton_miniAOD::MonitorEnsemble::pvSelect_
std::unique_ptr< StringCutObjectSelector< reco::Vertex > > pvSelect_
Definition: TopSingleLeptonDQM_miniAOD.h:111
singleTopDQM_cfi.pvExtras
pvExtras
Definition: singleTopDQM_cfi.py:49
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
TopSingleLepton_miniAOD::MonitorEnsemble::elecSelect_
std::unique_ptr< StringCutObjectSelector< pat::Electron > > elecSelect_
extra selection on electrons
Definition: TopSingleLeptonDQM_miniAOD.h:107
TopSingleLeptonDQM_miniAOD::analyze
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
do this during the event loop
Definition: TopSingleLeptonDQM_miniAOD.cc:763
TopSingleLeptonDQM_miniAOD::MuonStep
std::unique_ptr< SelectionStep< pat::Muon > > MuonStep
Definition: TopSingleLeptonDQM_miniAOD.h:231
edm::EDGetTokenT::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:70
singleTopDQM_cfi.muonExtras
muonExtras
Definition: singleTopDQM_cfi.py:56
TopSingleLepton_miniAOD::MonitorEnsemble::verbosity_
Level verbosity_
verbosity level for booking
Definition: TopSingleLeptonDQM_miniAOD.h:78
beamspot
Definition: BeamSpotWrite2Txt.h:8
TopSingleLeptonDQM_miniAOD::PvStep
std::unique_ptr< SelectionStep< reco::Vertex > > PvStep
Definition: TopSingleLeptonDQM_miniAOD.h:233
singleTopDQM_cfi.elecs
elecs
Definition: singleTopDQM_cfi.py:41
TopSingleLepton_miniAOD::MonitorEnsemble::lowerEdge_
double lowerEdge_
mass window upper and lower edge
Definition: TopSingleLeptonDQM_miniAOD.h:137
EDGetToken.h
pat::Jet::chargedMultiplicity
int chargedMultiplicity() const
chargedMultiplicity
Definition: Jet.h:746
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD
TopSingleLeptonDQM_miniAOD(const edm::ParameterSet &cfg)
default constructor
Definition: TopSingleLeptonDQM_miniAOD.cc:700
TopSingleLepton_miniAOD::MonitorEnsemble::jetIDLabel_
edm::EDGetTokenT< reco::JetIDValueMap > jetIDLabel_
jetID as an extra selection type
Definition: TopSingleLeptonDQM_miniAOD.h:122
TopSingleLeptonDQM_miniAOD::sel_
std::vector< edm::ParameterSet > sel_
Definition: TopSingleLeptonDQM_miniAOD.h:237
singleTopDQM_cfi.massExtras
massExtras
Definition: singleTopDQM_cfi.py:70
edm::View
Definition: CaloClusterFwd.h:14
TopSingleLepton_miniAOD::MonitorEnsemble::STANDARD
Definition: TopSingleLeptonDQM_miniAOD.h:33
edm::ParameterSet
Definition: ParameterSet.h:36
EDConsumerBase.h
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
pat::Jet::neutralEmEnergyFraction
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:412
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
TopSingleLeptonDQM_miniAOD::beamspot_
edm::InputTag beamspot_
beamspot
Definition: TopSingleLeptonDQM_miniAOD.h:216
TopSingleLepton_miniAOD::MonitorEnsemble::upperEdge_
double upperEdge_
Definition: TopSingleLeptonDQM_miniAOD.h:137
TopSingleLepton_miniAOD::MonitorEnsemble::triggerTable_
edm::EDGetTokenT< edm::TriggerResults > triggerTable_
trigger table
Definition: TopSingleLeptonDQM_miniAOD.h:93
Calculate_miniAOD::massWBoson
double massWBoson(const std::vector< pat::Jet > &jets)
calculate W boson mass estimate
Definition: TopDQMHelpers.cc:165
Calculate_miniAOD
Definition: TopDQMHelpers.h:70
TopSingleLepton_miniAOD::MonitorEnsemble::triggerPaths_
std::vector< std::string > triggerPaths_
Definition: TopSingleLeptonDQM_miniAOD.h:96
pat::Jet::neutralMultiplicity
int neutralMultiplicity() const
neutralMultiplicity
Definition: Jet.h:466
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
TopSingleLepton_miniAOD::MonitorEnsemble::pvs_
edm::EDGetTokenT< edm::View< reco::Vertex > > pvs_
Definition: TopSingleLeptonDQM_miniAOD.h:91
edm::EventSetup
Definition: EventSetup.h:57
TopSingleLepton_miniAOD::MonitorEnsemble::muonIso_
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonIso_
extra isolation criterion on muon
Definition: TopSingleLeptonDQM_miniAOD.h:114
TopSingleLepton_miniAOD::MonitorEnsemble::jets_
edm::EDGetTokenT< edm::View< pat::Jet > > jets_
input sources for monitoring
Definition: TopSingleLeptonDQM_miniAOD.h:88
TopSingleLeptonDQM_miniAOD::ElectronStep
std::unique_ptr< SelectionStep< pat::Electron > > ElectronStep
Definition: TopSingleLeptonDQM_miniAOD.h:232
TopSingleLepton_miniAOD::MonitorEnsemble::triggerBinLabels
void triggerBinLabels(std::string channel, const std::vector< std::string > labels)
set configurable labels for trigger monitoring histograms
Definition: TopSingleLeptonDQM_miniAOD.h:148
MET.h
Jet.h
FSQDQM_cfi.pvs
pvs
Definition: FSQDQM_cfi.py:12
looper.cfg
cfg
Definition: looper.py:297
Calculate_miniAOD::massTopQuark
double massTopQuark(const std::vector< pat::Jet > &jets)
calculate t-quark mass estimate
Definition: TopDQMHelpers.cc:171
pat::Jet::chargedEmEnergyFraction
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:408
TopSingleLepton_miniAOD::MonitorEnsemble::electronId_
edm::EDGetTokenT< edm::ValueMap< float > > electronId_
electronId label
Definition: TopSingleLeptonDQM_miniAOD.h:101
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition: device_unique_ptr.h:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
TopSingleLepton_miniAOD::MonitorEnsemble::muonSelect_
std::unique_ptr< StringCutObjectSelector< pat::Muon > > muonSelect_
extra selection on muons
Definition: TopSingleLeptonDQM_miniAOD.h:117
TopSingleLepton_miniAOD::WMASS
static const double WMASS
Definition: TopSingleLeptonDQM_miniAOD.cc:27
type
type
Definition: HCALResponse.h:21
std
Definition: JetResolutionObject.h:76
singleTopDQM_cfi.jetExtras
jetExtras
Definition: singleTopDQM_cfi.py:60
pat::Jet::chargedHadronEnergyFraction
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
Definition: Jet.h:400
singleTopDQM_cfi.monitoring
monitoring
Definition: singleTopDQM_cfi.py:46
TopSingleLepton_miniAOD::MonitorEnsemble::eidCutValue_
double eidCutValue_
Definition: TopSingleLeptonDQM_miniAOD.h:103
TopSingleLepton_miniAOD::MonitorEnsemble::jetSelect
std::unique_ptr< StringCutObjectSelector< pat::Jet > > jetSelect
Definition: TopSingleLeptonDQM_miniAOD.h:128
metsig::jet
Definition: SignAlgoResolutions.h:47
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
StringCutObjectSelector< pat::Electron >
TriggerAnalyzer.passed
passed
Definition: TriggerAnalyzer.py:62
pseudoTop_cfi.wMass
wMass
Definition: pseudoTop_cfi.py:12
TopSingleLepton_miniAOD::MonitorEnsemble::logged_
int logged_
number of logged interesting events
Definition: TopSingleLeptonDQM_miniAOD.h:140
SelectionStep
Templated helper class to allow a selection on a certain object collection.
Definition: TopDQMHelpers.h:237
TopSingleLepton_miniAOD::MonitorEnsemble::jetCorrector_
std::string jetCorrector_
jetCorrector
Definition: TopSingleLeptonDQM_miniAOD.h:120
TopSingleLepton_miniAOD::MonitorEnsemble::DEBUG
Definition: TopSingleLeptonDQM_miniAOD.h:33
VarParsing.mult
mult
Definition: VarParsing.py:659
dqm::implementation::IBooker
Definition: DQMStore.h:43
Electron.h
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
trigger
Definition: HLTPrescaleTableCond.h:8
Calculate_miniAOD::massBTopQuark
double massBTopQuark(const std::vector< pat::Jet > &jets, std::vector< double > VbtagWP, double btagWP_)
calculate b-tagged t-quark mass estimate
Definition: TopDQMHelpers.cc:177
ConsumesCollector.h
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TopSingleLeptonDQM_miniAOD::objectType
std::string objectType(const std::string &label)
Definition: TopSingleLeptonDQM_miniAOD.h:202
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
TopSingleLepton_miniAOD::MonitorEnsemble::VERBOSE
Definition: TopSingleLeptonDQM_miniAOD.h:33
TopSingleLepton_miniAOD::MonitorEnsemble::muons_
edm::EDGetTokenT< edm::View< pat::Muon > > muons_
Definition: TopSingleLeptonDQM_miniAOD.h:89
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
TopSingleLepton_miniAOD::MonitorEnsemble::fill
void fill(const edm::Event &event, const edm::EventSetup &setup)
fill monitor histograms with electronId and jetCorrections
Definition: TopSingleLeptonDQM_miniAOD.cc:336
TopSingleLeptonDQM_miniAOD::JetSteps
std::vector< std::unique_ptr< SelectionStep< pat::Jet > > > JetSteps
Definition: TopSingleLeptonDQM_miniAOD.h:235
crabWrapper.key
key
Definition: crabWrapper.py:19
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::TriggerResults
Definition: TriggerResults.h:35
reco::Vertex
Definition: Vertex.h:35
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
TopSingleLeptonDQM_miniAOD::selectionStep
std::string selectionStep(const std::string &label)
Definition: TopSingleLeptonDQM_miniAOD.h:205