PandaRoot
PndHoughTrackFinder Class Reference

#include <PndHoughTrackFinder.h>

Public Member Functions

 PndHoughTrackFinder ()
 
 PndHoughTrackFinder (TClonesArray *tubeArray)
 
virtual ~PndHoughTrackFinder ()
 
virtual void SetBinningX (double bin)
 Sets the number of bins in x direction for the Hough space. More...
 
virtual void SetBinningY (double bin)
 Sets the number of bins in y direction for the Hough space. More...
 
virtual void SetNBinsSeg (Int_t n)
 Sets the number of bins used for the segmentation preselection algorithm. More...
 
virtual void SetBz (double B)
 Sets the z component of the magnetic field. More...
 
virtual void SetCutMergeByHoughSpace (float cut)
 Sets the cut value for the distance of two maxima in the Hough space which have to be merged. More...
 
virtual void SetWithGPU (bool cuda)
 Sets a bool for deciding to use cuda. More...
 
virtual void SetWithGhostReduction (bool ghostred)
 Sets a bool for deciding to use a ghost reduction. More...
 
virtual void SetPreselectedTrackCands (std::vector< PndTrackCand > cands)
 
virtual void UseDefaultPreselection (bool pres)
 
virtual void SetCombinedSkewed (TClonesArray *skewed)
 
void Init ()
 Initializes the data structure and the Hough space of the HoughtrackFinder. More...
 
void Reset ()
 Resets the data for a new event. More...
 
void AddHits (TClonesArray *hits, TString branchName)
 Adds hits to the data structure of the HoughTrackFinder. More...
 
void CreateNeighborhood ()
 Creates the neighborhood parameters for all investigated hits. More...
 
void FindTracks ()
 Main function of the HoughTrackFinder, which finds the tracks. More...
 
void Preselection ()
 Here all data are preselected in smaller tracklets. More...
 
void FindHoughMaxima ()
 Performs a Hough transformation for all preselected tracklets. The found track parameters are stored in fPreselectedTrackCircles. More...
 
TVector2 calcPhiRange (PndTrackCand &trackCand)
 
bool IsInPhiRange (FairHit *hit, double phiLow, double phiHigh)
 
void AddSkewedHits (int i)
 
void AddOtherDetectorHits (int i, TString type)
 
PndApollonius::TripletSolution FromPndTrackToTripletSolution (PndTrack &track, PndHoughData *fData)
 
std::vector< PndApollonius::TripletSolutionCombineIdenticalSolutionsFinal (std::vector< PndApollonius::TripletSolution > &solutions, Double_t ratioOfSameHits)
 
PndTrack FromTripletSolutionToPndTrack (PndApollonius::TripletSolution &sol, Double_t B)
 Converts a TripletSolution to a PndTrack. More...
 
double CalcRatioSameHits (PndApollonius::TripletSolution &sol, std::vector< PndApollonius::TripletSolution > &AlreadyFoundSolutions)
 
PndTrackCand GetPreselectedTrackCand (int i)
 Returns a specific preselected track candidate. More...
 
int GetNumPreselectedTrackCands ()
 Returns the number of preselected track candidates. More...
 
TVector3 GetPreselectedTrackCircles (int i)
 Returns a the corresponding circle for a specific preselected track candidate. More...
 
int GetNumPreselectedTrackCircles ()
 Returns the number of preselected circles for track candidates. More...
 
PndTrack GetMergedTrack (int i)
 Returns a specific found track. More...
 
int GetNumMergedTracks ()
 Returns the number of found tracks. More...
 
std::map< FairLink, FairHit * > GetMapFairLinktoFairHit ()
 Returns a specific found track candidate. More...
 
PndHoughDataGetData ()
 Returns the data class of the HoughTrackFinder. More...
 

Detailed Description

PndHoughTrackFinder

Author
Anna Alicke a.ali.nosp@m.cke@.nosp@m.fz-ju.nosp@m.elic.nosp@m.h.de
Since
29.10.2018 23.11.2021
Version
3.1

PANDA class for finding tracks based on a hough transformation Task level RECO

Definition at line 32 of file PndHoughTrackFinder.h.

Constructor & Destructor Documentation

◆ PndHoughTrackFinder() [1/2]

