PandaRoot
PndRiemannTrackFinder Class Reference

#include <PndRiemannTrackFinder.h>

Inheritance diagram for PndRiemannTrackFinder:
PndMvdSttGemRiemannTrackFinder

Public Member Functions

 PndRiemannTrackFinder ()
 
virtual ~PndRiemannTrackFinder ()
 
void FindTracks ()
 Main function to start the riemann track finding. More...
 
void MergeTracks ()
 
void SetHits (std::vector< FairHit *> hits)
 
void AddHits (std::vector< FairHit *> hits, Int_t branchId)
 Replaces the existing array of hits with a new one. More...
 
void AddHits (TClonesArray *hits, Int_t branchId)
 Appends the new array of hits to the existing one. More...
 
void AddHit (FairHit *hit)
 
void SetVerbose (int val)
 Adds one new hit to the array of hits. More...
 
int NTracks ()
 
PndRiemannTrack GetTrack (int i)
 Returns the number of found tracks. More...
 
PndTrack GetPndTrack (int i, double B)
 Returns the track with the index i. More...
 
std::set< Int_t > GetTrackCandidates (int i)
 
std::vector< PndTrackCandGetTrackCand ()
 Returns the hits belonging to track i. More...
 
std::vector< PndTrackCandGetMergedTrackCands ()
 
PndTrackCand GetTrackCand (int i)
 
double HitDistance (FairHit *h1, FairHit *h2)
 Calculates the distance between two hits. More...
 
int HitTooClose (std::set< Int_t > hitsInUse, FairHit *newHit, double threshold)
 returns if and which hit was too close to the hit which is tested More...
 
void SetMaxPlaneDistance (double val)
 
void SetMaxSZDist (double val)
 
void SetMaxSZChi2 (double val)
 
void SetMinPointDist (double val)
 
void SetUseZeroPos (bool val)
 
void SetMinNumberOfHits (int val)
 
void SetCurvDiff (double val)
 
void SetDipDiff (double val)
 

Protected Member Functions

std::vector< std::set< Int_t > > GetStartTracks ()
 
bool CheckHitDistance (int hit1, int hit2)
 Tests if the distance is larger than fMinPointDistance. More...
 
bool CheckSZ (PndRiemannTrack aTrack)
 Tests the results of the sz fit. More...
 
bool CheckRiemannHit (PndRiemannTrack *track, PndRiemannHit *hit)
 
bool CheckHitInSameSensor (int hit1, int hit2)
 Tests if hits in the same sensor are selected. More...
 
bool CheckHitInTrack (std::set< int > hitIds, int hit)
 Check if this HitId is used in the track already. More...
 
bool CheckZeroPassing (std::set< int > hitIds, int hit)
 If the track contains (0,0) all points have to go forward or all have to go backward. More...
 
PndRiemannTrack CreateRiemannTrack (std::set< Int_t > aHits)
 Creates a PndRiemannTrack from an array of indices of Hits. More...
 
bool TrackExists (std::set< Int_t > hitsInTrack)
 
std::vector< int > FindTracksWithSimilarParameters (int TrackInd, std::vector< int > &TracksToTest, double curvDiff, double dipDiff)
 
std::vector< int > FindTracksWithSimilarHits (std::vector< int > &TracksToTest, std::vector< PndTrackCand > tempTrCnd, std::vector< int > &tempKillAfter)
 ---------—added by me More...
 
void RemoveTrack (int TrackInd, std::vector< int > &TrackList)
 
PndTrackCand CreateOneTrackCand (std::vector< int > tracks, std::vector< PndTrackCand > tempTrCnd)
 

Protected Attributes

std::vector< FairHit * > fHits
 Vector of all FairHits used for track finding (fitting) More...
 
std::vector< PndRiemannTrackfTracks
 Resulting Riemann Tracks. More...
 
std::vector< std::set< Int_t > > fHitsInTracks
 Vector of indizes which hits where used in which track. More...
 
std::vector< PndTrackCandfTrackCand
 List of track candidates. More...
 
