PandaRoot
PndApollonius::ApolloniusTripletFunctions Struct Reference

A structure that defines all functions used for the Apollonius Triplet track finder. More...

#include <PndApolloniusTriplet.h>

Public Member Functions

std::map< int, std::vector< PndSttHit * > > GetAllTubesByRow (std::vector< PndSttHit *> hits, PndSttGeometryMap *fGeometryMap, int &fAllHitsCounter)
 Sorts all STT hits by row and returns a map that connects each row with the hits in that row. More...
 
std::map< int, std::vector< std::vector< PndSttHit * > > > GetTubeStructure (std::vector< PndSttHit *> hits, PndSttGeometryMap *fGeometryMap, int &fAllHitsCounter, bool &fIsStrongCurling)
 Creates a map that connects each STT row with a set of groups. All STT hits in one group are directly adjacent to each other. More...
 
ReductionMaps CreateMaps (TripletValues &triplets, std::map< FairLink, int > &fMapHitstoCATracklet)
 Created maps that connect the hits with a corresponding CA tracklet. More...
 
std::vector< TripletReduceCombinatorics (TripletValues &triplets, std::map< FairLink, int > &fMapHitstoCATracklet, TClonesArray *sttHits, PndSttCA *fCATrackFinder, PndSttGeometryMap *fGeometryMap, double &fMinDistance, bool &fWithCombiReduction)
 Find triplet combinations with higher probability to be a proper one. More...
 
bool IsTripletUsed (std::vector< TripletSolution > &solutions, Triplet &triplet)
 Checks if the triplet is already found in a good solution. More...
 
std::vector< TripletSolutionGenerateTripletTracks (Triplet triplet, std::vector< PndSttHit *> &sttHits, PndSttGeometryMap *fGeometryMap)
 Generate tracks for one triplet. More...
 
std::vector< double > calcIntersectionPointCircleLine (std::vector< double > circle, double m, double b, double Ax)
 Determines the intersection points of a Circle and a Line. More...
 
TripletSolution FindHitsCloseToCircle (std::vector< PndSttHit *> &sttHits, TVector3 &circle, double &fDistanceThresholdSTTFar, PndSttGeometryMap *fGeometryMap)
 Finds all hits that are close to a specific circle. More...
 
double MeanSquareDistance (TripletSolution &solution)
 Determines the mean square distance of the hits to the circle. More...
 
double DistanceCirclePoint (TVector3 &circle, FairHit *hit)
 Determines the distance between a point and a circle. More...
 
double DistanceCircleSttHit (TVector3 &circle, PndSttHit *sttHit)
 Determines the distance between a STT Hit and a circle. More...
 
double DistanceCircleSttHit (TVector3 &circle, PndSttHit *sttHit, double &sqaredDistance)
 Determines the distance between a STT Hit and a circle if the squared distance between the ceneters of circle and hit are already known. More...
 
double DistanceLineSttHit (TVector3 &circle, PndSttHit *sttHit, double &squaredDistance)
 Determines the distance between a STT Hit and a line if the squared distance between the line and hit are already known. More...
 
double DistanceLineSttHit (TVector3 &circle, PndSttHit *sttHit)
 Determines the distance between a STT Hit and a line. More...
 
double SquaredDistanceLineSttHit (TVector3 &circle, PndSttHit *sttHit)
 Determines the squared distance between a STT Hit and a line. More...
 
double DistanceLinePoint (TVector3 &circle, FairHit *hit)
 Determines the distance between a point and a line. More...
 
void CheckContinuitySolutions (std::vector< TripletSolution > &solutions, PndSttGeometryMap *fGeometryMap)
 Checks if a track candidate is continuous in the STT. More...
 
bool IsContinuous (TripletSolution &solution, PndSttGeometryMap *fGeometryMap)
 Checks if the found STT hits are continuous. More...
 
void AddOtherDetectors (vector< TripletSolution > &solutions, PndSttStrawMap *fStrawMap, std::map< TString, TClonesArray *> &fBranchMap, TString sttname)
 Add MVD and GEM hits to solutions. More...
 
std::vector< TripletSolutionFindBestSolutions (std::vector< TripletSolution > &solutions)
 Select best solution(s) out of the 8 generated by triplet. More...
 