PndHoughTrackFinder::PndHoughTrackFinder ( )
inline

Definition at line 34 of file PndHoughTrackFinder.h.

34 {};

◆ PndHoughTrackFinder() [2/2]

PndHoughTrackFinder::PndHoughTrackFinder ( TClonesArray *  tubeArray)
inline

Definition at line 36 of file PndHoughTrackFinder.h.

36  : fNbins1(450), fNbins2(450), fNBinsSeg(90.), fBz(2.), fCutMergeByHoughSpace(5.), fWithGPU(kFALSE), fWithGhostReduction(kTRUE)
37  {
38  // Generate TrackFinderData-Object
39  fData = new PndHoughData(tubeArray);
40  fCATrackFinder = new PndSttCA(tubeArray);
41  ioman = FairRootManager::Instance();
42  };

◆ ~PndHoughTrackFinder()

virtual PndHoughTrackFinder::~PndHoughTrackFinder ( )
inlinevirtual

Destructor

Definition at line 45 of file PndHoughTrackFinder.h.

46  {
47  delete fData;
48  delete fCATrackFinder;
49 
50  delete fPndHoughTransformation;
51  delete fPndHoughPreprocessing;
52  delete fPndHoughMerge;
53  delete fPndHoughSegment;
54  delete fPndHoughUtilities;
55  delete fPndHoughTrackCorrection;
56  }

Member Function Documentation

◆ AddHits()

void PndHoughTrackFinder::AddHits ( TClonesArray *  hits,
TString  branchName 
)

Adds hits to the data structure of the HoughTrackFinder.

Referenced by Reset().

◆ AddOtherDetectorHits()

void PndHoughTrackFinder::AddOtherDetectorHits ( int  i,
TString  type 
)

Referenced by CreateNeighborhood().

◆ AddSkewedHits()

void PndHoughTrackFinder::AddSkewedHits ( int  i)

Referenced by CreateNeighborhood().

◆ calcPhiRange()

TVector2 PndHoughTrackFinder::calcPhiRange ( PndTrackCand trackCand)

Referenced by CreateNeighborhood().

◆ CalcRatioSameHits()

double PndHoughTrackFinder::CalcRatioSameHits ( PndApollonius::TripletSolution sol,
std::vector< PndApollonius::TripletSolution > &  AlreadyFoundSolutions 
)

Referenced by CreateNeighborhood().

◆ CombineIdenticalSolutionsFinal()

std::vector<PndApollonius::TripletSolution> PndHoughTrackFinder::CombineIdenticalSolutionsFinal ( std::vector< PndApollonius::TripletSolution > &  solutions,
Double_t  ratioOfSameHits 
)

Referenced by CreateNeighborhood().

◆ CreateNeighborhood()

void PndHoughTrackFinder::CreateNeighborhood ( )
inline

Creates the neighborhood parameters for all investigated hits.

Definition at line 98 of file PndHoughTrackFinder.h.

References AddOtherDetectorHits(), AddSkewedHits(), calcPhiRange(), CalcRatioSameHits(), CombineIdenticalSolutionsFinal(), PndHoughData::CreateGEMNeighborhoodData(), PndHoughData::CreateSTTNeighborhoodData(), FindHoughMaxima(), FindTracks(), FromPndTrackToTripletSolution(), FromTripletSolutionToPndTrack(), i, IsInPhiRange(), and Preselection().

99  {
100  fData->CreateSTTNeighborhoodData();
101  fData->CreateGEMNeighborhoodData();
102  }
void CreateSTTNeighborhoodData()
For all STT hits all other STT neighbors are counted and stored in a map.
void CreateGEMNeighborhoodData()
For all GEM hits all other GEM hits in a certain distance (hier 1.5 cm) are counted and stored as nei...

◆ FindHoughMaxima()

void PndHoughTrackFinder::FindHoughMaxima ( )

Performs a Hough transformation for all preselected tracklets. The found track parameters are stored in fPreselectedTrackCircles.

Referenced by CreateNeighborhood().

◆ FindTracks()

void PndHoughTrackFinder::FindTracks ( )

Main function of the HoughTrackFinder, which finds the tracks.

Referenced by CreateNeighborhood().

