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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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 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 115 of file PATIsolatedTrackProducer.cc.

116  : pc_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
117  lt_(consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("lostTracks"))),
118  gt_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("generalTracks"))),
119  pv_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("primaryVertices"))),
121  iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
123  iConfig.getParameter<edm::InputTag>("lostTracks"))),
125  iConfig.getParameter<edm::InputTag>("packedPFCandidates"))),
126  caloJets_(consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("caloJets"))),
127  gt2dedxStrip_(consumes<edm::ValueMap<reco::DeDxData>>(iConfig.getParameter<edm::InputTag>("dEdxDataStrip"))),
128  gt2dedxPixel_(consumes<edm::ValueMap<reco::DeDxData>>(iConfig.getParameter<edm::InputTag>("dEdxDataPixel"))),
129  gt2dedxHitInfo_(consumes<reco::DeDxHitInfoAss>(iConfig.getParameter<edm::InputTag>("dEdxHitInfo"))),
130  addPrescaledDeDxTracks_(iConfig.getParameter<bool>("addPrescaledDeDxTracks")),
132  iConfig.getParameter<edm::InputTag>("dEdxHitInfoPrescale"))
134  usePrecomputedDeDxStrip_(iConfig.getParameter<bool>("usePrecomputedDeDxStrip")),
135  usePrecomputedDeDxPixel_(iConfig.getParameter<bool>("usePrecomputedDeDxPixel")),
136  pT_cut_(iConfig.getParameter<double>("pT_cut")),
137  pT_cut_noIso_(iConfig.getParameter<double>("pT_cut_noIso")),
138  pfIsolation_DR_(iConfig.getParameter<double>("pfIsolation_DR")),
139  pfIsolation_DZ_(iConfig.getParameter<double>("pfIsolation_DZ")),
140  absIso_cut_(iConfig.getParameter<double>("absIso_cut")),
141  relIso_cut_(iConfig.getParameter<double>("relIso_cut")),
142  miniRelIso_cut_(iConfig.getParameter<double>("miniRelIso_cut")),
143  caloJet_DR_(iConfig.getParameter<double>("caloJet_DR")),
144  pflepoverlap_DR_(iConfig.getParameter<double>("pflepoverlap_DR")),
145  pflepoverlap_pTmin_(iConfig.getParameter<double>("pflepoverlap_pTmin")),
146  pcRefNearest_DR_(iConfig.getParameter<double>("pcRefNearest_DR")),
147  pcRefNearest_pTmin_(iConfig.getParameter<double>("pcRefNearest_pTmin")),
148  pfneutralsum_DR_(iConfig.getParameter<double>("pfneutralsum_DR")),
149  saveDeDxHitInfo_(iConfig.getParameter<bool>("saveDeDxHitInfo")),
150  saveDeDxHitInfoCut_(iConfig.getParameter<std::string>("saveDeDxHitInfoCut")) {
151  // TrackAssociator parameters
152  edm::ParameterSet parameters = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
153  edm::ConsumesCollector iC = consumesCollector();
155 
157 
158  miniIsoParams_ = iConfig.getParameter<std::vector<double>>("miniIsoParams");
159  if (miniIsoParams_.size() != 3)
160  throw cms::Exception("ParameterError") << "miniIsoParams must have exactly 3 elements.\n";
161 
162  produces<pat::IsolatedTrackCollection>();
163 
164  if (saveDeDxHitInfo_) {
165  produces<reco::DeDxHitInfoCollection>();
166  produces<reco::DeDxHitInfoAss>();
167  }
168 }

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

◆ ~PATIsolatedTrackProducer()

pat::PATIsolatedTrackProducer::~PATIsolatedTrackProducer ( )
override

Definition at line 170 of file PATIsolatedTrackProducer.cc.

170 {}

Member Function Documentation

◆ getCaloJetEnergy()

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

Definition at line 756 of file PATIsolatedTrackProducer.cc.

