CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
pat::PATIsolatedTrackProducer Class Reference
Inheritance diagram for pat::PATIsolatedTrackProducer:
edm::stream::EDProducer<>

Public Types

typedef pat::IsolatedTrack::LorentzVector LorentzVector
 
typedef pat::IsolatedTrack::PolarLorentzVector PolarLorentzVector
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

void getCaloJetEnergy (const PolarLorentzVector &, const reco::CaloJetCollection *, float &, float &) const
 
float getDeDx (const reco::DeDxHitInfo *hitInfo, bool doPixel, bool doStrip) const
 
void getIsolation (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, pat::PFIsolation &iso, pat::PFIsolation &miniiso) const
 
void getNearestPCRef (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
 
bool getPFLeptonOverlap (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc) const
 
float getPFNeutralSum (const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx) const
 
TrackDetMatchInfo getTrackDetMatchInfo (const edm::Event &, const edm::EventSetup &, const reco::Track &)
 
 PATIsolatedTrackProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PATIsolatedTrackProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

const float absIso_cut_
 
const bool addPrescaledDeDxTracks_
 
const float caloJet_DR_
 
const edm::EDGetTokenT< reco::CaloJetCollectioncaloJets_
 
const edm::EDGetTokenT< reco::DeDxHitInfoAssgt2dedxHitInfo_
 
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
 
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxPixel_
 
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
 
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
 
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
 
const edm::EDGetTokenT< reco::TrackCollectiongt_
 
const edm::EDGetTokenT< pat::PackedCandidateCollectionlt_
 
std::vector< double > miniIsoParams_
 
const float miniRelIso_cut_
 
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > pc2pf_
 
const edm::EDGetTokenT< pat::PackedCandidateCollectionpc_
 
const float pcRefNearest_DR_
 
const float pcRefNearest_pTmin_
 
const float pfIsolation_DR_
 
const float pfIsolation_DZ_
 
const float pflepoverlap_DR_
 
const float pflepoverlap_pTmin_
 
const float pfneutralsum_DR_
 
const float pT_cut_
 
const float pT_cut_noIso_
 
const edm::EDGetTokenT< reco::VertexCollectionpv_
 
const float relIso_cut_
 
const bool saveDeDxHitInfo_
 
StringCutObjectSelector< pat::IsolatedTracksaveDeDxHitInfoCut_
 
TrackDetectorAssociator trackAssociator_
 
TrackAssociatorParameters trackAssocParameters_
 
const bool useHighPurity_
 
const bool usePrecomputedDeDxPixel_
 
const bool usePrecomputedDeDxStrip_
 

Detailed Description

Definition at line 44 of file PATIsolatedTrackProducer.cc.

Member Typedef Documentation

◆ LorentzVector

Definition at line 47 of file PATIsolatedTrackProducer.cc.

◆ PolarLorentzVector

Definition at line 46 of file PATIsolatedTrackProducer.cc.

Constructor & Destructor Documentation

◆ PATIsolatedTrackProducer()

pat::PATIsolatedTrackProducer::PATIsolatedTrackProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 116 of file PATIsolatedTrackProducer.cc.

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"))),
122  iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
124  iConfig.getParameter<edm::InputTag>("lostTracks"))),
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")),
133  iConfig.getParameter<edm::InputTag>("dEdxHitInfoPrescale"))
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 }

References edm::ParameterSet::getParameter(), TrackAssociatorParameters::loadParameters(), miniIsoParams_, saveDeDxHitInfo_, trackAssociator_, trackAssocParameters_, and TrackDetectorAssociator::useDefaultPropagator().

◆ ~PATIsolatedTrackProducer()

pat::PATIsolatedTrackProducer::~PATIsolatedTrackProducer ( )
override

Definition at line 172 of file PATIsolatedTrackProducer.cc.

172 {}

Member Function Documentation

◆ getCaloJetEnergy()

void pat::PATIsolatedTrackProducer::getCaloJetEnergy ( const PolarLorentzVector p4,
const reco::CaloJetCollection cJets,
float &  caloJetEm,
float &  caloJetHad 
) const

Definition at line 761 of file PATIsolatedTrackProducer.cc.