◆ FromPndTrackToTripletSolution()

PndApollonius::TripletSolution PndHoughTrackFinder::FromPndTrackToTripletSolution ( PndTrack track,
PndHoughData fData 
)

Referenced by CreateNeighborhood().

◆ FromTripletSolutionToPndTrack()

PndTrack PndHoughTrackFinder::FromTripletSolutionToPndTrack ( PndApollonius::TripletSolution sol,
Double_t  B 
)

Converts a TripletSolution to a PndTrack.

Parameters
[in]solThe TripletSolution
[out]resultThe PndTrack

Referenced by CreateNeighborhood().

◆ GetData()

PndHoughData* PndHoughTrackFinder::GetData ( )
inline

Returns the data class of the HoughTrackFinder.

Definition at line 155 of file PndHoughTrackFinder.h.

155 { return fData; };

◆ GetMapFairLinktoFairHit()

std::map<FairLink, FairHit *> PndHoughTrackFinder::GetMapFairLinktoFairHit ( )
inline

Returns a specific found track candidate.

Returns the number of found track candidates. Returns a map linking FairLinks to the corresponding FairHits.

Definition at line 152 of file PndHoughTrackFinder.h.

References PndHoughData::GetMapFairLinktoFairHit().

152 { return fData->GetMapFairLinktoFairHit(); };
std::map< FairLink, FairHit * > GetMapFairLinktoFairHit() const
Returns the map linking FairLinks to FairHits.
Definition: PndHoughData.h:92

◆ GetMergedTrack()

PndTrack PndHoughTrackFinder::GetMergedTrack ( int  i)
inline

Returns a specific found track.

Definition at line 140 of file PndHoughTrackFinder.h.

References PndHoughMerge::GetMergedTrack().

140 { return fPndHoughMerge->GetMergedTrack(i); };
unsigned int i
Definition: P4_F32vec4.h:21
PndTrack GetMergedTrack(int i)
Returns a specific merged track.
Definition: PndHoughMerge.h:66

◆ GetNumMergedTracks()

int PndHoughTrackFinder::GetNumMergedTracks ( )
inline

Returns the number of found tracks.

Definition at line 143 of file PndHoughTrackFinder.h.

References PndHoughMerge::GetNumMergedTracks().

143 { return fPndHoughMerge->GetNumMergedTracks(); };
int GetNumMergedTracks()
Returns a specific merged track candidate.
Definition: PndHoughMerge.h:70

◆ GetNumPreselectedTrackCands()

int PndHoughTrackFinder::GetNumPreselectedTrackCands ( )
inline

Returns the number of preselected track candidates.

Definition at line 131 of file PndHoughTrackFinder.h.

131 { return fPreselectedTrackCands.size(); };

◆ GetNumPreselectedTrackCircles()

int PndHoughTrackFinder::GetNumPreselectedTrackCircles ( )
inline

Returns the number of preselected circles for track candidates.

Definition at line 137 of file PndHoughTrackFinder.h.

137 { return fPreselectedTrackCircles.size(); };

◆ GetPreselectedTrackCand()

PndTrackCand PndHoughTrackFinder::GetPreselectedTrackCand ( int  i)
inline

Returns a specific preselected track candidate.

Definition at line 128 of file PndHoughTrackFinder.h.

References i.

128 { return fPreselectedTrackCands[i]; };
unsigned int i
Definition: P4_F32vec4.h:21

◆ GetPreselectedTrackCircles()

TVector3 PndHoughTrackFinder::GetPreselectedTrackCircles ( int  i)
inline

Returns a the corresponding circle for a specific preselected track candidate.

Definition at line 134 of file PndHoughTrackFinder.h.

References i.

134 { return fPreselectedTrackCircles[i]; };
unsigned int i
Definition: P4_F32vec4.h:21

◆ Init()

void PndHoughTrackFinder::Init ( )
inline

Initializes the data structure and the Hough space of the HoughtrackFinder.

Definition at line 76 of file PndHoughTrackFinder.h.

References PndHoughData::Init(), and PndSttCA::SetUseGPU().