759  {
760  float nearestDR = 999;
761  int ind = -1;
762  for (unsigned int i = 0; i < cJets->size(); i++) {
763  float dR = deltaR(cJets->at(i), p4);
764  if (dR < caloJet_DR_ && dR < nearestDR) {
765  nearestDR = dR;
766  ind = i;
767  }
768  }
769 
770  if (ind == -1) {
771  caloJetEm = 0;
772  caloJetHad = 0;
773  } else {
774  const reco::CaloJet& cJet = cJets->at(ind);
775  caloJetEm = cJet.emEnergyInEB() + cJet.emEnergyInEE() + cJet.emEnergyInHF();
776  caloJetHad = cJet.hadEnergyInHB() + cJet.hadEnergyInHE() + cJet.hadEnergyInHF();
777  }
778 }

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 698 of file PATIsolatedTrackProducer.cc.

698  {
699  if (hitInfo == nullptr) {
700  return -1;
701  }
702 
703  std::vector<float> charge_vec;
704  for (unsigned int ih = 0; ih < hitInfo->size(); ih++) {
705  bool isPixel = (hitInfo->pixelCluster(ih) != nullptr);
706  bool isStrip = (hitInfo->stripCluster(ih) != nullptr);
707 
708  if (isPixel && !doPixel)
709  continue;
710  if (isStrip && !doStrip)
711  continue;
712 
713  // probably shouldn't happen
714  if (!isPixel && !isStrip)
715  continue;
716 
717  // shape selection for strips
718  if (isStrip && !DeDxTools::shapeSelection(*(hitInfo->stripCluster(ih))))
719  continue;
720 
721  float Norm = 0;
722  if (isPixel)
723  Norm = 3.61e-06; //compute the normalization factor to get the energy in MeV/mm
724  if (isStrip)
725  Norm = 3.61e-06 * 265;
726 
727  //save the dE/dx in MeV/mm to a vector.
728  charge_vec.push_back(Norm * hitInfo->charge(ih) / hitInfo->pathlength(ih));
729  }
730 
731  int size = charge_vec.size();
732  float result = 0.0;
733 
734  //build the harmonic 2 dE/dx estimator
735  float expo = -2;
736  for (int i = 0; i < size; i++) {
737  result += pow(charge_vec[i], expo);
738  }
739  result = (size > 0) ? pow(result / size, 1. / expo) : 0.0;
740 
741  return result;
742 }

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 548 of file PATIsolatedTrackProducer.cc.

552  {
553  float chiso = 0, nhiso = 0, phiso = 0, puiso = 0; // standard isolation
554  float chmiso = 0, nhmiso = 0, phmiso = 0, pumiso = 0; // mini isolation
555  float miniDR = std::max(miniIsoParams_[0], std::min(miniIsoParams_[1], miniIsoParams_[2] / p4.pt()));
556  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
557  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
558  continue;
559  int id = std::abs(pf_it->pdgId());
560  bool fromPV = (pf_it->fromPV() > 1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
561  float pt = pf_it->p4().pt();
562  float dr = deltaR(p4, *pf_it);
563 
564  if (dr < pfIsolation_DR_) {
565  // charged cands from PV get added to trackIso
566  if (id == 211 && fromPV)
567  chiso += pt;
568  // charged cands not from PV get added to pileup iso
569  else if (id == 211)
570  puiso += pt;
571  // neutral hadron iso
572  if (id == 130)
573  nhiso += pt;
574  // photon iso
575  if (id == 22)
576  phiso += pt;
577  }
578  // same for mini isolation
579  if (dr < miniDR) {
580  if (id == 211 && fromPV)
581  chmiso += pt;
582  else if (id == 211)
583  pumiso += pt;
584  if (id == 130)
585  nhmiso += pt;
586  if (id == 22)
587  phmiso += pt;
588  }
589  }
590 
591  iso = pat::PFIsolation(chiso, nhiso, phiso, puiso);
592  miniiso = pat::PFIsolation(chmiso, nhmiso, phmiso, pumiso);
593 }

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 630 of file PATIsolatedTrackProducer.cc.