764  {
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 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, HGC3DClusterGenMatchSelector_cfi::dR, reco::CaloJet::emEnergyInEB(), reco::CaloJet::emEnergyInEE(), reco::CaloJet::emEnergyInHF(), reco::CaloJet::hadEnergyInHB(), reco::CaloJet::hadEnergyInHE(), reco::CaloJet::hadEnergyInHF(), mps_fire::i, and p4.

◆ getDeDx()

float pat::PATIsolatedTrackProducer::getDeDx ( const reco::DeDxHitInfo hitInfo,
bool  doPixel,
bool  doStrip 
) const

Definition at line 703 of file PATIsolatedTrackProducer.cc.

703  {
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 }

References reco::DeDxHitInfo::charge(), hltTrackClusterRemoverNew_cfi::doPixel, hltTrackClusterRemoverNew_cfi::doStrip, mps_fire::i, fastTrackerRecHitType::isPixel(), reco::DeDxHitInfo::pathlength(), reco::DeDxHitInfo::pixelCluster(), funct::pow(), mps_fire::result, DeDxTools::shapeSelection(), reco::DeDxHitInfo::size(), findQualityFiles::size, and reco::DeDxHitInfo::stripCluster().

◆ getIsolation()

void pat::PATIsolatedTrackProducer::getIsolation ( const PolarLorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx,
pat::PFIsolation iso,
pat::PFIsolation miniiso 
) const

Definition at line 553 of file PATIsolatedTrackProducer.cc.

557  {
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 }

References funct::abs(), PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, isotracks_cff::fromPV, SiStripPI::max, min(), p4, muons2muons_cfi::PFIsolation, and DiDispStaMuonMonitor_cfi::pt.

◆ getNearestPCRef()

void pat::PATIsolatedTrackProducer::getNearestPCRef ( const PolarLorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx,
int &  pc_ref_idx 
) const

Definition at line 635 of file PATIsolatedTrackProducer.cc.

638  {
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 }

References funct::abs(), ALCARECOTkAlJpsiMuMu_cff::charge, PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, isotracks_cff::fromPV, createfilelist::int, p4, and DiDispStaMuonMonitor_cfi::pt.

◆ getPFLeptonOverlap()

bool pat::PATIsolatedTrackProducer::getPFLeptonOverlap ( const PolarLorentzVector p4,
const pat::PackedCandidateCollection pc 
) const

Definition at line 601 of file PATIsolatedTrackProducer.cc.

602  {
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 }

References funct::abs(), ALCARECOTkAlJpsiMuMu_cff::charge, PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, isotracks_cff::fromPV, triggerObjects_cff::id, p4, packedPFCandidateRefMixer_cfi::pf, and DiDispStaMuonMonitor_cfi::pt.

◆ getPFNeutralSum()

float pat::PATIsolatedTrackProducer::getPFNeutralSum ( const PolarLorentzVector p4,
const pat::PackedCandidateCollection pc,
int  pc_idx 
) const

Definition at line 675 of file PATIsolatedTrackProducer.cc.

677  {
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 }

References funct::abs(), PbPb_ZMuSkimMuonDPG_cff::deltaR, flavorHistoryFilter_cfi::dr, p4, and DiDispStaMuonMonitor_cfi::pt.

◆ getTrackDetMatchInfo()

TrackDetMatchInfo pat::PATIsolatedTrackProducer::getTrackDetMatchInfo ( const edm::Event iEvent,
const edm::EventSetup iSetup,
const reco::Track track 
)

Definition at line 749 of file PATIsolatedTrackProducer.cc.

751  {
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 }

References Calorimetry_cff::bField, edm::EventSetup::get(), get, iEvent, trajectoryStateTransform::initialFreeState(), and HLT_FULL_cff::track.

◆ produce()

void pat::PATIsolatedTrackProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 174 of file PATIsolatedTrackProducer.cc.

174  {
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;
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;
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 }

References isolatedTracks_cfi::caloJets, ALCARECOTkAlJpsiMuMu_cff::charge, reco::TrackBase::charge(), pat::PackedCandidate::charge(), pat::PFIsolation::chargedHadronIso(), edm::Association< C >::contains(), TrackDetMatchInfo::crossedEcalIds, TrackDetMatchInfo::crossedHcalIds, spr::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, PVValHelper::dxy, reco::TrackBase::dxy(), pat::PackedCandidate::dxy(), reco::TrackBase::dxyError(), pat::PackedCandidate::dxyError(), PVValHelper::dz, reco::TrackBase::dz(), pat::PackedCandidate::dz(), reco::TrackBase::dzError(), pat::PackedCandidate::dzError(), reco::TrackBase::eta(), trigObjTnPSource_cfi::filler, EcalCondObjectContainer< T >::find(), isotracks_cff::fromPV, pat::PackedCandidate::fromPV(), isolatedTracks_cfi::generalTracks, edm::EventSetup::get(), get, edm::Ref< C, T, F >::get(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), pat::PackedCandidate::hasTrackDetails(), reco::TrackBase::hitPattern(), trackingPlots::hp, edm::HandleBase::id(), edm::Ref< C, T, F >::id(), iEvent, createfilelist::int, edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), edm::Ref< C, T, F >::key(), lt_(), visualization-live-secondInstance_cfg::m, eostools::move(), reco::TrackBase::p(), p4, pat::PackedCandidate::p4(), EgammaValidation_cff::pdgId, pat::PackedCandidate::pdgId(), reco::TrackBase::phi(), pat::PackedCandidate::polarP4(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), reco::TrackBase::pt(), MetAnalyzer::pv(), FSQDQM_cfi::pvs, reco::TrackBase::px(), reco::TrackBase::py(), reco::TrackBase::pz(), reco::TrackBase::quality(), reco::TrackBase::qualityByName(), reco::TrackBase::qualityMask(), mathSSE::sqrt(), StandaloneTrackMonitor_cfi::trackQuality, and TrackDetMatchInfo::trkGlobPosAtEcal.

