PandaRoot
PndFtsHoughTrackFinder Class Reference

Implementation of the Hough transform based FTS PR. Creates Hough spaces, finds peaks (=tracklets) and combines them to track candidates. More...

#include <PndFtsHoughTrackFinder.h>

Inheritance diagram for PndFtsHoughTrackFinder:
PndFtsHoughTrackFinderQA

Public Member Functions

 PndFtsHoughTrackFinder (PndFtsHoughTrackerTask *trackerTask)
 Set pointer to tracker task (super important as it provides an I/O interface to PandaRoot) More...
 
virtual ~PndFtsHoughTrackFinder ()
 Destructor. More...
 
void OverwriteTrackFinderParams (PndFtsHoughTrackFinderParams newParams)
 
virtual void FindTracks ()
 Performs the track finding. More...
 
Int_t NTracks () const
 
PndTrack GetPndTrack (int i)
 Returns the number of found tracks. More...
 
PndTrackCand GetPndTrackCand (int i)
 Returns the track cand. with index i. More...
 
PndFtsHoughTrackCand GetHoughTrack (int i) const
 Returns the track cand. with index i. More...
 
Int_t getNLinesBeforeDipoleFound () const
 
Int_t getNLinesBehindDipoleFound () const
 
Int_t getNParabolasFound () const
 
Int_t getNTracksFound () const
 

Protected Member Functions

void throwError (const TString s) const
 For error reporting. More...
 
Bool_t FilterTrackletsBasedOnSharedHits (UInt_t maxAcceptableSharedHits, std::vector< PndFtsHoughTracklet > &tracklets)
 Filters a vector of tracklets based on the number of shared hits. More...
 
std::vector< PndFtsHoughTrackletFindLinesBehindDipoleZx ()
 
std::vector< PndFtsHoughTrackletFindLinesBeforeDipoleZx ()
 
void FindMatchingParabolaToLineBeforeDipoleZxAndAddLineBehindDipole (const std::vector< PndFtsHoughTracklet > &trackletsLineBeforeDipole, const std::vector< PndFtsHoughTracklet > &trackletsLineBehindDipole)
 
Bool_t LineBehindDipoleMatchesToLinePlusParabola (const PndFtsHoughTrackCand &lineParabola, const PndFtsHoughTracklet &lineBehindDipole) const
 
void FindZyLineMatchingToLineParabolaLineInZx ()
 

Protected Attributes

PndFtsHoughTrackerTaskfTrackerTask
 Task which handles PandaRoot input/output and provides settings for FTS PR. Has to be set using the constructor. More...
 
PndFtsHoughTrackFinderParams fParams
 
std::vector< PndFtsHoughTrackCandfHoughTrackCandsComplete
 For internal storing of complete track cands. More...
 
std::vector< PndFtsHoughTrackCandfHoughTrackCandsZxPlaneOnly
 For internal storing of track cands. (zx plane track model only) More...
 
const UInt_t fMinPeakHeightZxLineBeforeDipole
 Minimum required height for peaks in Hough spaces. More...
 
const UInt_t fMinPeakHeightZxParabola
 Minimum required height for peaks in Hough spaces. More...
 
const UInt_t fMinPeakHeightZxLineBehindDipole
 Minimum required height for peaks in Hough spaces. More...
 
const UInt_t fMinPeakHeightZyLine
 zy line More...
 
Int_t fNLinesBeforeDipoleFound
 
Int_t fNLinesBehindDipoleFound
 
Int_t fNParabolasFound
 
Int_t fNTracksFound
 

Static Protected Attributes

static const Double_t fThetaRadLineBehindDipoleMatchesToParabolaIfBelow
 Minimum required height for peaks in Hough spaces. More...
 

Detailed Description

Implementation of the Hough transform based FTS PR. Creates Hough spaces, finds peaks (=tracklets) and combines them to track candidates.

Author
Martin J. Galuska <martin [dot] j [dot] galuska (at) physik [dot] uni (minus) giessen [dot] de>

This is a class version of the HoughTest.C macro PR test implementation minus all the plotting stuff. Take a look at the notes of the macro version for further details.