std::vector< TripletSolutionCheckCombinedSolutions (std::vector< TripletSolution > &solutions, int nExpectedTracks)
 Combines and Checks all Solutions to generate only the true particle tracks. More...
 
std::vector< TripletSolutionCheckSolutions (std::vector< TripletSolution > &solutions, std::vector< std::vector< int >> combinations)
 Check Combined Track Solutions if they are a possible solution. More...
 
std::vector< int > GetUniqueTubeIDs (std::vector< TripletSolution > &solutions, std::vector< int > combinations)
 returns a vector of all tubes of all tracks in one combination More...
 
std::vector< std::vector< int > > GetKOutOfN (int k, int n)
 Determines all possible combinations of tracks. More...
 
std::vector< TripletSolutionCombineIdenticalSolutions (std::vector< TripletSolution > &solutions)
 Combines identical solutions to one solution. More...
 
bool ContainsTriplet (Triplet &triplet, TripletSolution &solution)
 Determines if a solution already contains a triplet. More...
 
std::vector< PndSttHit * > TubeReduction (std::vector< std::pair< int, int >> &Rows, std::map< int, std::vector< std::vector< PndSttHit *>>> &tubeStructure, std::map< FairLink, int > &fMapHitstoCATracklet, int position)
 Reduces the number of tubes chosen for combination–> if several tubes in one region (inner, mid or outer) belong to the same CA tracklet only the last tube is chosen. More...
 
std::map< FairLink, int > GetHitsToCAMap (PndSttCA *fCATrackFinder)
 Returns a map that connects hits to the corresponding CA tracklet. More...
 
double CalcRatioSameHits (TripletSolution &sol, std::vector< TripletSolution > &AlreadyFoundSolutions)
 Determins how many hits of two solutions are identical. More...
 
std::vector< TripletSolutionCombineIdenticalSolutionsFinal (std::vector< TripletSolution > &solutions, Double_t ratioOfSameHits=0.6)
 Combines identical solutions. More...
 
PndTrack FromTripletSolutionToPndTrack (PndApollonius::TripletSolution &sol, Double_t B)
 Converts a TripletSolution to a PndTrack. More...
 
PndTrack FromTripletSolutionToPndTrack (PndApollonius::TripletSolution &sol, Double_t B, PndTrackCand &cand)
 Converts a TripletSolution to a PndTrack. More...
 

Detailed Description

A structure that defines all functions used for the Apollonius Triplet track finder.

Definition at line 252 of file PndApolloniusTriplet.h.

Member Function Documentation

◆ AddOtherDetectors()

void PndApollonius::ApolloniusTripletFunctions::AddOtherDetectors ( vector< TripletSolution > &  solutions,
PndSttStrawMap fStrawMap,
std::map< TString, TClonesArray *> &  fBranchMap,
TString  sttname 
)

Add MVD and GEM hits to solutions.

Parameters
[in]solutionsA vector of all solutions for one triplet
[in]fStrawMapThe geometry of the STT
[in]fBranchMapAll hits that are still not assigned to a track
[in]sttnameThe name of the original STT branch

◆ calcIntersectionPointCircleLine()

std::vector<double> PndApollonius::ApolloniusTripletFunctions::calcIntersectionPointCircleLine ( std::vector< double >  circle,
double  m,
double  b,
double  Ax 
)

Determines the intersection points of a Circle and a Line.

Parameters
[in]circleThe circle parameters
[in]mThe slope of the line (y = m*x + b)
[in]bThe y axis intersection of the line
[in]AxA control parameter that is used if the line is the x-axis
[out]resultA vector of all solutions for one triplet

◆ CalcRatioSameHits()

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

Determins how many hits of two solutions are identical.

Parameters
[in]solThe solution of interest
[in]AlreadyFoundSolutionsAll already found solutions
[out]resultmaximum ratio of identical hits

◆ CheckCombinedSolutions()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CheckCombinedSolutions ( std::vector< TripletSolution > &  solutions,
int  nExpectedTracks 
)

Combines and Checks all Solutions to generate only the true particle tracks.

Parameters
[in]solutionsA vector of the best candidates for one triplet
[in]nExpectedTracksNumber of expected tracks.
[out]resultA vector of found track candidates.

◆ CheckContinuitySolutions()

void PndApollonius::ApolloniusTripletFunctions::CheckContinuitySolutions ( std::vector< TripletSolution > &  solutions,
PndSttGeometryMap fGeometryMap 
)