77  {
78  fData->Init(fNbins1, fNbins2);
79  fCATrackFinder->SetUseGPU(fWithGPU);
80  }
void Init(int NBins1=450, int NBins2=450)
Initializes the Hough space.
Definition: PndHoughData.h:53
void SetUseGPU(Bool_t val)
Definition: PndSttCA.h:49

◆ IsInPhiRange()

bool PndHoughTrackFinder::IsInPhiRange ( FairHit *  hit,
double  phiLow,
double  phiHigh 
)

Referenced by CreateNeighborhood().

◆ Preselection()

void PndHoughTrackFinder::Preselection ( )

Here all data are preselected in smaller tracklets.

Referenced by CreateNeighborhood().

◆ Reset()

void PndHoughTrackFinder::Reset ( )
inline

Resets the data for a new event.

Definition at line 83 of file PndHoughTrackFinder.h.

References AddHits(), PndHoughData::clear(), PndSttCA::Reset(), and PndSttCA::SetUseGPU().

84  {
85  fData->clear();
86 
87  fCATrackFinder->SetUseGPU(fWithGPU);
88  fCATrackFinder->Reset();
89 
90  fPreselectedTrackCands.clear();
91  fPreselectedTrackCircles.clear();
92  }
void clear()
Clears all data maps.
Definition: PndHoughData.h:62
void Reset()
Definition: PndSttCA.h:76
void SetUseGPU(Bool_t val)
Definition: PndSttCA.h:49

◆ SetBinningX()

virtual void PndHoughTrackFinder::SetBinningX ( double  bin)
inlinevirtual

Sets the number of bins in x direction for the Hough space.

Definition at line 59 of file PndHoughTrackFinder.h.

59 { fNbins1 = bin; };

◆ SetBinningY()

virtual void PndHoughTrackFinder::SetBinningY ( double  bin)
inlinevirtual

Sets the number of bins in y direction for the Hough space.

Definition at line 61 of file PndHoughTrackFinder.h.

61 { fNbins2 = bin; };

◆ SetBz()

virtual void PndHoughTrackFinder::SetBz ( double  B)
inlinevirtual

Sets the z component of the magnetic field.

Definition at line 65 of file PndHoughTrackFinder.h.

65 { fBz = B; };

◆ SetCombinedSkewed()

virtual void PndHoughTrackFinder::SetCombinedSkewed ( TClonesArray *  skewed)
inlinevirtual

Definition at line 74 of file PndHoughTrackFinder.h.

74 { fCombinedSkewed = skewed; };

◆ SetCutMergeByHoughSpace()

virtual void PndHoughTrackFinder::SetCutMergeByHoughSpace ( float  cut)
inlinevirtual

Sets the cut value for the distance of two maxima in the Hough space which have to be merged.

Definition at line 67 of file PndHoughTrackFinder.h.

References cut.

67 { fCutMergeByHoughSpace = cut; }

◆ SetNBinsSeg()

virtual void PndHoughTrackFinder::SetNBinsSeg ( Int_t  n)
inlinevirtual

Sets the number of bins used for the segmentation preselection algorithm.

Definition at line 63 of file PndHoughTrackFinder.h.

63 { fNBinsSeg = n; };

◆ SetPreselectedTrackCands()

virtual void PndHoughTrackFinder::SetPreselectedTrackCands ( std::vector< PndTrackCand cands)
inlinevirtual

Definition at line 72 of file PndHoughTrackFinder.h.

72 { fPreselectedTrackCands = cands; };

◆ SetWithGhostReduction()

virtual void PndHoughTrackFinder::SetWithGhostReduction ( bool  ghostred)
inlinevirtual

Sets a bool for deciding to use a ghost reduction.

Definition at line 71 of file PndHoughTrackFinder.h.

71 { fWithGhostReduction = ghostred; }

◆ SetWithGPU()

virtual void PndHoughTrackFinder::SetWithGPU ( bool  cuda)
inlinevirtual

Sets a bool for deciding to use cuda.

Definition at line 69 of file PndHoughTrackFinder.h.

69 { fWithGPU = cuda; }

◆ UseDefaultPreselection()

virtual void PndHoughTrackFinder::UseDefaultPreselection ( bool  pres)
inlinevirtual

Definition at line 73 of file PndHoughTrackFinder.h.

73 { fUseDefaultPreselection = pres; };

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