Member Data Documentation

◆ absIso_cut_

const float pat::PATIsolatedTrackProducer::absIso_cut_
private

Definition at line 96 of file PATIsolatedTrackProducer.cc.

◆ addPrescaledDeDxTracks_

const bool pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_
private

Definition at line 88 of file PATIsolatedTrackProducer.cc.

◆ caloJet_DR_

const float pat::PATIsolatedTrackProducer::caloJet_DR_
private

Definition at line 99 of file PATIsolatedTrackProducer.cc.

◆ caloJets_

const edm::EDGetTokenT<reco::CaloJetCollection> pat::PATIsolatedTrackProducer::caloJets_
private

Definition at line 84 of file PATIsolatedTrackProducer.cc.

◆ gt2dedxHitInfo_

const edm::EDGetTokenT<reco::DeDxHitInfoAss> pat::PATIsolatedTrackProducer::gt2dedxHitInfo_
private

Definition at line 87 of file PATIsolatedTrackProducer.cc.

◆ gt2dedxHitInfoPrescale_

const edm::EDGetTokenT<edm::ValueMap<int> > pat::PATIsolatedTrackProducer::gt2dedxHitInfoPrescale_
private

Definition at line 89 of file PATIsolatedTrackProducer.cc.

◆ gt2dedxPixel_

const edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > pat::PATIsolatedTrackProducer::gt2dedxPixel_
private

Definition at line 86 of file PATIsolatedTrackProducer.cc.

◆ gt2dedxStrip_

const edm::EDGetTokenT<edm::ValueMap<reco::DeDxData> > pat::PATIsolatedTrackProducer::gt2dedxStrip_
private

Definition at line 85 of file PATIsolatedTrackProducer.cc.

◆ gt2lt_

const edm::EDGetTokenT<edm::Association<pat::PackedCandidateCollection> > pat::PATIsolatedTrackProducer::gt2lt_
private

Definition at line 82 of file PATIsolatedTrackProducer.cc.

◆ gt2pc_

const edm::EDGetTokenT<edm::Association<pat::PackedCandidateCollection> > pat::PATIsolatedTrackProducer::gt2pc_
private

Definition at line 81 of file PATIsolatedTrackProducer.cc.

◆ gt_

const edm::EDGetTokenT<reco::TrackCollection> pat::PATIsolatedTrackProducer::gt_
private

Definition at line 79 of file PATIsolatedTrackProducer.cc.

◆ lt_

const edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATIsolatedTrackProducer::lt_
private

Definition at line 78 of file PATIsolatedTrackProducer.cc.