Checks if a track candidate is continuous in the STT.

Parameters
[in]solutionsA vector of possible track solutions
[in]fGeometryMapThe geometry of the detector to identify skewed layers

◆ CheckSolutions()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CheckSolutions ( std::vector< TripletSolution > &  solutions,
std::vector< std::vector< int >>  combinations 
)

Check Combined Track Solutions if they are a possible solution.

Parameters
[in]solutionsA vector of the best candidates for one triplet
[in]combinationsA vector of a vector containing all tracks that might belong together
[out]resultA vector of found track candidates.

◆ CombineIdenticalSolutions()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CombineIdenticalSolutions ( std::vector< TripletSolution > &  solutions)

Combines identical solutions to one solution.

Parameters
[in]solutionsA vector of all track solutions before merging
[out]resultA vector of all track solutions after merging of identical solutions

◆ CombineIdenticalSolutionsFinal()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CombineIdenticalSolutionsFinal ( std::vector< TripletSolution > &  solutions,
Double_t  ratioOfSameHits = 0.6 
)

Combines identical solutions.

Parameters
[in]solutionsThe solution of interest
[in]ratioOfSameHitsRatio of same hits used as threshold to Combine the solutions
[out]resultA vector of found solutions

◆ ContainsTriplet()

bool PndApollonius::ApolloniusTripletFunctions::ContainsTriplet ( Triplet triplet,
TripletSolution solution 
)

Determines if a solution already contains a triplet.

Parameters
[in]tripletThe triplet that is investigated
[in]solutionThe solution that is investigated if the triplet is alraedy contained

◆ CreateMaps()

ReductionMaps PndApollonius::ApolloniusTripletFunctions::CreateMaps ( TripletValues triplets,
std::map< FairLink, int > &  fMapHitstoCATracklet 
)

Created maps that connect the hits with a corresponding CA tracklet.

Parameters
[in]tripletsAll inner, mid and outer tubes
[in]fMapHitstoCATrackletA map that connects each hit to the corresponding CA tracklet

◆ DistanceCirclePoint()

double PndApollonius::ApolloniusTripletFunctions::DistanceCirclePoint ( TVector3 &  circle,
FairHit *  hit 
)

Determines the distance between a point and a circle.

Parameters
[in]circleThe circle parameters
[in]hitThe hit
[out]resultThe distance between the point and the circle

◆ DistanceCircleSttHit() [1/2]

double PndApollonius::ApolloniusTripletFunctions::DistanceCircleSttHit ( TVector3 &  circle,
PndSttHit sttHit 
)

Determines the distance between a STT Hit and a circle.

Parameters
[in]circleThe circle parameters
[in]sttHitThe STT hit
[out]resultThe distance between the STT hit and the circle

◆ DistanceCircleSttHit() [2/2]

double PndApollonius::ApolloniusTripletFunctions::DistanceCircleSttHit ( TVector3 &  circle,
PndSttHit sttHit,
double &  sqaredDistance 
)

Determines the distance between a STT Hit and a circle if the squared distance between the ceneters of circle and hit are already known.

Parameters
[in]circleThe circle parameters
[in]sttHitThe STT hit
[in]sqaredDistanceThe squared distance between the center of the circle and the center of the STT Hits
[out]resultThe distance between the STT hit and the circle

◆ DistanceLinePoint()

double PndApollonius::ApolloniusTripletFunctions::DistanceLinePoint ( TVector3 &  circle,
FairHit *  hit 
)

Determines the distance between a point and a line.

Parameters
[in]circleThe circle parameters
[in]hitThe point
[out]resultThe distance between the point and the circle

◆ DistanceLineSttHit() [1/2]

double PndApollonius::ApolloniusTripletFunctions::DistanceLineSttHit ( TVector3 &  circle,
PndSttHit sttHit,
double &  squaredDistance 
)
inline

Determines the distance between a STT Hit and a line if the squared distance between the line and hit are already known.

Parameters
[in]circleThe circle parameters
[in]sttHitThe STT hit
[in]sqaredDistanceThe squared distance between the center of the circle and the center of the STT Hits
[out]resultThe distance between the STT hit and the circle

Definition at line 384 of file PndApolloniusTriplet.h.

References sqrt().

