CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
PFTrackAlgoTools Namespace Reference

Functions

double dPtCut (const reco::TrackBase::TrackAlgorithm &, const std::vector< double > &, bool)
 
double errorScale (const reco::TrackBase::TrackAlgorithm &, const std::vector< double > &)
 
bool goodPtResolution (const reco::TrackRef &, const std::vector< double > &DPtovPtCut, const std::vector< unsigned > &NHitCut, bool useIterTracking, const reco::TrackBase::TrackQuality trackQuality)
 
bool highQuality (const reco::TrackBase::TrackAlgorithm &)
 
bool isFifthStep (const reco::TrackBase::TrackAlgorithm &)
 
bool isGoodForEGM (const reco::TrackBase::TrackAlgorithm &)
 
bool isGoodForEGMPrimary (const reco::TrackBase::TrackAlgorithm &)
 
unsigned int nHitCut (const reco::TrackBase::TrackAlgorithm &, const std::vector< unsigned int > &, bool)
 
bool nonIterative (const reco::TrackBase::TrackAlgorithm &)
 
bool step45 (const reco::TrackBase::TrackAlgorithm &)
 
bool step5 (const reco::TrackBase::TrackAlgorithm &)
 

Function Documentation

double PFTrackAlgoTools::dPtCut ( const reco::TrackBase::TrackAlgorithm algo,
const std::vector< double > &  cuts,
bool  hltIterativeTracking = true 
)

Definition at line 6 of file PFTrackAlgoTools.cc.

References reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::hltIter0, reco::TrackBase::hltIter1, reco::TrackBase::hltIter2, reco::TrackBase::hltIter3, reco::TrackBase::hltIter4, reco::TrackBase::hltIterX, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, reco::TrackBase::muonSeededStepInOut, reco::TrackBase::muonSeededStepOutIn, reco::TrackBase::pixelLessStep, reco::TrackBase::pixelPairStep, and reco::TrackBase::tobTecStep.

Referenced by goodPtResolution().

8  {
9  switch (algo) {
18  return cuts[0];
21  return cuts[1];
23  return cuts[2];
25  return cuts[3];
27  return cuts[4];
30  return cuts.at(5);
34  return cuts[0];
36  return hltIterativeTracking ? cuts[1] : cuts[0];
38  return hltIterativeTracking ? cuts[2] : cuts[0];
40  return cuts[0];
41  default:
42  return hltIterativeTracking ? cuts.at(5) : cuts[0];
43  }
44  }
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
double PFTrackAlgoTools::errorScale ( const reco::TrackBase::TrackAlgorithm algo,
const std::vector< double > &  errorScale 
)

Definition at line 86 of file PFTrackAlgoTools.cc.

References reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::hltIter0, reco::TrackBase::hltIter1, reco::TrackBase::hltIter2, reco::TrackBase::hltIter3, reco::TrackBase::hltIter4, reco::TrackBase::hltIterX, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, reco::TrackBase::muonSeededStepInOut, reco::TrackBase::muonSeededStepOutIn, reco::TrackBase::pixelLessStep, reco::TrackBase::pixelPairStep, and reco::TrackBase::tobTecStep.

Referenced by PFAlgo::createCandidatesHCAL().

86  {
87  switch (algo) {
107  return 1.0;
109  return errorScale[0];
111  return errorScale[1];
112  default:
113  return 1E9;
114  }
115  }
double errorScale(const reco::TrackBase::TrackAlgorithm &, const std::vector< double > &)
bool PFTrackAlgoTools::goodPtResolution ( const reco::TrackRef trackref,
const std::vector< double > &  DPtovPtCut,
const std::vector< unsigned > &  NHitCut,
bool  useIterTracking,
const reco::TrackBase::TrackQuality  trackQuality 
)

Definition at line 236 of file PFTrackAlgoTools.cc.

References dPtCut(), LogDebug, nHitCut(), AlCaHLTBitMon_ParallelJobs::p, PVValHelper::pT, mathSSE::sqrt(), and reco::HitPattern::TRACK_HITS.

Referenced by GeneralTracksImporter::importToBlock(), and HGCalTrackCollectionProducer::produce().

240  {
241  //check quality of tracks
242  if (!trackref->quality(trackQuality))
243  return false;
244 
245  const double p = trackref->p();
246  const double pT = trackref->pt();
247  const double dpT = trackref->ptError();
248  const unsigned int nHit = trackref->hitPattern().trackerLayersWithMeasurement();
249  const unsigned int nLostHit = trackref->hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS);
250  const unsigned int lostHits = trackref->numberOfLostHits();
251  const double sigmaHad = std::sqrt(1.20 * 1.20 / p + 0.06 * 0.06) / (1. + lostHits);
252 
253  // Protection against 0 momentum tracks
254  if (p < 0.05)
255  return false;
256 
257  LogDebug("goodPtResolution") << " PFBlockAlgo: PFrecTrack->Track Pt= " << pT << " DPt = " << dpT << std::endl;
258 
259  double dptCut = dPtCut(trackref->algo(), DPtovPtCut, useIterTracking);
260  unsigned int nhitCut = nHitCut(trackref->algo(), NHitCut, useIterTracking);
261 
262  if ((dptCut > 0. && dpT / pT > dptCut * sigmaHad) || nHit < nhitCut) {
263  LogDebug("goodPtResolution") << " PFBlockAlgo: skip badly measured track"
264  << ", P = " << p << ", Pt = " << pT << " DPt = " << dpT << ", N(hits) = " << nHit
265  << " (Lost : " << lostHits << "/" << nLostHit << ")"
266  << ", Algo = " << trackref->algo() << std::endl;
267  LogDebug("goodPtResolution") << " cut is DPt/Pt < " << dptCut * sigmaHad << std::endl;
268  LogDebug("goodPtResolution") << " cut is NHit >= " << nhitCut << std::endl;
269  return false;
270  }
271 
272  return true;
273  }
unsigned int nHitCut(const reco::TrackBase::TrackAlgorithm &, const std::vector< unsigned int > &, bool)
T sqrt(T t)
Definition: SSEVec.h:19
double dPtCut(const reco::TrackBase::TrackAlgorithm &, const std::vector< double > &, bool)
#define LogDebug(id)
bool PFTrackAlgoTools::highQuality ( const reco::TrackBase::TrackAlgorithm algo)