std::vector< std::pair< double, double > > fCurvAndDipOfCand
 Curvature and dip of fPndTrackCand. More...
 
std::vector< PndTrackCandfMergedTrackCand
 
std::vector< std::set< int > > fHitsTooClose
 matrix of TrackNr and hits which are too close to one of the three starting points More...
 
std::map< int, FairLink > fMapHitToID
 map to convert the list of hits back into a FairLink More...
 
std::map< FairLink, int > fMapIDtoHit
 map to convert the list of detID/hitID hits into the list of hits for track finding More...
 
double fMaxPlaneDist
 Distance cut between new point and riemann plane. More...
 
double fMaxSZDist
 Distance cut between s-z coordinate of a new point and the sz-fit of the hits in the track. More...
 
double fMinPointDist
 Minimum distance between two points to use them as point for the base plane. More...
 
double fMaxSZChi2
 Maximum allowed Chi2 in an sz fit. More...
 
int fMinNumberOfHits
 Minimum number of hits in track necessary for a match. More...
 
double fCurvDiff
 TrackMerger parameter. More...
 
double fDipDiff
 TrackMerger parameter. More...
 
double fMagField
 size of the magnetic field in Tesla More...
 
int fVerbose
 
bool fUseZeroPos
 

Detailed Description

Definition at line 15 of file PndRiemannTrackFinder.h.

Constructor & Destructor Documentation

◆ PndRiemannTrackFinder()

PndRiemannTrackFinder::PndRiemannTrackFinder ( )

◆ ~PndRiemannTrackFinder()

virtual PndRiemannTrackFinder::~PndRiemannTrackFinder ( )
virtual

Member Function Documentation

◆ AddHit()

void PndRiemannTrackFinder::AddHit ( FairHit *  hit)
inline

Definition at line 25 of file PndRiemannTrackFinder.h.

References fHits.

25 { fHits.push_back(hit); };
std::vector< FairHit * > fHits
Vector of all FairHits used for track finding (fitting)

◆ AddHits() [1/2]

void PndRiemannTrackFinder::AddHits ( std::vector< FairHit *>  hits,
Int_t  branchId 
)

Replaces the existing array of hits with a new one.

Appends the new array of hits to the existing one

Referenced by SetHits().

◆ AddHits() [2/2]

void PndRiemannTrackFinder::AddHits ( TClonesArray *  hits,
Int_t  branchId 
)

Appends the new array of hits to the existing one.

◆ CheckHitDistance()

bool PndRiemannTrackFinder::CheckHitDistance ( int  hit1,
int  hit2 
)
protected

Tests if the distance is larger than fMinPointDistance.

◆ CheckHitInSameSensor()

bool PndRiemannTrackFinder::CheckHitInSameSensor ( int  hit1,
int  hit2 
)
protected

Tests if hits in the same sensor are selected.

◆ CheckHitInTrack()

bool PndRiemannTrackFinder::CheckHitInTrack ( std::set< int >  hitIds,
int  hit 
)
protected

Check if this HitId is used in the track already.

◆ CheckRiemannHit()

bool PndRiemannTrackFinder::CheckRiemannHit ( PndRiemannTrack track,
PndRiemannHit hit 
)
protected

◆ CheckSZ()

bool PndRiemannTrackFinder::CheckSZ ( PndRiemannTrack  aTrack)
protected

Tests the results of the sz fit.

◆ CheckZeroPassing()

bool PndRiemannTrackFinder::CheckZeroPassing ( std::set< int >  hitIds,
int  hit 
)
protected

If the track contains (0,0) all points have to go forward or all have to go backward.

◆ CreateOneTrackCand()

PndTrackCand PndRiemannTrackFinder::CreateOneTrackCand ( std::vector< int >  tracks,
std::vector< PndTrackCand tempTrCnd 
)
protected

◆ CreateRiemannTrack()

PndRiemannTrack PndRiemannTrackFinder::CreateRiemannTrack ( std::set< Int_t >  aHits)
protected

Creates a PndRiemannTrack from an array of indices of Hits.