384 { return sqrt(squaredDistance); };
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:28

◆ DistanceLineSttHit() [2/2]

double PndApollonius::ApolloniusTripletFunctions::DistanceLineSttHit ( TVector3 &  circle,
PndSttHit sttHit 
)

Determines the distance between a STT Hit and a line.

Parameters
[in]circleThe circle parameters
[in]sttHitThe STT hit
[out]resultThe distance between the STT hit and the circle

◆ FindBestSolutions()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::FindBestSolutions ( std::vector< TripletSolution > &  solutions)

Select best solution(s) out of the 8 generated by triplet.

Parameters
[in]solutionsA vector of all possible track candidates for one triplet
[out]resultA vector of the best candidates for one triplet

◆ FindHitsCloseToCircle()

TripletSolution PndApollonius::ApolloniusTripletFunctions::FindHitsCloseToCircle ( std::vector< PndSttHit *> &  sttHits,
TVector3 &  circle,
double &  fDistanceThresholdSTTFar,
PndSttGeometryMap fGeometryMap 
)

Finds all hits that are close to a specific circle.

Parameters
[in]sttHitsA vector of all stt hits in a preselected group
[in]circleAn apollonius circle
[in]fDistanceThresholdSTTFarThe distance threshold used to define an STT hit to be close to the circle
[in]fGeometryMapThe Geometry of detector to check if hits are skewed layer
[out]resultA vector of all STT hits that are close to the circle

◆ FromTripletSolutionToPndTrack() [1/2]

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

Converts a TripletSolution to a PndTrack.

Parameters
[in]solThe TripletSolution
[out]resultThe PndTrack

◆ FromTripletSolutionToPndTrack() [2/2]

PndTrack PndApollonius::ApolloniusTripletFunctions::FromTripletSolutionToPndTrack ( PndApollonius::TripletSolution sol,
Double_t  B,
PndTrackCand cand 
)

Converts a TripletSolution to a PndTrack.

Parameters
[in]solThe TripletSolution
[in]candA PndTrackCand that is different from the one chosen in the sol.
[out]resultThe PndTrack

◆ GenerateTripletTracks()

std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::GenerateTripletTracks ( Triplet  triplet,
std::vector< PndSttHit *> &  sttHits,
PndSttGeometryMap fGeometryMap 
)

Generate tracks for one triplet.

Parameters
[in]tripletOne Triplet
[in]sttHitsAll STT hits
[in]fGeometryMapThe geometry of the detector
[out]resultA vector of all solutions for one triplet

◆ GetAllTubesByRow()

std::map<int, std::vector<PndSttHit *> > PndApollonius::ApolloniusTripletFunctions::GetAllTubesByRow ( std::vector< PndSttHit *>  hits,
PndSttGeometryMap fGeometryMap,
int &  fAllHitsCounter 
)

Sorts all STT hits by row and returns a map that connects each row with the hits in that row.

Parameters
[in]hitsSTTHits of one preselected group
[in]fGeometryMapThe Geometry of the detector to get the STT row
[in]fAllHitsCounterCounts all hits in the group to set a maximum number of hits, i.e. if too many hits are in a group no tracking is performed for that group
[out]resultA map that connects each row with the hits in that row.

◆ GetHitsToCAMap()

std::map<FairLink, int> PndApollonius::ApolloniusTripletFunctions::GetHitsToCAMap ( PndSttCA fCATrackFinder)

Returns a map that connects hits to the corresponding CA tracklet.

Parameters
[in]fCATrackFinderThe Cellular Automaton

◆ GetKOutOfN()

std::vector<std::vector<int> > PndApollonius::ApolloniusTripletFunctions::GetKOutOfN ( int  k,
int  n 
)

Determines all possible combinations of tracks.

Parameters
[in]kThe number of expected tracks
[in]nThe number of existing tracks
[out]resultA vector containing all possible index combinations

◆ GetTubeStructure()

std::map<int, std::vector<std::vector<PndSttHit *> > > PndApollonius::ApolloniusTripletFunctions::GetTubeStructure ( std::vector< PndSttHit *>  hits,
PndSttGeometryMap fGeometryMap,
int &  fAllHitsCounter,
bool &  fIsStrongCurling 
)

Creates a map that connects each STT row with a set of groups. All STT hits in one group are directly adjacent to each other.