◆ miniIsoParams_

std::vector<double> pat::PATIsolatedTrackProducer::miniIsoParams_
private

Definition at line 109 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ miniRelIso_cut_

const float pat::PATIsolatedTrackProducer::miniRelIso_cut_
private

Definition at line 98 of file PATIsolatedTrackProducer.cc.

◆ pc2pf_

const edm::EDGetTokenT<edm::Association<reco::PFCandidateCollection> > pat::PATIsolatedTrackProducer::pc2pf_
private

Definition at line 83 of file PATIsolatedTrackProducer.cc.

◆ pc_

const edm::EDGetTokenT<pat::PackedCandidateCollection> pat::PATIsolatedTrackProducer::pc_
private

Definition at line 77 of file PATIsolatedTrackProducer.cc.

◆ pcRefNearest_DR_

const float pat::PATIsolatedTrackProducer::pcRefNearest_DR_
private

Definition at line 102 of file PATIsolatedTrackProducer.cc.

◆ pcRefNearest_pTmin_

const float pat::PATIsolatedTrackProducer::pcRefNearest_pTmin_
private

Definition at line 103 of file PATIsolatedTrackProducer.cc.

◆ pfIsolation_DR_

const float pat::PATIsolatedTrackProducer::pfIsolation_DR_
private

Definition at line 94 of file PATIsolatedTrackProducer.cc.

◆ pfIsolation_DZ_

const float pat::PATIsolatedTrackProducer::pfIsolation_DZ_
private

Definition at line 95 of file PATIsolatedTrackProducer.cc.

◆ pflepoverlap_DR_

const float pat::PATIsolatedTrackProducer::pflepoverlap_DR_
private

Definition at line 100 of file PATIsolatedTrackProducer.cc.

◆ pflepoverlap_pTmin_

const float pat::PATIsolatedTrackProducer::pflepoverlap_pTmin_
private

Definition at line 101 of file PATIsolatedTrackProducer.cc.

◆ pfneutralsum_DR_

const float pat::PATIsolatedTrackProducer::pfneutralsum_DR_
private

Definition at line 104 of file PATIsolatedTrackProducer.cc.

◆ pT_cut_

const float pat::PATIsolatedTrackProducer::pT_cut_
private

Definition at line 92 of file PATIsolatedTrackProducer.cc.

◆ pT_cut_noIso_

const float pat::PATIsolatedTrackProducer::pT_cut_noIso_
private

Definition at line 93 of file PATIsolatedTrackProducer.cc.

◆ pv_

const edm::EDGetTokenT<reco::VertexCollection> pat::PATIsolatedTrackProducer::pv_
private

Definition at line 80 of file PATIsolatedTrackProducer.cc.

◆ relIso_cut_

const float pat::PATIsolatedTrackProducer::relIso_cut_
private

Definition at line 97 of file PATIsolatedTrackProducer.cc.

◆ saveDeDxHitInfo_

const bool pat::PATIsolatedTrackProducer::saveDeDxHitInfo_
private

Definition at line 106 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ saveDeDxHitInfoCut_

StringCutObjectSelector<pat::IsolatedTrack> pat::PATIsolatedTrackProducer::saveDeDxHitInfoCut_
private

Definition at line 107 of file PATIsolatedTrackProducer.cc.

◆ trackAssociator_

TrackDetectorAssociator pat::PATIsolatedTrackProducer::trackAssociator_
private

Definition at line 111 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ trackAssocParameters_

TrackAssociatorParameters pat::PATIsolatedTrackProducer::trackAssocParameters_
private

Definition at line 112 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ useHighPurity_

const bool pat::PATIsolatedTrackProducer::useHighPurity_
private

Definition at line 105 of file PATIsolatedTrackProducer.cc.

◆ usePrecomputedDeDxPixel_

const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxPixel_
private

Definition at line 91 of file PATIsolatedTrackProducer.cc.

◆ usePrecomputedDeDxStrip_

const bool pat::PATIsolatedTrackProducer::usePrecomputedDeDxStrip_
private