Recent Changes Major code cleanup and deletion of test code / unneeded code use PndFtsHoughTrackCand to store information about track candidates and Hough transforms Find all peaks with a minimum height, analysing peak shapes. Moved all Hough space related code to PndFtsHoughSpace -> Major code simplification, better maintainability Fill PndTrackCands and PndTrack for output

This class is loosely modeled after the mvd/MvdTracking/PndRiemannTrackFinder sttmvdtracking/PndMvdSttGemRiemannTrackFinder classes

TODO Match straight line for stations 5+6 to parabola Add skewed hits Add drift circles Adaptive Hough

Created: 18.06.2013

Definition at line 65 of file PndFtsHoughTrackFinder.h.

Constructor & Destructor Documentation

◆ PndFtsHoughTrackFinder()

PndFtsHoughTrackFinder::PndFtsHoughTrackFinder ( PndFtsHoughTrackerTask trackerTask)

Set pointer to tracker task (super important as it provides an I/O interface to PandaRoot)

◆ ~PndFtsHoughTrackFinder()

virtual PndFtsHoughTrackFinder::~PndFtsHoughTrackFinder ( )
virtual

Destructor.

Member Function Documentation

◆ FilterTrackletsBasedOnSharedHits()

Bool_t PndFtsHoughTrackFinder::FilterTrackletsBasedOnSharedHits ( UInt_t  maxAcceptableSharedHits,
std::vector< PndFtsHoughTracklet > &  tracklets 
)
protected

Filters a vector of tracklets based on the number of shared hits.

It will only keep the heighest peaks if 2 or more peaks share more than maxAcceptableSharedHits hits. If two peaks have the same height, both are kept.

Parameters
maxAcceptableSharedHitsDefines how many hits two tracklets / peaks are allowed to share.
[in,out]trackletsVector containing tracklets which are supposed to be filtered. The vector will be modified.
Returns

◆ FindLinesBeforeDipoleZx()

std::vector<PndFtsHoughTracklet> PndFtsHoughTrackFinder::FindLinesBeforeDipoleZx ( )
protected

◆ FindLinesBehindDipoleZx()

std::vector<PndFtsHoughTracklet> PndFtsHoughTrackFinder::FindLinesBehindDipoleZx ( )
protected

◆ FindMatchingParabolaToLineBeforeDipoleZxAndAddLineBehindDipole()

void PndFtsHoughTrackFinder::FindMatchingParabolaToLineBeforeDipoleZxAndAddLineBehindDipole ( const std::vector< PndFtsHoughTracklet > &  trackletsLineBeforeDipole,
const std::vector< PndFtsHoughTracklet > &  trackletsLineBehindDipole 
)
protected

◆ FindTracks()

virtual void PndFtsHoughTrackFinder::FindTracks ( )
virtual

Performs the track finding.

Reimplemented in PndFtsHoughTrackFinderQA.

Referenced by OverwriteTrackFinderParams().

◆ FindZyLineMatchingToLineParabolaLineInZx()

void PndFtsHoughTrackFinder::FindZyLineMatchingToLineParabolaLineInZx ( )
protected

◆ GetHoughTrack()

PndFtsHoughTrackCand PndFtsHoughTrackFinder::GetHoughTrack ( int  i) const
inline

Returns the track cand. with index i.

Note: For debugging only.

Parameters
iIndex of requested track cand.
Returns
Track cand. to index i.

Definition at line 97 of file PndFtsHoughTrackFinder.h.

References fHoughTrackCandsComplete, and i.

97 { return fHoughTrackCandsComplete[i]; };
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< PndFtsHoughTrackCand > fHoughTrackCandsComplete
For internal storing of complete track cands.

◆ getNLinesBeforeDipoleFound()

Int_t PndFtsHoughTrackFinder::getNLinesBeforeDipoleFound ( ) const
inline

Definition at line 100 of file PndFtsHoughTrackFinder.h.

References fNLinesBeforeDipoleFound.

◆ getNLinesBehindDipoleFound()

Int_t PndFtsHoughTrackFinder::getNLinesBehindDipoleFound ( ) const
inline