Definition at line 193 of file PFTrackAlgoTools.cc.

References reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, and reco::TrackBase::pixelPairStep.

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

bool PFTrackAlgoTools::isFifthStep ( const reco::TrackBase::TrackAlgorithm algo)

Definition at line 163 of file PFTrackAlgoTools.cc.

References reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::hltIter0, reco::TrackBase::hltIter1, reco::TrackBase::hltIter2, reco::TrackBase::hltIter3, reco::TrackBase::hltIter4, reco::TrackBase::hltIterX, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, reco::TrackBase::muonSeededStepInOut, reco::TrackBase::muonSeededStepOutIn, reco::TrackBase::pixelLessStep, reco::TrackBase::pixelPairStep, and reco::TrackBase::tobTecStep.

Referenced by PFElecTkProducer::produce().

163  {
164  switch (algo) {
185  return false;
187  return true;
188  default:
189  return true;
190  }
191  }
bool PFTrackAlgoTools::isGoodForEGM ( const reco::TrackBase::TrackAlgorithm algo)

Definition at line 117 of file PFTrackAlgoTools.cc.

References reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::hltIter0, reco::TrackBase::hltIter1, reco::TrackBase::hltIter2, reco::TrackBase::hltIter3, reco::TrackBase::hltIter4, reco::TrackBase::hltIterX, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, reco::TrackBase::muonSeededStepInOut, reco::TrackBase::muonSeededStepOutIn, and reco::TrackBase::pixelPairStep.

Referenced by PFEGammaFilters::isElectronSafeForJetMET(), and PFEGammaAlgo::unlinkRefinableObjectKFandECALMatchedToHCAL().

117  {
118  switch (algo) {
138  return true;
139  default:
140  return false;
141  }
142  }
bool PFTrackAlgoTools::isGoodForEGMPrimary ( const reco::TrackBase::TrackAlgorithm algo)

Definition at line 144 of file PFTrackAlgoTools.cc.

References reco::TrackBase::cosmics, reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::initialStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, and reco::TrackBase::pixelPairStep.

Referenced by PFEGammaAlgo::removeOrLinkECALClustersToKFTracks().

unsigned int PFTrackAlgoTools::nHitCut ( const reco::TrackBase::TrackAlgorithm algo,
const std::vector< unsigned int > &  cuts,
bool  hltIterativeTracking = true 
)

Definition at line 46 of file PFTrackAlgoTools.cc.

References reco::TrackBase::ctf, reco::TrackBase::detachedQuadStep, reco::TrackBase::detachedTripletStep, reco::TrackBase::duplicateMerge, reco::TrackBase::highPtTripletStep, reco::TrackBase::hltIter0, reco::TrackBase::hltIter1, reco::TrackBase::hltIter2, reco::TrackBase::hltIter3, reco::TrackBase::hltIter4, reco::TrackBase::hltIterX, reco::TrackBase::initialStep, reco::TrackBase::jetCoreRegionalStep, reco::TrackBase::lowPtQuadStep, reco::TrackBase::lowPtTripletStep, reco::TrackBase::mixedTripletStep, reco::TrackBase::muonSeededStepInOut, reco::TrackBase::muonSeededStepOutIn, reco::TrackBase::pixelLessStep, reco::TrackBase::pixelPairStep, and reco::TrackBase::tobTecStep.

Referenced by goodPtResolution().

48  {
49  switch (algo) {
58  return cuts[0];
61  return cuts[1];
63  return cuts[2];
65  return cuts[3];
67  return cuts[4];
70  return cuts.at(5);
74  return cuts[0];
76  return hltIterativeTracking ? cuts[1] : cuts[0];
78  return hltIterativeTracking ? cuts[2] : cuts[0];
80  return cuts[0];
81  default:
82  return hltIterativeTracking ? cuts.at(5) : cuts[0];
83  }
84  }
TkSoA const *__restrict__ CAHitNtupletGeneratorKernelsGPU::QualityCuts cuts
bool PFTrackAlgoTools::nonIterative ( const reco::TrackBase::TrackAlgorithm algo)

Definition at line 210 of file PFTrackAlgoTools.cc.

References reco::TrackBase::cosmics, reco::TrackBase::ctf, and reco::TrackBase::undefAlgorithm.

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

210  {
211  switch (algo) {
215  return true;
216  default:
217  return false;
218  }
219  }
bool PFTrackAlgoTools::step45 ( const reco::TrackBase::TrackAlgorithm algo)
bool PFTrackAlgoTools::step5 ( const reco::TrackBase::TrackAlgorithm algo)