◆ FindTracks()

void PndRiemannTrackFinder::FindTracks ( )

Main function to start the riemann track finding.

◆ FindTracksWithSimilarHits()

std::vector<int> PndRiemannTrackFinder::FindTracksWithSimilarHits ( std::vector< int > &  TracksToTest,
std::vector< PndTrackCand tempTrCnd,
std::vector< int > &  tempKillAfter 
)
protected

---------—added by me

◆ FindTracksWithSimilarParameters()

std::vector<int> PndRiemannTrackFinder::FindTracksWithSimilarParameters ( int  TrackInd,
std::vector< int > &  TracksToTest,
double  curvDiff,
double  dipDiff 
)
protected

◆ GetMergedTrackCands()

std::vector<PndTrackCand> PndRiemannTrackFinder::GetMergedTrackCands ( )
inline

Definition at line 32 of file PndRiemannTrackFinder.h.

References fMergedTrackCand.

32 { return fMergedTrackCand; }
std::vector< PndTrackCand > fMergedTrackCand

◆ GetPndTrack()

PndTrack PndRiemannTrackFinder::GetPndTrack ( int  i,
double  B 
)
inline

Returns the track with the index i.

Definition at line 29 of file PndRiemannTrackFinder.h.

References fTracks, and i.

29 { return fTracks[i].getPndTrack(B); };
std::vector< PndRiemannTrack > fTracks
Resulting Riemann Tracks.
unsigned int i
Definition: P4_F32vec4.h:21

◆ GetStartTracks()

std::vector<std::set<Int_t> > PndRiemannTrackFinder::GetStartTracks ( )
protected

◆ GetTrack()

PndRiemannTrack PndRiemannTrackFinder::GetTrack ( int  i)
inline

Returns the number of found tracks.

Definition at line 28 of file PndRiemannTrackFinder.h.

References fTracks, and i.

28 { return fTracks[i]; };
std::vector< PndRiemannTrack > fTracks
Resulting Riemann Tracks.
unsigned int i
Definition: P4_F32vec4.h:21

◆ GetTrackCand() [1/2]

std::vector<PndTrackCand> PndRiemannTrackFinder::GetTrackCand ( )
inline

Returns the hits belonging to track i.

Definition at line 31 of file PndRiemannTrackFinder.h.

References fTrackCand.

31 { return fTrackCand; }
std::vector< PndTrackCand > fTrackCand
List of track candidates.

◆ GetTrackCand() [2/2]

PndTrackCand PndRiemannTrackFinder::GetTrackCand ( int  i)
inline

Definition at line 33 of file PndRiemannTrackFinder.h.

References fTrackCand, HitDistance(), HitTooClose(), and i.

33 { return fTrackCand[i]; }
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< PndTrackCand > fTrackCand
List of track candidates.

◆ GetTrackCandidates()

std::set<Int_t> PndRiemannTrackFinder::GetTrackCandidates ( int  i)
inline

Definition at line 30 of file PndRiemannTrackFinder.h.

References fHitsInTracks, and i.

30 { return fHitsInTracks[i]; };
unsigned int i
Definition: P4_F32vec4.h:21
std::vector< std::set< Int_t > > fHitsInTracks
Vector of indizes which hits where used in which track.

◆ HitDistance()

double PndRiemannTrackFinder::HitDistance ( FairHit *  h1,
FairHit *  h2 
)

Calculates the distance between two hits.

Referenced by GetTrackCand().

◆ HitTooClose()

int PndRiemannTrackFinder::HitTooClose ( std::set< Int_t >  hitsInUse,
FairHit *  newHit,
double  threshold 
)

returns if and which hit was too close to the hit which is tested

Referenced by GetTrackCand().

◆ MergeTracks()

void PndRiemannTrackFinder::MergeTracks ( )

◆ NTracks()

int PndRiemannTrackFinder::NTracks ( )
inline

Definition at line 27 of file PndRiemannTrackFinder.h.

References fTrackCand.

27 { return fTrackCand.size(); };
std::vector< PndTrackCand > fTrackCand
List of track candidates.