Definition at line 90 of file PATIsolatedTrackProducer.cc.

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:788
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:30
pat::PATIsolatedTrackProducer::usePrecomputedDeDxPixel_
const bool usePrecomputedDeDxPixel_
Definition: PATIsolatedTrackProducer.cc:91
pat::PFIsolation::chargedHadronIso
float chargedHadronIso() const
Definition: PFIsolation.h:28
pat::PATIsolatedTrackProducer::pcRefNearest_DR_
const float pcRefNearest_DR_
Definition: PATIsolatedTrackProducer.cc:102
mps_fire.i
i
Definition: mps_fire.py:428
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
StandaloneTrackMonitor_cfi.trackQuality
trackQuality
Definition: StandaloneTrackMonitor_cfi.py:11
edm::Association::Filler
Definition: Association.h:78
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
pat::PATIsolatedTrackProducer::pfIsolation_DZ_
const float pfIsolation_DZ_
Definition: PATIsolatedTrackProducer.cc:95
pat::PATIsolatedTrackProducer::gt2pc_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2pc_
Definition: PATIsolatedTrackProducer.cc:81
pat::PackedCandidate::pdgId
int pdgId() const override
PDG identifier.
Definition: PackedCandidate.h:833
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
TrackDetMatchInfo::crossedEcalIds
std::vector< DetId > crossedEcalIds
Definition: TrackDetMatchInfo.h:66
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT
Definition: EDGetToken.h:33
TrackDetectorAssociator::useDefaultPropagator
void useDefaultPropagator()
use the default propagator
Definition: TrackDetectorAssociator.cc:81
pat::PATIsolatedTrackProducer::pflepoverlap_pTmin_
const float pflepoverlap_pTmin_
Definition: PATIsolatedTrackProducer.cc:101
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
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
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::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:761
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
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
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::DeDxHitInfo::pathlength
float pathlength(size_t i) const
Definition: DeDxHitInfo.h:43
reco::CaloJet::hadEnergyInHE
float hadEnergyInHE() const
Definition: CaloJet.h:103
trackingPlots.hp
hp
Definition: trackingPlots.py:1230
pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_
const bool addPrescaledDeDxTracks_
Definition: PATIsolatedTrackProducer.cc:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
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
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:746
reco::Track
Definition: Track.h:27
edm::ESHandle< MagneticField >
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:12
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:705
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::DeDxHitInfo
Definition: DeDxHitInfo.h:14
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::ParameterSet
Definition: ParameterSet.h:47
pat::PATIsolatedTrackProducer::trackAssociator_
TrackDetectorAssociator trackAssociator_
Definition: PATIsolatedTrackProducer.cc:111
fastTrackerRecHitType::isPixel
bool isPixel(HitType hitType)
Definition: FastTrackerRecHit.h:37
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
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
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
p4
double p4[4]
Definition: TauolaWrapper.h:92
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
pat::PackedCandidate::p4
const LorentzVector & p4() const override
four-momentum Lorentz vecto r
Definition: PackedCandidate.h:438
edm::Association
Definition: Association.h:18
pat::PATIsolatedTrackProducer::pfIsolation_DR_
const float pfIsolation_DR_
Definition: PATIsolatedTrackProducer.cc:94
reco::DeDxHitInfo::size
size_t size() const
Definition: DeDxHitInfo.h:41
hltTrackClusterRemoverNew_cfi.doPixel
doPixel
Definition: hltTrackClusterRemoverNew_cfi.py:6
get
#define get
FSQDQM_cfi.pvs
pvs
Definition: FSQDQM_cfi.py:12
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:1131
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
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:741
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::PATIsolatedTrackProducer::caloJets_
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
Definition: PATIsolatedTrackProducer.cc:84
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
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:284
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:51
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
edm::ValueMap
Definition: ValueMap.h:107
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:766
pat::PATIsolatedTrackProducer::gt2dedxStrip_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
Definition: PATIsolatedTrackProducer.cc:85
muons2muons_cfi.PFIsolation
PFIsolation
Definition: muons2muons_cfi.py:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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
TrackDetectorAssociator::associate
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
Definition: TrackDetectorAssociator.cc:110
pat::PATIsolatedTrackProducer::gt2lt_
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > gt2lt_
Definition: PATIsolatedTrackProducer.cc:82
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
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
reco::TrackBase::quality
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:552
edm::InputTag
Definition: InputTag.h:15
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
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
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:1132