633  {
634  float dr_min = pcRefNearest_DR_;
635  float dr_min_pu = pcRefNearest_DR_;
636  int pc_ref_idx_pu = -1;
637  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
638  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
639  continue;
640  int charge = std::abs(pf_it->charge());
641  bool fromPV = (pf_it->fromPV() > 1 || fabs(pf_it->dz()) < pfIsolation_DZ_);
642  float pt = pf_it->p4().pt();
643  float dr = deltaR(p4, *pf_it);
644  if (charge == 0) // exclude neutral candidates
645  continue;
646  if (pt < pcRefNearest_pTmin_) // exclude candidates w/ pT below threshold
647  continue;
648  if (dr > dr_min && dr > dr_min_pu) // exclude too far candidates
649  continue;
650 
651  if (fromPV) { // Priority to candidates from PV
652  if (dr < dr_min) {
653  dr_min = dr;
654  pc_ref_idx = int(pf_it - pc->begin());
655  }
656  } else { // Otherwise, store candidate from non-PV if no candidate from PV found
657  if (dr < dr_min_pu) {
658  dr_min_pu = dr;
659  pc_ref_idx_pu = int(pf_it - pc->begin());
660  }
661  }
662  }
663 
664  if (pc_ref_idx == -1 &&
665  pc_ref_idx_pu != -1) // If no candidate from PV was found, store candidate from non-PV (if found)
666  pc_ref_idx = pc_ref_idx_pu;
667 }

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 596 of file PATIsolatedTrackProducer.cc.

597  {
598  bool isOverlap = false;
599  float dr_min = pflepoverlap_DR_;
600  int id_drmin = 0;
601  for (const auto& pf : *pc) {
602  int id = std::abs(pf.pdgId());
603  int charge = std::abs(pf.charge());
604  bool fromPV = (pf.fromPV() > 1 || std::abs(pf.dz()) < pfIsolation_DZ_);
605  float pt = pf.pt();
606  if (charge == 0) // exclude neutral candidates
607  continue;
608  if (!(fromPV)) // exclude candidates not from PV
609  continue;
610  if (pt < pflepoverlap_pTmin_) // exclude pf candidates w/ pT below threshold
611  continue;
612 
613  float dr = deltaR(p4, pf);
614  if (dr > pflepoverlap_DR_) // exclude pf candidates far from isolated track
615  continue;
616 
617  if (dr < dr_min) {
618  dr_min = dr;
619  id_drmin = id;
620  }
621  }
622 
623  if (dr_min < pflepoverlap_DR_ && (id_drmin == 11 || id_drmin == 13))
624  isOverlap = true;
625 
626  return isOverlap;
627 }

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 670 of file PATIsolatedTrackProducer.cc.

672  {
673  float nsum = 0;
674  float nhsum = 0, phsum = 0;
675  for (pat::PackedCandidateCollection::const_iterator pf_it = pc->begin(); pf_it != pc->end(); pf_it++) {
676  if (int(pf_it - pc->begin()) == pc_idx) //don't count itself
677  continue;
678  int id = std::abs(pf_it->pdgId());
679  float pt = pf_it->p4().pt();
680  float dr = deltaR(p4, *pf_it);
681 
682  if (dr < pfneutralsum_DR_) {
683  // neutral hadron sum
684  if (id == 130)
685  nhsum += pt;
686  // photon iso
687  if (id == 22)
688  phsum += pt;
689  }
690  }
691 
692  nsum = nhsum + phsum;
693 
694  return nsum;
695 }

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 744 of file PATIsolatedTrackProducer.cc.

746  {
750 
751  // can't use the associate() using reco::Track directly, since
752  // track->extra() is non-null but segfaults when trying to use it
753  return trackAssociator_.associate(iEvent, iSetup, trackAssocParameters_, &initialState);
754 }

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

◆ produce()

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

Definition at line 172 of file PATIsolatedTrackProducer.cc.