◆ RemoveTrack()

void PndRiemannTrackFinder::RemoveTrack ( int  TrackInd,
std::vector< int > &  TrackList 
)
protected

◆ SetCurvDiff()

void PndRiemannTrackFinder::SetCurvDiff ( double  val)
inline

Definition at line 43 of file PndRiemannTrackFinder.h.

References fCurvDiff.

43 { fCurvDiff = val; }
double fCurvDiff
TrackMerger parameter.

◆ SetDipDiff()

void PndRiemannTrackFinder::SetDipDiff ( double  val)
inline

Definition at line 44 of file PndRiemannTrackFinder.h.

References fDipDiff.

44 { fDipDiff = val; }
double fDipDiff
TrackMerger parameter.

◆ SetHits()

void PndRiemannTrackFinder::SetHits ( std::vector< FairHit *>  hits)
inline

Definition at line 22 of file PndRiemannTrackFinder.h.

References AddHits(), and fHits.

22 { fHits = hits; };
std::vector< FairHit * > fHits
Vector of all FairHits used for track finding (fitting)

◆ SetMaxPlaneDistance()

void PndRiemannTrackFinder::SetMaxPlaneDistance ( double  val)
inline

Definition at line 37 of file PndRiemannTrackFinder.h.

References fMaxPlaneDist.

37 { fMaxPlaneDist = val; }
double fMaxPlaneDist
Distance cut between new point and riemann plane.

◆ SetMaxSZChi2()

void PndRiemannTrackFinder::SetMaxSZChi2 ( double  val)
inline

Definition at line 39 of file PndRiemannTrackFinder.h.

References fMaxSZChi2.

39 { fMaxSZChi2 = val; }
double fMaxSZChi2
Maximum allowed Chi2 in an sz fit.

◆ SetMaxSZDist()

void PndRiemannTrackFinder::SetMaxSZDist ( double  val)
inline

Definition at line 38 of file PndRiemannTrackFinder.h.

References fMaxSZDist.

38 { fMaxSZDist = val; }
double fMaxSZDist
Distance cut between s-z coordinate of a new point and the sz-fit of the hits in the track...

◆ SetMinNumberOfHits()

void PndRiemannTrackFinder::SetMinNumberOfHits ( int  val)
inline

Definition at line 42 of file PndRiemannTrackFinder.h.

References fMinNumberOfHits.

42 { fMinNumberOfHits = val; }
int fMinNumberOfHits
Minimum number of hits in track necessary for a match.

◆ SetMinPointDist()

void PndRiemannTrackFinder::SetMinPointDist ( double  val)
inline

Definition at line 40 of file PndRiemannTrackFinder.h.

References fMinPointDist.

40 { fMinPointDist = val; }
double fMinPointDist
Minimum distance between two points to use them as point for the base plane.

◆ SetUseZeroPos()

void PndRiemannTrackFinder::SetUseZeroPos ( bool  val)
inline

Definition at line 41 of file PndRiemannTrackFinder.h.

References fUseZeroPos.

◆ SetVerbose()

void PndRiemannTrackFinder::SetVerbose ( int  val)
inline

Adds one new hit to the array of hits.

Definition at line 26 of file PndRiemannTrackFinder.h.

References fVerbose.

◆ TrackExists()

bool PndRiemannTrackFinder::TrackExists ( std::set< Int_t >  hitsInTrack)
protected

Member Data Documentation

◆ fCurvAndDipOfCand

std::vector<std::pair<double, double> > PndRiemannTrackFinder::fCurvAndDipOfCand
protected

Curvature and dip of fPndTrackCand.

Definition at line 51 of file PndRiemannTrackFinder.h.

◆ fCurvDiff

double PndRiemannTrackFinder::fCurvDiff
protected

TrackMerger parameter.

Definition at line 61 of file PndRiemannTrackFinder.h.

Referenced by SetCurvDiff().

◆ fDipDiff

double PndRiemannTrackFinder::fDipDiff
protected

