CMS 3D CMS Logo

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

◆ dPtCut()

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

Definition at line 6 of file PFTrackAlgoTools.cc.

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  }

References reco::TrackBase::ctf, L1TMuonDQMOffline_cfi::cuts, 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().

◆ errorScale()

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().

◆ goodPtResolution()

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.

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  }

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

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

◆ highQuality()

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

◆ isFifthStep()

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().

◆ isGoodForEGM()

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().

◆ isGoodForEGMPrimary()

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

◆ nHitCut()

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.

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  }

References reco::TrackBase::ctf, L1TMuonDQMOffline_cfi::cuts, 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().

◆ nonIterative()

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

Definition at line 210 of file PFTrackAlgoTools.cc.

210  {
211  switch (algo) {
215  return true;
216  default:
217  return false;
218  }
219  }

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

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed().

◆ step45()

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

Definition at line 221 of file PFTrackAlgoTools.cc.

221  {
222  switch (algo) {
226  return true;
227  default:
228  return false;
229  }
230  }

References reco::TrackBase::mixedTripletStep, reco::TrackBase::pixelLessStep, and reco::TrackBase::tobTecStep.

Referenced by PFDisplacedVertexFinder::fitVertexFromSeed(), and PFAlgo::recoTracksNotHCAL().

◆ step5()

bool PFTrackAlgoTools::step5 ( const reco::TrackBase::TrackAlgorithm algo)
reco::TrackBase::hltIter2
Definition: TrackBase.h:126
StandaloneTrackMonitor_cfi.trackQuality
trackQuality
Definition: StandaloneTrackMonitor_cfi.py:11
reco::TrackBase::detachedQuadStep
Definition: TrackBase.h:115
reco::TrackBase::lowPtQuadStep
Definition: TrackBase.h:114
PFTrackAlgoTools::dPtCut
double dPtCut(const reco::TrackBase::TrackAlgorithm &, const std::vector< double > &, bool)
Definition: PFTrackAlgoTools.cc:6
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::TrackBase::hltIter3
Definition: TrackBase.h:127
reco::TrackBase::lowPtTripletStep
Definition: TrackBase.h:95
reco::TrackBase::hltIter1
Definition: TrackBase.h:125
reco::TrackBase::mixedTripletStep
Definition: TrackBase.h:98
cmsdt::algo
algo
Definition: constants.h:164
reco::TrackBase::muonSeededStepOutIn
Definition: TrackBase.h:104
reco::TrackBase::jetCoreRegionalStep
Definition: TrackBase.h:101
PVValHelper::pT
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
reco::TrackBase::cosmics
Definition: TrackBase.h:93
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
reco::TrackBase::detachedTripletStep
Definition: TrackBase.h:97
reco::TrackBase::undefAlgorithm
Definition: TrackBase.h:90
reco::TrackBase::initialStep
Definition: TrackBase.h:94
ZMuMuCategoriesSequences_cff.nHitCut
nHitCut
Definition: ZMuMuCategoriesSequences_cff.py:142
reco::TrackBase::tobTecStep
Definition: TrackBase.h:100
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
reco::TrackBase::pixelPairStep
Definition: TrackBase.h:96
AlcaBeamMonitor_cfi.errorScale
errorScale
Definition: AlcaBeamMonitor_cfi.py:51
reco::TrackBase::muonSeededStepInOut
Definition: TrackBase.h:103
reco::TrackBase::ctf
Definition: TrackBase.h:91
reco::TrackBase::highPtTripletStep
Definition: TrackBase.h:113
electrons_cff.lostHits
lostHits
Definition: electrons_cff.py:428
L1TMuonDQMOffline_cfi.cuts
cuts
Definition: L1TMuonDQMOffline_cfi.py:41
reco::TrackBase::hltIterX
Definition: TrackBase.h:130
reco::TrackBase::pixelLessStep
Definition: TrackBase.h:99
reco::TrackBase::hltIter4
Definition: TrackBase.h:128
reco::TrackBase::duplicateMerge
Definition: TrackBase.h:92
reco::TrackBase::hltIter0
Definition: TrackBase.h:124