172  {
173  // packedPFCandidate collection
175  iEvent.getByToken(pc_, pc_h);
176  const pat::PackedCandidateCollection* pc = pc_h.product();
177 
178  // lostTracks collection
180  iEvent.getByToken(lt_, lt_h);
181  const pat::PackedCandidateCollection* lt = lt_h.product();
182 
183  // generalTracks collection
185  iEvent.getByToken(gt_, gt_h);
187 
188  // get the primary vertex
190  iEvent.getByToken(pv_, pvs);
191  const reco::Vertex& pv = (*pvs)[0];
192 
193  // generalTracks-->packedPFCandidate association
195  iEvent.getByToken(gt2pc_, gt2pc);
196 
197  // generalTracks-->lostTracks association
199  iEvent.getByToken(gt2lt_, gt2lt);
200 
201  // packedPFCandidates-->particleFlow(reco::PFCandidate) association
203  iEvent.getByToken(pc2pf_, pc2pf);
204 
206  iEvent.getByToken(caloJets_, caloJets);
207 
208  // associate generalTracks with their DeDx data (estimator for strip dE/dx)
210  iEvent.getByToken(gt2dedxStrip_, gt2dedxStrip);
211 
212  // associate generalTracks with their DeDx data (estimator for pixel dE/dx)
214  iEvent.getByToken(gt2dedxPixel_, gt2dedxPixel);
215 
216  // associate generalTracks with their DeDx hit info (used to estimate pixel dE/dx)
217  edm::Handle<reco::DeDxHitInfoAss> gt2dedxHitInfo;
218  iEvent.getByToken(gt2dedxHitInfo_, gt2dedxHitInfo);
219  edm::Handle<edm::ValueMap<int>> gt2dedxHitInfoPrescale;
221  iEvent.getByToken(gt2dedxHitInfoPrescale_, gt2dedxHitInfoPrescale);
222  }
223 
225  iSetup.get<HcalChannelQualityRcd>().get("withTopo", hcalQ_h);
226  const HcalChannelQuality* hcalQ = hcalQ_h.product();
227 
229  iSetup.get<EcalChannelStatusRcd>().get(ecalS_h);
230  const EcalChannelStatus* ecalS = ecalS_h.product();
231 
232  auto outDeDxC = std::make_unique<reco::DeDxHitInfoCollection>();
233  std::vector<int> dEdXass;
234 
235  auto outPtrP = std::make_unique<std::vector<pat::IsolatedTrack>>();
236 
237  //add general tracks
238  for (unsigned int igt = 0; igt < generalTracks->size(); igt++) {
239  const reco::Track& gentk = (*gt_h)[igt];
240  reco::TrackRef tkref = reco::TrackRef(gt_h, igt);
241  pat::PackedCandidateRef pcref = (*gt2pc)[tkref];
242  pat::PackedCandidateRef ltref = (*gt2lt)[tkref];
243  const pat::PackedCandidate* pfCand = pcref.get();
244  const pat::PackedCandidate* lostTrack = ltref.get();
245 
246  // Determine if this general track is associated with anything in packedPFCandidates or lostTracks
247  // Sometimes, a track gets associated w/ a neutral pfCand.
248  // In this case, ignore the pfCand and take from lostTracks
249  bool isInPackedCands = (pcref.isNonnull() && pcref.id() == pc_h.id() && pfCand->charge() != 0);
250  bool isInLostTracks = (ltref.isNonnull() && ltref.id() == lt_h.id());
251 
252  PolarLorentzVector polarP4;
254  pat::PackedCandidateRef refToCand;
255  int pdgId, charge, fromPV;
256  float dz, dxy, dzError, dxyError;
257  int pfCandInd; //to avoid counting packedPFCands in their own isolation
258  int ltCandInd; //to avoid pointing lost track to itself when looking for closest
259 
260  // get the four-momentum and charge
261  if (isInPackedCands) {
262  p4 = pfCand->p4();
263  polarP4 = pfCand->p4();
264  charge = pfCand->charge();
265  pfCandInd = pcref.key();
266  ltCandInd = -1;
267  } else if (isInLostTracks) {
268  p4 = lostTrack->p4();
269  polarP4 = lostTrack->p4();
270  charge = lostTrack->charge();
271  pfCandInd = -1;
272  ltCandInd = ltref.key();
273  } else {
274  double m = 0.13957018; //assume pion mass
275  double E = sqrt(m * m + gentk.p() * gentk.p());
276  p4.SetPxPyPzE(gentk.px(), gentk.py(), gentk.pz(), E);
277  polarP4.SetCoordinates(gentk.pt(), gentk.eta(), gentk.phi(), m);
278  charge = gentk.charge();
279  pfCandInd = -1;
280  ltCandInd = -1;
281  }
282 
283  int prescaled = 0;
285  const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
286  if (dedxRef.isNonnull()) {
287  prescaled = (*gt2dedxHitInfoPrescale)[dedxRef];
288  }
289  }
290 
291  if (polarP4.pt() < pT_cut_ && prescaled <= 1)
292  continue;
293  if (charge == 0)
294  continue;
295 
296  // get the isolation of the track
297  pat::PFIsolation isolationDR03;
298  pat::PFIsolation miniIso;
299  getIsolation(polarP4, pc, pfCandInd, isolationDR03, miniIso);
300 
301  // isolation cut
302  if (polarP4.pt() < pT_cut_noIso_ && prescaled <= 1 &&
303  !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
304  isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
305  miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
306  continue;
307 
308  // get the rest after the pt/iso cuts. Saves some runtime
309  if (isInPackedCands) {
310  pdgId = pfCand->pdgId();
311  dz = pfCand->dz();
312  dxy = pfCand->dxy();
313  dzError = pfCand->hasTrackDetails() ? pfCand->dzError() : gentk.dzError();
314  dxyError = pfCand->hasTrackDetails() ? pfCand->dxyError() : gentk.dxyError();
315  fromPV = pfCand->fromPV();
316  refToCand = pcref;
317  } else if (isInLostTracks) {
318  pdgId = lostTrack->pdgId();
319  dz = lostTrack->dz();
320  dxy = lostTrack->dxy();
321  dzError = lostTrack->hasTrackDetails() ? lostTrack->dzError() : gentk.dzError();
322  dxyError = lostTrack->hasTrackDetails() ? lostTrack->dxyError() : gentk.dxyError();
323  fromPV = lostTrack->fromPV();
324  refToCand = ltref;
325  } else {
326  pdgId = 0;
327  dz = gentk.dz(pv.position());
328  dxy = gentk.dxy(pv.position());
329  dzError = gentk.dzError();
330  dxyError = gentk.dxyError();
331  fromPV = -1;
332  refToCand = pat::PackedCandidateRef(); //NULL reference
333  }
334 
335  float caloJetEm, caloJetHad;
336  getCaloJetEnergy(polarP4, caloJets.product(), caloJetEm, caloJetHad);
337 
338  bool pfLepOverlap = getPFLeptonOverlap(polarP4, pc);
339  float pfNeutralSum = getPFNeutralSum(polarP4, pc, pfCandInd);
340 
342  int refToNearestPF_idx = -1;
343  getNearestPCRef(polarP4, pc, pfCandInd, refToNearestPF_idx);
344  if (refToNearestPF_idx != -1)
345  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
346 
347  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
348  int refToNearestLostTrack_idx = -1;
349  getNearestPCRef(polarP4, lt, ltCandInd, refToNearestLostTrack_idx);
350  if (refToNearestLostTrack_idx != -1)
351  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
352 
353  // if no dEdx info exists, just store -1
354  float dEdxPixel = -1, dEdxStrip = -1;
355  if (usePrecomputedDeDxStrip_ && gt2dedxStrip.isValid() && gt2dedxStrip->contains(tkref.id())) {
356  dEdxStrip = (*gt2dedxStrip)[tkref].dEdx();
357  } else if (gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())) {
358  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
359  dEdxStrip = getDeDx(hitInfo, false, true);
360  }
361  if (usePrecomputedDeDxPixel_ && gt2dedxPixel.isValid() && gt2dedxPixel->contains(tkref.id())) {
362  dEdxPixel = (*gt2dedxPixel)[tkref].dEdx();
363  } else if (gt2dedxHitInfo.isValid() && gt2dedxHitInfo->contains(tkref.id())) {
364  const reco::DeDxHitInfo* hitInfo = (*gt2dedxHitInfo)[tkref].get();
365  dEdxPixel = getDeDx(hitInfo, true, false);
366  }
367 
368  int trackQuality = gentk.qualityMask();
369 
370  // get the associated ecal/hcal detectors
371  TrackDetMatchInfo trackDetInfo = getTrackDetMatchInfo(iEvent, iSetup, gentk);
372 
373  // fill ecal/hcal status vectors
374  std::vector<uint32_t> crossedHcalStatus;
375  for (auto const& did : trackDetInfo.crossedHcalIds) {
376  crossedHcalStatus.push_back(hcalQ->getValues(did.rawId())->getValue());
377  }
378  std::vector<uint16_t> crossedEcalStatus;
379  for (auto const& did : trackDetInfo.crossedEcalIds) {
380  crossedEcalStatus.push_back(ecalS->find(did.rawId())->getStatusCode());
381  }
382 
383  int deltaEta = int((trackDetInfo.trkGlobPosAtEcal.eta() - gentk.eta()) / 0.5 * 250);
384  int deltaPhi = int((trackDetInfo.trkGlobPosAtEcal.phi() - gentk.phi()) / 0.5 * 250);
385  if (deltaEta < -250)
386  deltaEta = -250;
387  if (deltaEta > 250)
388  deltaEta = 250;
389  if (deltaPhi < -250)
390  deltaPhi = -250;
391  if (deltaPhi > 250)
392  deltaPhi = 250;
393 
394  outPtrP->push_back(pat::IsolatedTrack(isolationDR03,
395  miniIso,
396  caloJetEm,
397  caloJetHad,
398  pfLepOverlap,
399  pfNeutralSum,
400  p4,
401  charge,
402  pdgId,
403  dz,
404  dxy,
405  dzError,
406  dxyError,
407  gentk.hitPattern(),
408  dEdxStrip,
409  dEdxPixel,
410  fromPV,
411  trackQuality,
412  crossedEcalStatus,
413  crossedHcalStatus,
414  deltaEta,
415  deltaPhi,
416  refToCand,
417  refToNearestPF,
418  refToNearestLostTrack));
419  outPtrP->back().setStatus(prescaled);
420 
421  if (saveDeDxHitInfo_) {
422  const auto& dedxRef = (*gt2dedxHitInfo)[tkref];
423  if (saveDeDxHitInfoCut_(outPtrP->back()) && dedxRef.isNonnull()) {
424  outDeDxC->push_back(*dedxRef);
425  dEdXass.push_back(outDeDxC->size() - 1);
426  } else {
427  dEdXass.push_back(-1);
428  }
429  }
430  }
431 
432  // there are some number of pfcandidates with no associated track
433  // (mostly electrons, with a handful of muons)
434  // here we find these and store. Track-specific variables get some default values
435  for (unsigned int ipc = 0; ipc < pc->size(); ipc++) {
436  const pat::PackedCandidate& pfCand = pc->at(ipc);
438  reco::PFCandidateRef pfref = (*pc2pf)[pcref];
439 
440  // already counted if it has a track reference in the generalTracks collection
441  if (pfref.get()->trackRef().isNonnull() && pfref.get()->trackRef().id() == gt_h.id())
442  continue;
443 
444  PolarLorentzVector polarP4;
445  pat::PackedCandidateRef refToCand;
446  int pdgId, charge, fromPV;
447  float dz, dxy, dzError, dxyError;
448 
449  polarP4 = pfCand.polarP4();
450  charge = pfCand.charge();
451 
452  if (polarP4.pt() < pT_cut_)
453  continue;
454  if (charge == 0)
455  continue;
456 
457  // get the isolation of the track
458  pat::PFIsolation isolationDR03;
459  pat::PFIsolation miniIso;
460  getIsolation(polarP4, pc, ipc, isolationDR03, miniIso);
461 
462  // isolation cut
463  if (polarP4.pt() < pT_cut_noIso_ && !(isolationDR03.chargedHadronIso() < absIso_cut_ ||
464  isolationDR03.chargedHadronIso() / polarP4.pt() < relIso_cut_ ||
465  miniIso.chargedHadronIso() / polarP4.pt() < miniRelIso_cut_))
466  continue;
467 
468  pdgId = pfCand.pdgId();
469  dz = pfCand.dz();
470  dxy = pfCand.dxy();
471  if (pfCand.hasTrackDetails()) {
472  dzError = pfCand.dzError();
473  dxyError = pfCand.dxyError();
474  } else {
475  dzError = 0;
476  dxyError = 0;
477  }
478  fromPV = pfCand.fromPV();
479  refToCand = pcref;
480 
481  float caloJetEm, caloJetHad;
482  getCaloJetEnergy(polarP4, caloJets.product(), caloJetEm, caloJetHad);
483 
484  bool pfLepOverlap = getPFLeptonOverlap(polarP4, pc);
485  float pfNeutralSum = getPFNeutralSum(polarP4, pc, ipc);
486 
488  int refToNearestPF_idx = -1;
489  getNearestPCRef(polarP4, pc, ipc, refToNearestPF_idx);
490  if (refToNearestPF_idx != -1)
491  refToNearestPF = pat::PackedCandidateRef(pc_h, refToNearestPF_idx);
492 
493  pat::PackedCandidateRef refToNearestLostTrack = pat::PackedCandidateRef();
494  int refToNearestLostTrack_idx = -1;
495  getNearestPCRef(polarP4, lt, -1, refToNearestLostTrack_idx);
496  if (refToNearestLostTrack_idx != -1)
497  refToNearestLostTrack = pat::PackedCandidateRef(lt_h, refToNearestLostTrack_idx);
498 
499  // fill with default values
501  float dEdxPixel = -1, dEdxStrip = -1;
502  int trackQuality = 0;
503  std::vector<uint16_t> ecalStatus;
504  std::vector<uint32_t> hcalStatus;
505  int deltaEta = 0;
506  int deltaPhi = 0;
507 
508  outPtrP->push_back(pat::IsolatedTrack(isolationDR03,
509  miniIso,
510  caloJetEm,
511  caloJetHad,
512  pfLepOverlap,
513  pfNeutralSum,
514  pfCand.p4(),
515  charge,
516  pdgId,
517  dz,
518  dxy,
519  dzError,
520  dxyError,
521  hp,
522  dEdxStrip,
523  dEdxPixel,
524  fromPV,
525  trackQuality,
526  ecalStatus,
527  hcalStatus,
528  deltaEta,
529  deltaPhi,
530  refToCand,
531  refToNearestPF,
532  refToNearestLostTrack));
533 
534  dEdXass.push_back(-1); // these never have dE/dx hit info, as there's no track
535  }
536 
537  auto orphHandle = iEvent.put(std::move(outPtrP));
538  if (saveDeDxHitInfo_) {
539  auto dedxOH = iEvent.put(std::move(outDeDxC));
540  auto dedxMatch = std::make_unique<reco::DeDxHitInfoAss>(dedxOH);
542  filler.insert(orphHandle, dEdXass.begin(), dEdXass.end());
543  filler.fill();
544  iEvent.put(std::move(dedxMatch));
545  }
546 }

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::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 108 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 105 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ saveDeDxHitInfoCut_

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