TrackMerger parameter.

Definition at line 62 of file PndRiemannTrackFinder.h.

Referenced by SetDipDiff().

◆ fHits

std::vector<FairHit *> PndRiemannTrackFinder::fHits
protected

Vector of all FairHits used for track finding (fitting)

Definition at line 47 of file PndRiemannTrackFinder.h.

Referenced by AddHit(), and SetHits().

◆ fHitsInTracks

std::vector<std::set<Int_t> > PndRiemannTrackFinder::fHitsInTracks
protected

Vector of indizes which hits where used in which track.

Definition at line 49 of file PndRiemannTrackFinder.h.

Referenced by GetTrackCandidates().

◆ fHitsTooClose

std::vector<std::set<int> > PndRiemannTrackFinder::fHitsTooClose
protected

matrix of TrackNr and hits which are too close to one of the three starting points

Definition at line 53 of file PndRiemannTrackFinder.h.

◆ fMagField

double PndRiemannTrackFinder::fMagField
protected

size of the magnetic field in Tesla

Definition at line 63 of file PndRiemannTrackFinder.h.

◆ fMapHitToID

std::map<int, FairLink> PndRiemannTrackFinder::fMapHitToID
protected

map to convert the list of hits back into a FairLink

Definition at line 54 of file PndRiemannTrackFinder.h.

◆ fMapIDtoHit

std::map<FairLink, int> PndRiemannTrackFinder::fMapIDtoHit
protected

map to convert the list of detID/hitID hits into the list of hits for track finding

Definition at line 55 of file PndRiemannTrackFinder.h.

◆ fMaxPlaneDist

double PndRiemannTrackFinder::fMaxPlaneDist
protected

Distance cut between new point and riemann plane.

Definition at line 56 of file PndRiemannTrackFinder.h.

Referenced by SetMaxPlaneDistance().

◆ fMaxSZChi2

double PndRiemannTrackFinder::fMaxSZChi2
protected

Maximum allowed Chi2 in an sz fit.

Definition at line 59 of file PndRiemannTrackFinder.h.

Referenced by SetMaxSZChi2().

◆ fMaxSZDist

double PndRiemannTrackFinder::fMaxSZDist
protected

Distance cut between s-z coordinate of a new point and the sz-fit of the hits in the track.

Definition at line 57 of file PndRiemannTrackFinder.h.

Referenced by SetMaxSZDist().

◆ fMergedTrackCand

std::vector<PndTrackCand> PndRiemannTrackFinder::fMergedTrackCand
protected

Definition at line 52 of file PndRiemannTrackFinder.h.

Referenced by GetMergedTrackCands().

◆ fMinNumberOfHits

int PndRiemannTrackFinder::fMinNumberOfHits
protected

Minimum number of hits in track necessary for a match.

Definition at line 60 of file PndRiemannTrackFinder.h.

Referenced by SetMinNumberOfHits().

◆ fMinPointDist

double PndRiemannTrackFinder::fMinPointDist
protected

Minimum distance between two points to use them as point for the base plane.

Definition at line 58 of file PndRiemannTrackFinder.h.

Referenced by SetMinPointDist().

◆ fTrackCand

std::vector<PndTrackCand> PndRiemannTrackFinder::fTrackCand
protected

List of track candidates.

Definition at line 50 of file PndRiemannTrackFinder.h.

Referenced by GetTrackCand(), and NTracks().

◆ fTracks

std::vector<PndRiemannTrack> PndRiemannTrackFinder::fTracks
protected

Resulting Riemann Tracks.

Definition at line 48 of file PndRiemannTrackFinder.h.

Referenced by GetPndTrack(), and GetTrack().

◆ fUseZeroPos

bool PndRiemannTrackFinder::fUseZeroPos
protected

Definition at line 66 of file PndRiemannTrackFinder.h.

Referenced by SetUseZeroPos().

◆ fVerbose

int PndRiemannTrackFinder::fVerbose
protected

Definition at line 65 of file PndRiemannTrackFinder.h.

Referenced by SetVerbose().


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