CMS 3D CMS Logo

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