Parameters
[in]hitsSTTHits of one preselected group
[in]fGeometryMapThe Geometry of the detector to get the STT row
[in]fAllHitsCounterCounts all hits in the group to set a maximum number of hits, i.e. if too many hits are in a group no tracking is performed for that group
[in]fIsStrongCurlingA group is defined as strongly curling if it has more than 5 separated groups in one row and more than 2 "curling rows". However this definition has to be improved
[out]resultA map connecting each row with groups of STT hits. If there are hits in one row that are adjacent these hits are declared as a group

◆ GetUniqueTubeIDs()

std::vector<int> PndApollonius::ApolloniusTripletFunctions::GetUniqueTubeIDs ( std::vector< TripletSolution > &  solutions,
std::vector< int >  combinations 
)

returns a vector of all tubes of all tracks in one combination

Parameters
[in]solutionsA vector of possible track soluutions
[in]combinationsA possible combination for tracks that might be the same track
[out]resultA vector of all tubes of all tracks in one combination.

◆ IsContinuous()

bool PndApollonius::ApolloniusTripletFunctions::IsContinuous ( TripletSolution solution,
PndSttGeometryMap fGeometryMap 
)

Checks if the found STT hits are continuous.

Parameters
[in]solutionsA vector of all solutions for one triplet
[in]fGeometryMapThe geometry of the detector to identify skewed layers
[out]bool

◆ IsTripletUsed()

bool PndApollonius::ApolloniusTripletFunctions::IsTripletUsed ( std::vector< TripletSolution > &  solutions,
Triplet triplet 
)

Checks if the triplet is already found in a good solution.

Parameters
[in]solutionsAll already found good solutions
[in]tripletOne Triplet
[out]boolis already found (true) or not (false)

◆ MeanSquareDistance()

double PndApollonius::ApolloniusTripletFunctions::MeanSquareDistance ( TripletSolution solution)

Determines the mean square distance of the hits to the circle.

Parameters
[in]solutionThe found track
[out]resultThe mean square distance of the hits to the circle

◆ ReduceCombinatorics()

std::vector<Triplet> PndApollonius::ApolloniusTripletFunctions::ReduceCombinatorics ( TripletValues triplets,
std::map< FairLink, int > &  fMapHitstoCATracklet,
TClonesArray *  sttHits,
PndSttCA fCATrackFinder,
PndSttGeometryMap fGeometryMap,
double &  fMinDistance,
bool &  fWithCombiReduction 
)

Find triplet combinations with higher probability to be a proper one.

Parameters
[in]tripletsAll inner, mid and outer tubes
[in]fMapHitstoCATrackletA map that connects each hit to the corresponding CA tracklet
[in]sttHitsAll STT hits
[in]fCATrackFinderThe Cellular Automaton
[in]fGeometryMapThe Geometry of the detector
[in]fMinDistanceA minimum distance between the innermost and outermost hit
[in]fWithCombiReductionA bool to test if the number of combinations should be reduced or to use all combinations
[out]resultA vector of triplets

◆ SquaredDistanceLineSttHit()

double PndApollonius::ApolloniusTripletFunctions::SquaredDistanceLineSttHit ( TVector3 &  circle,
PndSttHit sttHit 
)

Determines the squared distance between a STT Hit and a line.

Parameters
[in]circleThe circle parameters
[in]sttHitThe STT hit
[out]resultThe squred distance between the STT hit and the circle

◆ TubeReduction()

std::vector<PndSttHit *> PndApollonius::ApolloniusTripletFunctions::TubeReduction ( std::vector< std::pair< int, int >> &  Rows,
std::map< int, std::vector< std::vector< PndSttHit *>>> &  tubeStructure,
std::map< FairLink, int > &  fMapHitstoCATracklet,
int  position 
)

Reduces the number of tubes chosen for combination–> if several tubes in one region (inner, mid or outer) belong to the same CA tracklet only the last tube is chosen.

Parameters
[in]RowsThe row frum which to choose the tubes
[in]tubeStructureA map connecting each row with groups of STT hits. If there are hits in one row that are adjacent these hits are declared as a group
[in]fMapHitstoCATrackletA map that connects hits to the corresponding CA tracklet
[in]positionAn index that indicates if the first (0), mid (1) od last (2) row is reduced.
[out]resultStt hits chosen for combination

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