Definition at line 106 of file PATIsolatedTrackProducer.cc.

◆ trackAssociator_

TrackDetectorAssociator pat::PATIsolatedTrackProducer::trackAssociator_
private

Definition at line 110 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ trackAssocParameters_

TrackAssociatorParameters pat::PATIsolatedTrackProducer::trackAssocParameters_
private

Definition at line 111 of file PATIsolatedTrackProducer.cc.

Referenced by PATIsolatedTrackProducer().

◆ 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: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:548
reco::CaloJet
Jets made from CaloTowers.
Definition: CaloJet.h:27
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:355
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:832
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:605
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
TrackDetMatchInfo::crossedEcalIds
std::vector< DetId > crossedEcalIds
Definition: TrackDetMatchInfo.h:67
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:120
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:105
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:611
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< EcalChannelStatusCode >
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:722
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 >
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
pat::PATIsolatedTrackProducer::absIso_cut_
const float absIso_cut_
Definition: PATIsolatedTrackProducer.cc:96
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:608
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
TrackDetMatchInfo::crossedHcalIds
std::vector< DetId > crossedHcalIds
Definition: TrackDetMatchInfo.h:68
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:1246
pat::PATIsolatedTrackProducer::addPrescaledDeDxTracks_
const bool addPrescaledDeDxTracks_
Definition: PATIsolatedTrackProducer.cc:88
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
spr::deltaEta
static const double deltaEta
Definition: CaloConstants.h:8
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:614
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:745
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:756
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:581
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:602
reco::TrackBase::qualityMask
int qualityMask() const
Definition: TrackBase.h:784
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:620
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
reco::DeDxHitInfo
Definition: DeDxHitInfo.h:14
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
edm::ParameterSet
Definition: ParameterSet.h:36
pat::PATIsolatedTrackProducer::trackAssociator_
TrackDetectorAssociator trackAssociator_
Definition: PATIsolatedTrackProducer.cc:110
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:623
pat::PATIsolatedTrackProducer::miniIsoParams_
std::vector< double > miniIsoParams_
Definition: PATIsolatedTrackProducer.cc:108
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:731
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:744
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:39
pat::PackedCandidateCollection
std::vector< pat::PackedCandidate > PackedCandidateCollection
Definition: PackedCandidate.h:1130
pat::PATIsolatedTrackProducer::gt2dedxHitInfoPrescale_
const edm::EDGetTokenT< edm::ValueMap< int > > gt2dedxHitInfoPrescale_
Definition: PATIsolatedTrackProducer.cc:89
pat::IsolatedTrack
Definition: IsolatedTrack.h:21
pat::PATIsolatedTrackProducer::getNearestPCRef
void getNearestPCRef(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc, int pc_idx, int &pc_ref_idx) const
Definition: PATIsolatedTrackProducer.cc:630
pat::PFIsolation
Definition: PFIsolation.h:12
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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:489
TrackDetMatchInfo
Definition: TrackDetMatchInfo.h:14
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
pat::PATIsolatedTrackProducer::caloJets_
const edm::EDGetTokenT< reco::CaloJetCollection > caloJets_
Definition: PATIsolatedTrackProducer.cc:84
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:670
PVValHelper::dz
Definition: PVValidationHelpers.h:50
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
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:765
pat::PATIsolatedTrackProducer::gt2dedxStrip_
const edm::EDGetTokenT< edm::ValueMap< reco::DeDxData > > gt2dedxStrip_
Definition: PATIsolatedTrackProducer.cc:85
muons2muons_cfi.PFIsolation
PFIsolation
Definition: muons2muons_cfi.py:25
pat::PATIsolatedTrackProducer::pc_
const edm::EDGetTokenT< pat::PackedCandidateCollection > pc_
Definition: PATIsolatedTrackProducer.cc:77
pat::PATIsolatedTrackProducer::trackAssocParameters_
TrackAssociatorParameters trackAssocParameters_
Definition: PATIsolatedTrackProducer.cc:111
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
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:617
isolatedTracks_cfi.generalTracks
generalTracks
Definition: isolatedTracks_cfi.py:31
mps_fire.result
result
Definition: mps_fire.py:303
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:154
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:106
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:593
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:13
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:39
pat::PATIsolatedTrackProducer::getPFLeptonOverlap
bool getPFLeptonOverlap(const PolarLorentzVector &p4, const pat::PackedCandidateCollection *pc) const
Definition: PATIsolatedTrackProducer.cc:596
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:698
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:1131