Definition at line 101 of file PndFtsHoughTrackFinder.h.

References fNLinesBehindDipoleFound.

◆ getNParabolasFound()

Int_t PndFtsHoughTrackFinder::getNParabolasFound ( ) const
inline

Definition at line 102 of file PndFtsHoughTrackFinder.h.

References fNParabolasFound.

◆ getNTracksFound()

Int_t PndFtsHoughTrackFinder::getNTracksFound ( ) const
inline

Definition at line 103 of file PndFtsHoughTrackFinder.h.

References fNTracksFound, and fTrackerTask.

◆ GetPndTrack()

PndTrack PndFtsHoughTrackFinder::GetPndTrack ( int  i)
inline

Returns the number of found tracks.

Returns the track cand. with index i.

Note: Method calculates first and last parameters of the PndTrack object, but uses an empty PndTrackCand which has to be set lateron using SetTrackCandRef!

Parameters
iIndex of requested track cand.
Returns
Track cand. to index i.

Definition at line 83 of file PndFtsHoughTrackFinder.h.

References fHoughTrackCandsComplete, and i.

83 { return fHoughTrackCandsComplete[i].getPndTrack(); };
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< PndFtsHoughTrackCand > fHoughTrackCandsComplete
For internal storing of complete track cands.

◆ GetPndTrackCand()

PndTrackCand PndFtsHoughTrackFinder::GetPndTrackCand ( int  i)
inline

Returns the track cand. with index i.

Note: Use this to add a PndTrackCand to the corresponding PndTrack object with SetTrackCandRef!

Parameters
iIndex of requested track cand.
Returns
Track cand. to index i.

Definition at line 90 of file PndFtsHoughTrackFinder.h.

References fHoughTrackCandsComplete, and i.

90 { return fHoughTrackCandsComplete[i].getPndTrackCand(); };
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< PndFtsHoughTrackCand > fHoughTrackCandsComplete
For internal storing of complete track cands.

◆ LineBehindDipoleMatchesToLinePlusParabola()

Bool_t PndFtsHoughTrackFinder::LineBehindDipoleMatchesToLinePlusParabola ( const PndFtsHoughTrackCand lineParabola,
const PndFtsHoughTracklet lineBehindDipole 
) const
inlineprotected

Definition at line 165 of file PndFtsHoughTrackFinder.h.

References fabs(), fThetaRadLineBehindDipoleMatchesToParabolaIfBelow, PndFtsHoughTracklet::getThetaRadVal(), PndFtsHoughTrackCand::getThetaZyRad(), and PndFtsHoughTracklet::getZRefLabSys().

166 {
167 
168  // the angles should be compared at the z coordinate where I switch from parabola to line behind dipole
169  Double_t zParabolaLine = lineBehindDipole.getZRefLabSys();
170  return fabs(lineParabola.getThetaZyRad(zParabolaLine) - lineBehindDipole.getThetaRadVal()) < fThetaRadLineBehindDipoleMatchesToParabolaIfBelow;
171 }
Double_t getZRefLabSys() const
Double_t getThetaZyRad(const Double_t) const
Double_t getThetaRadVal() const
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:46
static const Double_t fThetaRadLineBehindDipoleMatchesToParabolaIfBelow
Minimum required height for peaks in Hough spaces.

◆ NTracks()

Int_t PndFtsHoughTrackFinder::NTracks ( ) const
inline

Definition at line 76 of file PndFtsHoughTrackFinder.h.

References fHoughTrackCandsComplete.

76 { return fHoughTrackCandsComplete.size(); };
std::vector< PndFtsHoughTrackCand > fHoughTrackCandsComplete
For internal storing of complete track cands.

◆ OverwriteTrackFinderParams()

void PndFtsHoughTrackFinder::OverwriteTrackFinderParams ( PndFtsHoughTrackFinderParams  newParams)
inline

Definition at line 71 of file PndFtsHoughTrackFinder.h.

References FindTracks(), and fParams.

71 { fParams = newParams; };
PndFtsHoughTrackFinderParams fParams

◆ throwError()

