CMS 3D CMS Logo

PATIsolatedTrackProducer.cc
Go to the documentation of this file.
1 #include <string>
2 
10 
12 
29 
33 
39 
41 
42 namespace pat {
43 
45  public:
48 
50  ~PATIsolatedTrackProducer() override;
51 
52  void produce(edm::Event&, const edm::EventSetup&) override;
53 
54  // compute iso/miniiso
57  int pc_idx,
58  pat::PFIsolation& iso,
59  pat::PFIsolation& miniiso) const;
60 
62 
63  float getPFNeutralSum(const PolarLorentzVector& p4, const pat::PackedCandidateCollection* pc, int pc_idx) const;
64 
67  int pc_idx,
68  int& pc_ref_idx) const;
69 
70  float getDeDx(const reco::DeDxHitInfo* hitInfo, bool doPixel, bool doStrip) const;
71 
73 
74  void getCaloJetEnergy(const PolarLorentzVector&, const reco::CaloJetCollection*, float&, float&) const;
75 
76  private:
92  const float pT_cut_; // only save cands with pT>pT_cut_
93  const float pT_cut_noIso_; // above this pT, don't apply any iso cut
94  const float pfIsolation_DR_; // isolation radius
95  const float pfIsolation_DZ_; // used in determining if pfcand is from PV or PU
96  const float absIso_cut_; // save if ANY of absIso, relIso, or miniRelIso pass the cuts
97  const float relIso_cut_;
98  const float miniRelIso_cut_;
99  const float caloJet_DR_; // save energy of nearest calojet within caloJet_DR_
100  const float pflepoverlap_DR_; // pf lepton overlap radius
101  const float pflepoverlap_pTmin_; // pf lepton overlap min pT (only look at PF candidates with pT>pflepoverlap_pTmin_)
102  const float pcRefNearest_DR_; // radius for nearest charged packed candidate
103  const float pcRefNearest_pTmin_; // min pT for nearest charged packed candidate
104  const float pfneutralsum_DR_; // pf lepton overlap radius
105  const bool useHighPurity_;
106  const bool saveDeDxHitInfo_;
108 
109  std::vector<double> miniIsoParams_;
110 
113  };
114 } // namespace pat
115 
117  : pc_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
118  lt_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("lostTracks"))),
119  gt_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("generalTracks"))),
120  pv_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryVertices"))),
121  gt2pc_(consumes<edm::Association<pat::PackedCandidateCollection>>(
122  iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
123  gt2lt_(consumes<edm::Association<pat::PackedCandidateCollection>>(
124  iConfig.getParameter<edm::InputTag>("lostTracks"))),
125  pc2pf_(consumes<edm::Association<reco::PFCandidateCollection>>(
126  iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
127  caloJets_(consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("caloJets"))),
128  gt2dedxStrip_(consumes<edm::ValueMap<reco::DeDxData>>(iConfig.getParameter<edm::InputTag>("dEdxDataStrip"))),
129  gt2dedxPixel_(consumes<edm::ValueMap<reco::DeDxData>>(iConfig.getParameter<edm::InputTag>("dEdxDataPixel"))),
130  gt2dedxHitInfo_(consumes<reco::DeDxHitInfoAss>(iConfig.getParameter<edm::InputTag>("dEdxHitInfo"))),
131  addPrescaledDeDxTracks_(iConfig.getParameter<bool>("addPrescaledDeDxTracks")),
132  gt2dedxHitInfoPrescale_(addPrescaledDeDxTracks_ ? consumes<edm::ValueMap<int>>(
133  iConfig.getParameter<edm::InputTag>("dEdxHitInfoPrescale"))
134  : edm::EDGetTokenT<edm::ValueMap<int>>()),
135  usePrecomputedDeDxStrip_(iConfig.getParameter<bool>("usePrecomputedDeDxStrip")),
136  usePrecomputedDeDxPixel_(iConfig.getParameter<bool>("usePrecomputedDeDxPixel")),
137  pT_cut_(iConfig.getParameter<double>("pT_cut")),
138  pT_cut_noIso_(iConfig.getParameter<double>("pT_cut_noIso")),
139  pfIsolation_DR_(iConfig.getParameter<double>("pfIsolation_DR")),
140  pfIsolation_DZ_(iConfig.getParameter<double>("pfIsolation_DZ")),
141  absIso_cut_(iConfig.getParameter<double>("absIso_cut")),
142  relIso_cut_(iConfig.getParameter<double>("relIso_cut")),
143  miniRelIso_cut_(iConfig.getParameter<double>("miniRelIso_cut")),
144  caloJet_DR_(iConfig.getParameter<double>("caloJet_DR")),
145  pflepoverlap_DR_(iConfig.getParameter<double>("pflepoverlap_DR")),
146  pflepoverlap_pTmin_(iConfig.getParameter<double>("pflepoverlap_pTmin")),
147  pcRefNearest_DR_(iConfig.getParameter<double>("pcRefNearest_DR")),
148  pcRefNearest_pTmin_(iConfig.getParameter<double>("pcRefNearest_pTmin")),
149  pfneutralsum_DR_(iConfig.getParameter<double>("pfneutralsum_DR")),
150  useHighPurity_(iConfig.getParameter<bool>("useHighPurity")),
151  saveDeDxHitInfo_(iConfig.getParameter<bool>("saveDeDxHitInfo")),
152  saveDeDxHitInfoCut_(iConfig.getParameter<std::string>("saveDeDxHitInfoCut")) {
153  // TrackAssociator parameters
154  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
155  edm::ConsumesCollector iC = consumesCollector();
157 
159 
160  miniIsoParams_ = iConfig.getParameter<std::vector<double>>("miniIsoParams");
161  if (miniIsoParams_.size() != 3)
162  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 3 elements.\n";
163 
164  produces<pat::IsolatedTrackCollection>();
165 
166  if (saveDeDxHitInfo_) {
167  produces<reco::DeDxHitInfoCollection>();
168  produces<reco::DeDxHitInfoAss>();
169  }
170 }
171 
173 
175  // packedPFCandidate collection
177  iEvent.getByToken(pc_, pc_h);
178  const pat::PackedCandidateCollection* pc = pc_h.product();
179 
180  // lostTracks collection
182  iEvent.getByToken(lt_, lt_h);
183  const pat::PackedCandidateCollection* lt = lt_h.product();
184 
185  // generalTracks collection
187  iEvent.getByToken(gt_, gt_h);
189 
190  // get the primary vertex
192  iEvent.getByToken(pv_, pvs);
193  const reco::Vertex& pv = (*pvs)[0];
194 
195  // generalTracks-->packedPFCandidate association
197  iEvent.getByToken(gt2pc_, gt2pc);
198 
199  // generalTracks-->lostTracks association
201  iEvent.getByToken(gt2lt_, gt2lt);
202 
203  // packedPFCandidates-->particleFlow(reco::PFCandidate) association
205  iEvent.getByToken(pc2pf_, pc2pf);
206 
208  iEvent.getByToken(caloJets_, caloJets);
209 
210  // associate generalTracks with their DeDx data (estimator for strip dE/dx)
212  iEvent.getByToken(gt2dedxStrip_, gt2dedxStrip);
213 
214  // associate generalTracks with their DeDx data (estimator for pixel dE/dx)
216  iEvent.getByToken(gt2dedxPixel_, gt2dedxPixel);
217 
218  // associate generalTracks with their DeDx hit info (used to estimate pixel dE/dx)
219  edm::Handle<reco::DeDxHitInfoAss> gt2dedxHitInfo;
220  iEvent.getByToken(gt2dedxHitInfo_, gt2dedxHitInfo);
221  edm::Handle<edm::ValueMap<int>> gt2dedxHitInfoPrescale;
222  if (addPrescaledDeDxTracks_) {
223  iEvent.getByToken(gt2dedxHitInfoPrescale_, gt2dedxHitInfoPrescale);
224  }
225 
227  iSetup.get<HcalChannelQualityRcd>().get("withTopo", hcalQ_h);
228  const HcalChannelQuality* hcalQ = hcalQ_h.product();
229 
231  iSetup.get<EcalChannelStatusRcd>().get(ecalS_h);
232  const EcalChannelStatus* ecalS = ecalS_h.product();
233 
234  auto outDeDxC = std::make_unique<reco::DeDxHitInfoCollection>();
235  std::vector<int> dEdXass;
236 
237  auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
238 
239  //add general tracks
240  for (unsigned int igt = 0; igt < generalTracks->size(); igt++) {
241  const reco::Track& gentk = (*gt_h)[igt];
242  if (useHighPurity_)
243  if (!(gentk.quality(reco::TrackBase::qualityByName("highPurity"))))
244  continue;
245  reco::TrackRef tkref = reco::TrackRef(gt_h, igt);
246  pat::PackedCandidateRef pcref = (*gt2pc)[tkref];
247  pat::PackedCandidateRef ltref = (*gt2lt)[tkref];
248  const pat::PackedCandidate* pfCand = pcref.get();
249  const pat::PackedCandidate* lostTrack = ltref.get();
250 
251  // Determine if this general track is associated with anything in packedPFCandidates or lostTracks
252  // Sometimes, a track gets associated w/ a neutral pfCand.
253  // In this case, ignore the pfCand and take from lostTracks
254  bool isInPackedCands = (pcref.isNonnull() && pcref.id() == pc_h.id() && pfCand->charge() != 0);
255  bool isInLostTracks = (ltref.isNonnull() && ltref.id() == lt_h.id());
256 
257  PolarLorentzVector polarP4;
259  pat::PackedCandidateRef refToCand;
260  int pdgId, charge, fromPV;
261  float dz, dxy, dzError, dxyError;
262  int pfCandInd; //to avoid counting packedPFCands in their own isolation
263  int ltCandInd; //to avoid pointing lost track to itself when looking for closest
264 
265  // get the four-momentum and charge
266  if (isInPackedCands) {
267  p4 = pfCand->p4();
268  polarP4 = pfCand->p4();
269  charge = pfCand->charge();
270  pfCandInd = pcref.key();
271  ltCandInd = -1;
272  } else if (isInLostTracks) {
273  p4 = lostTrack->p4();
274  polarP4 = lostTrack->p4();
275  charge = lostTrack->charge();
276  pfCandInd = -1;
277  ltCandInd = ltref.key();
278  } else {
279  double m = 0.13957018; //assume pion mass
280  double E = sqrt(m * m + gentk.p() * gentk.p());
281  p4.SetPxPyPzE(gentk.px(), gentk.py(), gentk.pz(), E);
282  polarP4.SetCoordinates(gentk.pt(), gentk.eta(), gentk.phi(), m);
283  charge = gentk.charge();
284  pfCandInd = -1;
285  ltCandInd = -1;
286  }
287 
288  int prescaled = 0;
289  if (addPrescaledDeDxTracks_) {
290  const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
291  if (dedxRef.isNonnull()) {
292  prescaled = (*gt2dedxHitInfoPrescale)[dedxRef];
293  }
294  }
295 
296  if (polarP4.pt() < pT_cut_ && prescaled <= 1)
297  continue;
298  if (charge == 0)
299  continue;
300 
301  // get the isolation of the track
302  pat::PFIsolation isolationDR03;
303  pat::PFIsolation miniIso;
304  getIsolation(polarP4, pc, pfCandInd, isolationDR03, miniIso);
305 
306  // isolation cut
307  if (polarP4.pt() < pT_cut_noIso_ && prescaled <= 1 &&
308  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
309  isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
310  miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
311  continue;
312 
313  // get the rest after the pt/iso cuts. Saves some runtime
314  if (isInPackedCands) {
315  pdgId = pfCand->pdgId();
316  dz = pfCand->dz();
317  dxy = pfCand->dxy();
318  dzError = pfCand->hasTrackDetails() ? pfCand->dzError() : gentk.dzError();
319  dxyError = pfCand->hasTrackDetails() ? pfCand->dxyError() : gentk.dxyError();
320  fromPV = pfCand->fromPV();
321  refToCand = pcref;
322  } else if (isInLostTracks) {
323  pdgId = lostTrack->pdgId();
324  dz = lostTrack->dz();
325  dxy = lostTrack->dxy();
326  dzError = lostTrack->hasTrackDetails() ? lostTrack->dzError() : gentk.dzError();
327  dxyError = lostTrack->hasTrackDetails() ? lostTrack->dxyError() : gentk.dxyError();
328  fromPV = lostTrack->fromPV();
329  refToCand = ltref;
330  } else {
331  pdgId = 0;
332  dz = gentk.dz(pv.position());
333  dxy = gentk.dxy(pv.position());
334  dzError = gentk.dzError();
335  dxyError = gentk.dxyError();
336  fromPV = -1;
337  refToCand = pat::PackedCandidateRef(); //NULL reference
338  }
339 
340  float caloJetEm, caloJetHad;
341  getCaloJetEnergy(polarP4, caloJets.product(), caloJetEm, caloJetHad);
342 
343  bool pfLepOverlap = getPFLeptonOverlap(polarP4, pc);
344  float pfNeutralSum = getPFNeutralSum(polarP4, pc, pfCandInd);
345 
347  int refToNearestPF_idx = -1;
348  getNearestPCRef(polarP4, pc, pfCandInd, refToNearestPF_idx);
349  if (refToNearestPF_idx != -1)
350  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
351 
352  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
353  int refToNearestLostTrack_idx = -1;
354  getNearestPCRef(polarP4, lt, ltCandInd, refToNearestLostTrack_idx);
355  if (refToNearestLostTrack_idx != -1)
356  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
357 
358  // if no dEdx info exists, just store -1
359  float dEdxPixel = -1, dEdxStrip = -1;
360  if (usePrecomputedDeDxStrip_ && gt2dedxStrip.isValid() && gt2dedxStrip->contains(tkref.id())) {
361  dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
362  } else if (gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())) {
363  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
364  dEdxStrip = getDeDx(hitInfo, false, true);
365  }
366  if (usePrecomputedDeDxPixel_ && gt2dedxPixel.isValid() && gt2dedxPixel->contains(tkref.id())) {
367  dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
368  } else if (gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())) {
369  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
370  dEdxPixel = getDeDx(hitInfo, true, false);
371  }
372 
373  int trackQuality = gentk.qualityMask();
374 
375  // get the associated ecal/hcal detectors
376  TrackDetMatchInfo trackDetInfo = getTrackDetMatchInfo(iEvent, iSetup, gentk);
377 
378  // fill ecal/hcal status vectors
379  std::vector<uint32_t> crossedHcalStatus;
380  for (auto const& did : trackDetInfo.crossedHcalIds) {
381  crossedHcalStatus.push_back(hcalQ->getValues(did.rawId())->getValue());
382  }
383  std::vector<uint16_t> crossedEcalStatus;
384  for (auto const& did : trackDetInfo.crossedEcalIds) {
385  crossedEcalStatus.push_back(ecalS->find(did.rawId())->getStatusCode());
386  }
387 
388  int deltaEta = int((trackDetInfo.trkGlobPosAtEcal.eta() - gentk.eta()) / 0.5 * 250);
389  int deltaPhi = int((trackDetInfo.trkGlobPosAtEcal.phi() - gentk.phi()) / 0.5 * 250);
390  if (deltaEta < -250)
391  deltaEta = -250;
392  if (deltaEta > 250)
393  deltaEta = 250;
394  if (deltaPhi < -250)
395  deltaPhi = -250;
396  if (deltaPhi > 250)
397  deltaPhi = 250;
398 
399  outPtrP->push_back(pat::IsolatedTrack(isolationDR03,
400  miniIso,
401  caloJetEm,
402  caloJetHad,
403  pfLepOverlap,
404  pfNeutralSum,
405  p4,
406  charge,
407  pdgId,
408  dz,
409  dxy,
410  dzError,
411  dxyError,
412  gentk.hitPattern(),
413  dEdxStrip,
414  dEdxPixel,
415  fromPV,
416  trackQuality,
417  crossedEcalStatus,
418  crossedHcalStatus,
419  deltaEta,
420  deltaPhi,
421  refToCand,
422  refToNearestPF,
423  refToNearestLostTrack));
424  outPtrP->back().setStatus(prescaled);
425 
426  if (saveDeDxHitInfo_) {
427  const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
428  if (saveDeDxHitInfoCut_(outPtrP->back()) && dedxRef.isNonnull()) {
429  outDeDxC->push_back(*dedxRef);
430  dEdXass.push_back(outDeDxC->size() - 1);
431  } else {
432  dEdXass.push_back(-1);
433  }
434  }
435  }
436 
437  // there are some number of pfcandidates with no associated track
438  // (mostly electrons, with a handful of muons)
439  // here we find these and store. Track-specific variables get some default values
440  for (unsigned int ipc = 0; ipc < pc->size(); ipc++) {
441  const pat::PackedCandidate& pfCand = pc->at(ipc);
443  reco::PFCandidateRef pfref = (*pc2pf)[pcref];
444 
445  // already counted if it has a track reference in the generalTracks collection
446  if (pfref.get()->trackRef().isNonnull() && pfref.get()->trackRef().id() == gt_h.id())
447  continue;
448 
449  PolarLorentzVector polarP4;
450  pat::PackedCandidateRef refToCand;
451  int pdgId, charge, fromPV;
452  float dz, dxy, dzError, dxyError;
453 
454  polarP4 = pfCand.polarP4();
455  charge = pfCand.charge();
456 
457  if (polarP4.pt() < pT_cut_)
458  continue;
459  if (charge == 0)
460  continue;
461 
462  // get the isolation of the track
463  pat::PFIsolation isolationDR03;
464  pat::PFIsolation miniIso;
465  getIsolation(polarP4, pc, ipc, isolationDR03, miniIso);
466 
467  // isolation cut
468  if (polarP4.pt() < pT_cut_noIso_ && !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
469  isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
470  miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
471  continue;
472 
473  pdgId = pfCand.pdgId();
474  dz = pfCand.dz();
475  dxy = pfCand.dxy();
476  if (pfCand.hasTrackDetails()) {
477  dzError = pfCand.dzError();
478  dxyError = pfCand.dxyError();
479  } else {
480  dzError = 0;
481  dxyError = 0;
482  }
483  fromPV = pfCand.fromPV();
484  refToCand = pcref;
485 
486  float caloJetEm, caloJetHad;
487  getCaloJetEnergy(polarP4, caloJets.product(), caloJetEm, caloJetHad);
488 
489  bool pfLepOverlap = getPFLeptonOverlap(polarP4, pc);
490  float pfNeutralSum = getPFNeutralSum(polarP4, pc, ipc);
491 
493  int refToNearestPF_idx = -1;
494  getNearestPCRef(polarP4, pc, ipc, refToNearestPF_idx);
495  if (refToNearestPF_idx != -1)
496  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
497 
498  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
499  int refToNearestLostTrack_idx = -1;
500  getNearestPCRef(polarP4, lt, -1, refToNearestLostTrack_idx);
501  if (refToNearestLostTrack_idx != -1)
502  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
503 
504  // fill with default values
506  float dEdxPixel = -1, dEdxStrip = -1;
507  int trackQuality = 0;
508  std::vector<uint16_t> ecalStatus;
509  std::vector<uint32_t> hcalStatus;
510  int deltaEta = 0;
511  int deltaPhi = 0;
512 
513  outPtrP->push_back(pat::IsolatedTrack(isolationDR03,
514  miniIso,
515  caloJetEm,
516  caloJetHad,
517  pfLepOverlap,
518  pfNeutralSum,
519  pfCand.p4(),
520  charge,
521  pdgId,
522  dz,
523  dxy,
524  dzError,
525  dxyError,
526  hp,
527  dEdxStrip,
528  dEdxPixel,
529  fromPV,
530  trackQuality,
531  ecalStatus,
532  hcalStatus,
533  deltaEta,
534  deltaPhi,
535  refToCand,
536  refToNearestPF,
537  refToNearestLostTrack));
538 
539  dEdXass.push_back(-1); // these never have dE/dx hit info, as there's no track
540  }
541 
542  auto orphHandle = iEvent.put(std::move(outPtrP));
543  if (saveDeDxHitInfo_) {
544  auto dedxOH = iEvent.put(std::move(outDeDxC));
545  auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxOH);
547  filler.insert(orphHandle, dEdXass.begin(), dEdXass.end());
548  filler.fill();
549  iEvent.put(std::move(dedxMatch));
550  }
551 }
552 
555  int pc_idx,
556  pat::PFIsolation& iso,
557  pat::PFIsolation& miniiso) const {
558  float chiso = 0, nhiso = 0, phiso = 0, puiso = 0; // standard isolation
559  float chmiso = 0, nhmiso = 0, phmiso = 0, pumiso = 0; // mini isolation
560  float miniDR = std::max(miniIsoParams_[0], std::min(miniIsoParams_[1], miniIsoParams_[2] / p4.pt()));
561  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
562  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
563  continue;
564  int id = std::abs(pf_it->pdgId());
565  bool fromPV = (pf_it->fromPV() > 1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
566  float pt = pf_it->p4().pt();
567  float dr = deltaR(p4, *pf_it);
568 
569  if (dr < pfIsolation_DR_) {
570  // charged cands from PV get added to trackIso
571  if (id == 211 && fromPV)
572  chiso += pt;
573  // charged cands not from PV get added to pileup iso
574  else if (id == 211)
575  puiso += pt;
576  // neutral hadron iso
577  if (id == 130)
578  nhiso += pt;
579  // photon iso
580  if (id == 22)
581  phiso += pt;
582  }
583  // same for mini isolation
584  if (dr < miniDR) {
585  if (id == 211 && fromPV)
586  chmiso += pt;
587  else if (id == 211)
588  pumiso += pt;
589  if (id == 130)
590  nhmiso += pt;
591  if (id == 22)
592  phmiso += pt;
593  }
594  }
595 
596  iso = pat::PFIsolation(chiso, nhiso, phiso, puiso);
597  miniiso = pat::PFIsolation(chmiso, nhmiso, phmiso, pumiso);
598 }
599 
600 //get overlap of isolated track with a PF lepton
602  const pat::PackedCandidateCollection* pc) const {
603  bool isOverlap = false;
604  float dr_min = pflepoverlap_DR_;
605  int id_drmin = 0;
606  for (const auto& pf : *pc) {
607  int id = std::abs(pf.pdgId());
608  int charge = std::abs(pf.charge());
609  bool fromPV = (pf.fromPV() > 1 || std::abs(pf.dz()) < pfIsolation_DZ_);
610  float pt = pf.pt();
611  if (charge == 0) // exclude neutral candidates
612  continue;
613  if (!(fromPV)) // exclude candidates not from PV
614  continue;
615  if (pt < pflepoverlap_pTmin_) // exclude pf candidates w/ pT below threshold
616  continue;
617 
618  float dr = deltaR(p4, pf);
619  if (dr > pflepoverlap_DR_) // exclude pf candidates far from isolated track
620  continue;
621 
622  if (dr < dr_min) {
623  dr_min = dr;
624  id_drmin = id;
625  }
626  }
627 
628  if (dr_min < pflepoverlap_DR_ && (id_drmin == 11 || id_drmin == 13))
629  isOverlap = true;
630 
631  return isOverlap;
632 }
633 
634 //get ref to nearest pf packed candidate
637  int pc_idx,
638  int& pc_ref_idx) const {
639  float dr_min = pcRefNearest_DR_;
640  float dr_min_pu = pcRefNearest_DR_;
641  int pc_ref_idx_pu = -1;
642  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
643  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
644  continue;
645  int charge = std::abs(pf_it->charge());
646  bool fromPV = (pf_it->fromPV() > 1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
647  float pt = pf_it->p4().pt();
648  float dr = deltaR(p4, *pf_it);
649  if (charge == 0) // exclude neutral candidates
650  continue;
651  if (pt < pcRefNearest_pTmin_) // exclude candidates w/ pT below threshold
652  continue;
653  if (dr > dr_min && dr > dr_min_pu) // exclude too far candidates
654  continue;
655 
656  if (fromPV) { // Priority to candidates from PV
657  if (dr < dr_min) {
658  dr_min = dr;
659  pc_ref_idx = int(pf_it - pc->begin());
660  }
661  } else { // Otherwise, store candidate from non-PV if no candidate from PV found
662  if (dr < dr_min_pu) {
663  dr_min_pu = dr;
664  pc_ref_idx_pu = int(pf_it - pc->begin());
665  }
666  }
667  }
668 
669  if (pc_ref_idx == -1 &&
670  pc_ref_idx_pu != -1) // If no candidate from PV was found, store candidate from non-PV (if found)
671  pc_ref_idx = pc_ref_idx_pu;
672 }
673 
674 // get PF neutral pT sum around isolated track
677  int pc_idx) const {
678  float nsum = 0;
679  float nhsum = 0, phsum = 0;
680  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
681  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
682  continue;
683  int id = std::abs(pf_it->pdgId());
684  float pt = pf_it->p4().pt();
685  float dr = deltaR(p4, *pf_it);
686 
687  if (dr < pfneutralsum_DR_) {
688  // neutral hadron sum
689  if (id == 130)
690  nhsum += pt;
691  // photon iso
692  if (id == 22)
693  phsum += pt;
694  }
695  }
696 
697  nsum = nhsum + phsum;
698 
699  return nsum;
700 }
701 
702 // get the estimated DeDx in either the pixels or strips (or both)
704  if (hitInfo == nullptr) {
705  return -1;
706  }
707 
708  std::vector<float> charge_vec;
709  for (unsigned int ih = 0; ih < hitInfo->size(); ih++) {
710  bool isPixel = (hitInfo->pixelCluster(ih) != nullptr);
711  bool isStrip = (hitInfo->stripCluster(ih) != nullptr);
712 
713  if (isPixel && !doPixel)
714  continue;
715  if (isStrip && !doStrip)
716  continue;
717 
718  // probably shouldn't happen
719  if (!isPixel && !isStrip)
720  continue;
721 
722  // shape selection for strips
723  if (isStrip && !DeDxTools::shapeSelection(*(hitInfo->stripCluster(ih))))
724  continue;
725 
726  float Norm = 0;
727  if (isPixel)
728  Norm = 3.61e-06; //compute the normalization factor to get the energy in MeV/mm
729  if (isStrip)
730  Norm = 3.61e-06 * 265;
731 
732  //save the dE/dx in MeV/mm to a vector.
733  charge_vec.push_back(Norm * hitInfo->charge(ih) / hitInfo->pathlength(ih));
734  }
735 
736  int size = charge_vec.size();
737  float result = 0.0;
738 
739  //build the harmonic 2 dE/dx estimator
740  float expo = -2;
741  for (int i = 0; i < size; i++) {
742  result += pow(charge_vec[i], expo);
743  }
744  result = (size > 0) ? pow(result / size, 1. / expo) : 0.0;
745 
746  return result;
747 }
748 
750  const edm::EventSetup& iSetup,
751  const reco::Track& track) {
755 
756  // can't use the associate() using reco::Track directly, since
757  // track->extra() is non-null but segfaults when trying to use it
758  return trackAssociator_.associate(iEvent, iSetup, trackAssocParameters_, &initialState);
759 }
760 
762  const reco::CaloJetCollection* cJets,
763  float& caloJetEm,
764  float& caloJetHad) const {
765  float nearestDR = 999;
766  int ind = -1;
767  for (unsigned int i = 0; i < cJets->size(); i++) {
768  float dR = deltaR(cJets->at(i), p4);
769  if (dR < caloJet_DR_ && dR < nearestDR) {
770  nearestDR = dR;
771  ind = i;
772  }
773  }
774 
775  if (ind == -1) {
776  caloJetEm = 0;
777  caloJetHad = 0;
778  } else {
779  const reco::CaloJet& cJet = cJets->at(ind);
780  caloJetEm = cJet.emEnergyInEB() + cJet.emEnergyInEE() + cJet.emEnergyInHF();
781  caloJetHad = cJet.hadEnergyInHB() + cJet.hadEnergyInHE() + cJet.hadEnergyInHF();
782  }
783 }
784 
lt_
bool lt_(std::pair< double, short > a, std::pair< double, short > b)
Definition: OniaPhotonConversionProducer.cc:39
pat::PATIsolatedTrackProducer
Definition: PATIsolatedTrackProducer.cc:44
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
pat::PackedCandidate::hasTrackDetails
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
Definition: PackedCandidate.h:787
pat::PATIsolatedTrackProducer::getIsolation
void getIsolation(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
Definition: PATIsolatedTrackProducer.cc:553
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:29
pat::PATIsolatedTrackProducer::usePrecomputedDeDxPixel_
const bool usePrecomputedDeDxPixel_
Definition: PATIsolatedTrackProducer.cc:91
CaloJet.h
pat::PFIsolation::chargedHadronIso
float chargedHadronIso() const
Definition: PFIsolation.h:28
pat::PATIsolatedTrackProducer::pcRefNearest_DR_
const float pcRefNearest_DR_
Definition: PATIsolatedTrackProducer.cc:102
electrons_cff.bool
bool
Definition: electrons_cff.py:393
mps_fire.i
i
Definition: mps_fire.py:428
pat::PATIsolatedTrackProducer::PATIsolatedTrackProducer
PATIsolatedTrackProducer(const edm::ParameterSet &)
Definition: PATIsolatedTrackProducer.cc:116
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
StandaloneTrackMonitor_cfi.trackQuality
trackQuality
Definition: StandaloneTrackMonitor_cfi.py:11
PFIsolation.h
edm::Association::Filler
Definition: Association.h:78
TrackExtraFwd.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
trajectoryStateTransform::initialFreeState
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:58
pat::PackedCandidate::polarP4
const PolarLorentzVector & polarP4() const override
four-momentum Lorentz vector
Definition: PackedCandidate.h:444
DeDxData.h
pat::PATIsolatedTrackProducer::pfIsolation_DZ_
const float pfIsolation_DZ_
Definition: PATIsolatedTrackProducer.cc:95
ESHandle.h
pat::PATIsolatedTrackProducer::gt2pc_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
Definition: PATIsolatedTrackProducer.cc:81
PFCandidate.h
pat::PackedCandidate::pdgId
int pdgId() const override
PDG identifier.
Definition: PackedCandidate.h:832
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
TrackDetectorAssociator.h
TrackDetMatchInfo::crossedEcalIds
std::vector< DetId > crossedEcalIds
Definition: TrackDetMatchInfo.h:66
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT< pat::PackedCandidateCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackDetectorAssociator::useDefaultPropagator
void useDefaultPropagator()
use the default propagator
Definition: TrackDetectorAssociator.cc:81
pat::PATIsolatedTrackProducer::pflepoverlap_pTmin_
const float pflepoverlap_pTmin_
Definition: PATIsolatedTrackProducer.cc:101
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
pat::PATIsolatedTrackProducer::pT_cut_noIso_
const float pT_cut_noIso_
Definition: PATIsolatedTrackProducer.cc:93
pat::PATIsolatedTrackProducer::pT_cut_
const float pT_cut_
Definition: PATIsolatedTrackProducer.cc:92
pat::PATIsolatedTrackProducer::saveDeDxHitInfo_
const bool saveDeDxHitInfo_
Definition: PATIsolatedTrackProducer.cc:106
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
EDProducer.h
reco::CaloJet::hadEnergyInHF
float hadEnergyInHF() const
Definition: CaloJet.h:105
reco::TrackBase::px
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
HcalChannelQuality
Definition: HcalChannelQuality.h:17
edm::Association::contains
bool contains(ProductID id) const
Definition: Association.h:63
pat::PATIsolatedTrackProducer::PolarLorentzVector
pat::IsolatedTrack::PolarLorentzVector PolarLorentzVector
Definition: PATIsolatedTrackProducer.cc:46
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::CaloJet::hadEnergyInHB
float hadEnergyInHB() const
Definition: CaloJet.h:99
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
pat::PackedCandidate::charge
int charge() const override
electric charge
Definition: PackedCandidate.h:415
edm::Handle< pat::PackedCandidateCollection >
pat::PATIsolatedTrackProducer::pfneutralsum_DR_
const float pfneutralsum_DR_
Definition: PATIsolatedTrackProducer.cc:104
reco::CaloJet::emEnergyInEE
float emEnergyInEE() const
Definition: CaloJet.h:109
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
reco::TrackBase::dxyError
double dxyError() const
error on dxy
Definition: TrackBase.h:769
reco::DeDxHitInfo::charge
float charge(size_t i) const
Definition: DeDxHitInfo.h:42
pat::PackedCandidate::dzError
float dzError() const override
uncertainty on dz
Definition: PackedCandidate.h:760
edm::Ref< TrackCollection >
pat::PATIsolatedTrackProducer::useHighPurity_
const bool useHighPurity_
Definition: PATIsolatedTrackProducer.cc:105
pat::PATIsolatedTrackProducer::absIso_cut_
const float absIso_cut_
Definition: PATIsolatedTrackProducer.cc:96
CandidateFwd.h
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
MakerMacros.h
TrackDetMatchInfo::crossedHcalIds
std::vector< DetId > crossedHcalIds
Definition: TrackDetMatchInfo.h:67
reco::DeDxHitInfo::stripCluster
const SiStripCluster * stripCluster(size_t i) const
Definition: DeDxHitInfo.h:66
reco::HitPattern
Definition: HitPattern.h:147
reco::DeDxHitInfoAss
edm::Association< DeDxHitInfoCollection > DeDxHitInfoAss
Definition: DeDxHitInfo.h:116
reco::DeDxHitInfo::pathlength
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
reco::CaloJet::hadEnergyInHE
float hadEnergyInHE() const
Definition: CaloJet.h:103
Track.h
trackingPlots.hp
hp
Definition: trackingPlots.py:1248
pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_
const bool addPrescaledDeDxTracks_
Definition: PATIsolatedTrackProducer.cc:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
IsolatedTrack.h
spr::deltaEta
static const double deltaEta
Definition: CaloConstants.h:8
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
pat::PATIsolatedTrackProducer::caloJet_DR_
const float caloJet_DR_
Definition: PATIsolatedTrackProducer.cc:99
pat::PATIsolatedTrackProducer::pcRefNearest_pTmin_
const float pcRefNearest_pTmin_
Definition: PATIsolatedTrackProducer.cc:103
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
DeDxTools.h
isotracks_cff.fromPV
fromPV
Definition: isotracks_cff.py:39
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
pat::PackedCandidate::dz
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
Definition: PackedCandidate.h:745
reco::Track
Definition: Track.h:27
edm::ESHandle< HcalChannelQuality >
pat::PATIsolatedTrackProducer::~PATIsolatedTrackProducer
~PATIsolatedTrackProducer() override
Definition: PATIsolatedTrackProducer.cc:172
pat::PATIsolatedTrackProducer::miniRelIso_cut_
const float miniRelIso_cut_
Definition: PATIsolatedTrackProducer.cc:98
reco::CaloJet::emEnergyInEB
float emEnergyInEB() const
Definition: CaloJet.h:107
pat::PATIsolatedTrackProducer::getCaloJetEnergy
void getCaloJetEnergy(const PolarLorentzVector &, const reco::CaloJetCollection *, float &, float &) const
Definition: PATIsolatedTrackProducer.cc:761
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
reco::TrackBase::qualityMask
int qualityMask() const
Definition: TrackBase.h:843
isolatedTracks_cfi.caloJets
caloJets
Definition: isolatedTracks_cfi.py:33
TrackAssociatorParameters::loadParameters
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
Definition: TrackAssociatorParameters.cc:18
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
DeDxTools::shapeSelection
bool shapeSelection(const SiStripCluster &ampls)
Definition: DeDxTools.cc:9
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
pat::PackedCandidate::fromPV
const PVAssoc fromPV(size_t ipv=0) const
Definition: PackedCandidate.h:704
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
reco::DeDxHitInfo
Definition: DeDxHitInfo.h:14
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
pat::PATIsolatedTrackProducer::LorentzVector
pat::IsolatedTrack::LorentzVector LorentzVector
Definition: PATIsolatedTrackProducer.cc:47
pat::PATIsolatedTrackProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PATIsolatedTrackProducer.cc:174
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
pat::PATIsolatedTrackProducer::trackAssociator_
TrackDetectorAssociator trackAssociator_
Definition: PATIsolatedTrackProducer.cc:111
fastTrackerRecHitType::isPixel
bool isPixel(HitType hitType)
Definition: FastTrackerRecHit.h:37
DeDxHitInfo.h
deltaR.h
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EcalChannelStatusRcd
Definition: EcalChannelStatusRcd.h:5
pat::PackedCandidate
Definition: PackedCandidate.h:22
pat::PATIsolatedTrackProducer::pc2pf_
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
Definition: PATIsolatedTrackProducer.cc:83
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
PackedCandidate.h
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
TrackDetectorAssociator
Definition: TrackDetectorAssociator.h:44
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
pat::PATIsolatedTrackProducer::miniIsoParams_
std::vector< double > miniIsoParams_
Definition: PATIsolatedTrackProducer.cc:109
reco::JetExtendedAssociation::getValue
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
Definition: JetExtendedAssociation.cc:50
hltTrackClusterRemoverNew_cfi.doStrip
doStrip
Definition: hltTrackClusterRemoverNew_cfi.py:5
reco::TrackBase::dzError
double dzError() const
error on dz
Definition: TrackBase.h:778
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
reco::DeDxHitInfo::pixelCluster
const SiPixelCluster * pixelCluster(size_t i) const
Definition: DeDxHitInfo.h:46
RefToPtr.h
reco::CaloJetCollection
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
Definition: CaloJetCollection.h:15
p4
double p4[4]
Definition: TauolaWrapper.h:92
edm::stream::EDProducer
Definition: EDProducer.h:38
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
pat::PATIsolatedTrackProducer::getTrackDetMatchInfo
TrackDetMatchInfo getTrackDetMatchInfo(const edm::Event &, const edm::EventSetup &, const reco::Track &)
Definition: PATIsolatedTrackProducer.cc:749
MagneticField.h
pat::PackedCandidate::p4
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
Definition: PackedCandidate.h:438
edm::EventSetup
Definition: EventSetup.h:57
pat::PATIsolatedTrackProducer::pfIsolation_DR_
const float pfIsolation_DR_
Definition: PATIsolatedTrackProducer.cc:94
pat
Definition: HeavyIon.h:7
reco::DeDxHitInfo::size
size_t size() const
Definition: DeDxHitInfo.h:41
hltTrackClusterRemoverNew_cfi.doPixel
doPixel
Definition: hltTrackClusterRemoverNew_cfi.py:6
get
#define get
HcalChannelStatus.h
FSQDQM_cfi.pvs
pvs
Definition: FSQDQM_cfi.py:12
l1t::PFCandidateCollection
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
HcalChannelQualityRcd.h
TrackDetMatchInfo::trkGlobPosAtEcal
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
Definition: TrackDetMatchInfo.h:38
pat::PackedCandidateCollection
std::vector< pat::PackedCandidate > PackedCandidateCollection
Definition: PackedCandidate.h:1130
HcalChannelQuality.h
pat::PATIsolatedTrackProducer::gt2dedxHitInfoPrescale_
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
Definition: PATIsolatedTrackProducer.cc:89
pat::IsolatedTrack
Definition: IsolatedTrack.h:21
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
VertexFwd.h
pat::PATIsolatedTrackProducer::getNearestPCRef
void getNearestPCRef(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
Definition: PATIsolatedTrackProducer.cc:635
pat::PFIsolation
Definition: PFIsolation.h:12
pat::PATIsolatedTrackProducer::relIso_cut_
const float relIso_cut_
Definition: PATIsolatedTrackProducer.cc:97
reco::TrackBase::hitPattern
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
TrackDetMatchInfo
Definition: TrackDetMatchInfo.h:13
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
pat::PackedCandidate::dxy
virtual float dxy() const
dxy with respect to the PV ref
Definition: PackedCandidate.h:740
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
pat::PATIsolatedTrackProducer::caloJets_
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
Definition: PATIsolatedTrackProducer.cc:84
StringCutObjectSelector.h
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
pat::PATIsolatedTrackProducer::gt2dedxHitInfo_
const edm::EDGetTokenT< reco::DeDxHitInfoAss > gt2dedxHitInfo_
Definition: PATIsolatedTrackProducer.cc:87
pat::PATIsolatedTrackProducer::pv_
const edm::EDGetTokenT< reco::VertexCollection > pv_
Definition: PATIsolatedTrackProducer.cc:80
Calorimetry_cff.bField
bField
Definition: Calorimetry_cff.py:292
pat::PATIsolatedTrackProducer::getPFNeutralSum
float getPFNeutralSum(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const
Definition: PATIsolatedTrackProducer.cc:675
PVValHelper::dz
Definition: PVValidationHelpers.h:50
Frameworkfwd.h
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
StringCutObjectSelector< pat::IsolatedTrack >
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
pat::PATIsolatedTrackProducer::lt_
const edm::EDGetTokenT< pat::PackedCandidateCollection > lt_
Definition: PATIsolatedTrackProducer.cc:78
pat::PackedCandidate::dxyError
float dxyError() const override
uncertainty on dxy
Definition: PackedCandidate.h:765
pat::PATIsolatedTrackProducer::gt2dedxStrip_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
Definition: PATIsolatedTrackProducer.cc:85
EventSetup.h
muons2muons_cfi.PFIsolation
PFIsolation
Definition: muons2muons_cfi.py:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
TrajectoryStateTransform.h
Exception.h
pat::PATIsolatedTrackProducer::pc_
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
Definition: PATIsolatedTrackProducer.cc:77
pat::PATIsolatedTrackProducer::trackAssocParameters_
TrackAssociatorParameters trackAssocParameters_
Definition: PATIsolatedTrackProducer.cc:112
pat::PATIsolatedTrackProducer::usePrecomputedDeDxStrip_
const bool usePrecomputedDeDxStrip_
Definition: PATIsolatedTrackProducer.cc:90
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
isolatedTracks_cfi.generalTracks
generalTracks
Definition: isolatedTracks_cfi.py:31
mps_fire.result
result
Definition: mps_fire.py:311
cms::Exception
Definition: Exception.h:70
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
pat::PATIsolatedTrackProducer::gt2lt_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
Definition: PATIsolatedTrackProducer.cc:82
View.h
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
ParameterSet.h
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
pat::PATIsolatedTrackProducer::gt_
const edm::EDGetTokenT< reco::TrackCollection > gt_
Definition: PATIsolatedTrackProducer.cc:79
pat::PATIsolatedTrackProducer::saveDeDxHitInfoCut_
StringCutObjectSelector< pat::IsolatedTrack > saveDeDxHitInfoCut_
Definition: PATIsolatedTrackProducer.cc:107
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:608
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:29
EcalChannelStatus.h
TrackAssociatorParameters.h
reco::TrackBase::quality
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:552
reco::CaloJet::emEnergyInHF
float emEnergyInHF() const
Definition: CaloJet.h:111
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
pat::PATIsolatedTrackProducer::getPFLeptonOverlap
bool getPFLeptonOverlap(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc) const
Definition: PATIsolatedTrackProducer.cc:601
reco::Vertex
Definition: Vertex.h:35
EcalChannelStatusRcd.h
pat::PATIsolatedTrackProducer::pflepoverlap_DR_
const float pflepoverlap_DR_
Definition: PATIsolatedTrackProducer.cc:100
pat::PATIsolatedTrackProducer::getDeDx
float getDeDx(const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const
Definition: PATIsolatedTrackProducer.cc:703
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
TrackAssociatorParameters
Definition: TrackAssociatorParameters.h:43
pat::PATIsolatedTrackProducer::gt2dedxPixel_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
Definition: PATIsolatedTrackProducer.cc:86
pat::PackedCandidateRef
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
Definition: PackedCandidate.h:1131