void PndFtsHoughTrackFinder::throwError ( const TString  s) const
inlineprotected

For error reporting.

Definition at line 111 of file PndFtsHoughTrackFinder.h.

References fParams.

111 { throw std::runtime_error(s.Data()); };

Member Data Documentation

◆ fHoughTrackCandsComplete

std::vector<PndFtsHoughTrackCand> PndFtsHoughTrackFinder::fHoughTrackCandsComplete
protected

For internal storing of complete track cands.

Definition at line 120 of file PndFtsHoughTrackFinder.h.

Referenced by GetHoughTrack(), GetPndTrack(), GetPndTrackCand(), and NTracks().

◆ fHoughTrackCandsZxPlaneOnly

std::vector<PndFtsHoughTrackCand> PndFtsHoughTrackFinder::fHoughTrackCandsZxPlaneOnly
protected

For internal storing of track cands. (zx plane track model only)

Definition at line 121 of file PndFtsHoughTrackFinder.h.

◆ fMinPeakHeightZxLineBeforeDipole

const UInt_t PndFtsHoughTrackFinder::fMinPeakHeightZxLineBeforeDipole
protected

Minimum required height for peaks in Hough spaces.

zx line before dipole field

Definition at line 127 of file PndFtsHoughTrackFinder.h.

◆ fMinPeakHeightZxLineBehindDipole

const UInt_t PndFtsHoughTrackFinder::fMinPeakHeightZxLineBehindDipole
protected

Minimum required height for peaks in Hough spaces.

zx line after dipole field

Definition at line 131 of file PndFtsHoughTrackFinder.h.

◆ fMinPeakHeightZxParabola

const UInt_t PndFtsHoughTrackFinder::fMinPeakHeightZxParabola
protected

Minimum required height for peaks in Hough spaces.

zx parabola within dipole field

Definition at line 129 of file PndFtsHoughTrackFinder.h.

◆ fMinPeakHeightZyLine

const UInt_t PndFtsHoughTrackFinder::fMinPeakHeightZyLine
protected

zy line

Definition at line 133 of file PndFtsHoughTrackFinder.h.

◆ fNLinesBeforeDipoleFound

Int_t PndFtsHoughTrackFinder::fNLinesBeforeDipoleFound
protected

Definition at line 136 of file PndFtsHoughTrackFinder.h.

Referenced by getNLinesBeforeDipoleFound().

◆ fNLinesBehindDipoleFound

Int_t PndFtsHoughTrackFinder::fNLinesBehindDipoleFound
protected

Definition at line 137 of file PndFtsHoughTrackFinder.h.

Referenced by getNLinesBehindDipoleFound().

◆ fNParabolasFound

Int_t PndFtsHoughTrackFinder::fNParabolasFound
protected

Definition at line 138 of file PndFtsHoughTrackFinder.h.

Referenced by getNParabolasFound().

◆ fNTracksFound

Int_t PndFtsHoughTrackFinder::fNTracksFound
protected

Definition at line 139 of file PndFtsHoughTrackFinder.h.

Referenced by getNTracksFound().

◆ fParams

PndFtsHoughTrackFinderParams PndFtsHoughTrackFinder::fParams
protected

Definition at line 111 of file PndFtsHoughTrackFinder.h.

Referenced by OverwriteTrackFinderParams(), and throwError().

◆ fThetaRadLineBehindDipoleMatchesToParabolaIfBelow

const Double_t PndFtsHoughTrackFinder::fThetaRadLineBehindDipoleMatchesToParabolaIfBelow
staticprotected

Minimum required height for peaks in Hough spaces.

Definition at line 124 of file PndFtsHoughTrackFinder.h.

Referenced by LineBehindDipoleMatchesToLinePlusParabola().

◆ fTrackerTask

PndFtsHoughTrackerTask* PndFtsHoughTrackFinder::fTrackerTask
protected

Task which handles PandaRoot input/output and provides settings for FTS PR. Has to be set using the constructor.

Definition at line 103 of file PndFtsHoughTrackFinder.h.

Referenced by getNTracksFound().


The documentation for this class was generated from the following file: