![]() |
PandaRoot
|
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< Triplet > | 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. More... | |
bool | IsTripletUsed (std::vector< TripletSolution > &solutions, Triplet &triplet) |
Checks if the triplet is already found in a good solution. More... | |
std::vector< TripletSolution > | GenerateTripletTracks (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< TripletSolution > | FindBestSolutions (std::vector< TripletSolution > &solutions) |
Select best solution(s) out of the 8 generated by triplet. More... | |
std::vector< TripletSolution > | CheckCombinedSolutions (std::vector< TripletSolution > &solutions, int nExpectedTracks) |
Combines and Checks all Solutions to generate only the true particle tracks. More... | |
std::vector< TripletSolution > | CheckSolutions (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< TripletSolution > | CombineIdenticalSolutions (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< TripletSolution > | CombineIdenticalSolutionsFinal (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... | |
A structure that defines all functions used for the Apollonius Triplet track finder.
Definition at line 252 of file PndApolloniusTriplet.h.
void PndApollonius::ApolloniusTripletFunctions::AddOtherDetectors | ( | vector< TripletSolution > & | solutions, |
PndSttStrawMap * | fStrawMap, | ||
std::map< TString, TClonesArray *> & | fBranchMap, | ||
TString | sttname | ||
) |
Add MVD and GEM hits to solutions.
[in] | solutions | A vector of all solutions for one triplet |
[in] | fStrawMap | The geometry of the STT |
[in] | fBranchMap | All hits that are still not assigned to a track |
[in] | sttname | The name of the original STT branch |
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.
[in] | circle | The circle parameters |
[in] | m | The slope of the line (y = m*x + b) |
[in] | b | The y axis intersection of the line |
[in] | Ax | A control parameter that is used if the line is the x-axis |
[out] | result | A vector of all solutions for one triplet |
double PndApollonius::ApolloniusTripletFunctions::CalcRatioSameHits | ( | TripletSolution & | sol, |
std::vector< TripletSolution > & | AlreadyFoundSolutions | ||
) |
Determins how many hits of two solutions are identical.
[in] | sol | The solution of interest |
[in] | AlreadyFoundSolutions | All already found solutions |
[out] | result | maximum ratio of identical hits |
std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CheckCombinedSolutions | ( | std::vector< TripletSolution > & | solutions, |
int | nExpectedTracks | ||
) |
Combines and Checks all Solutions to generate only the true particle tracks.
[in] | solutions | A vector of the best candidates for one triplet |
[in] | nExpectedTracks | Number of expected tracks. |
[out] | result | A vector of found track candidates. |
void PndApollonius::ApolloniusTripletFunctions::CheckContinuitySolutions | ( | std::vector< TripletSolution > & | solutions, |
PndSttGeometryMap * | fGeometryMap | ||
) |
Checks if a track candidate is continuous in the STT.
[in] | solutions | A vector of possible track solutions |
[in] | fGeometryMap | The geometry of the detector to identify skewed layers |
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.
[in] | solutions | A vector of the best candidates for one triplet |
[in] | combinations | A vector of a vector containing all tracks that might belong together |
[out] | result | A vector of found track candidates. |
std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CombineIdenticalSolutions | ( | std::vector< TripletSolution > & | solutions | ) |
Combines identical solutions to one solution.
[in] | solutions | A vector of all track solutions before merging |
[out] | result | A vector of all track solutions after merging of identical solutions |
std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::CombineIdenticalSolutionsFinal | ( | std::vector< TripletSolution > & | solutions, |
Double_t | ratioOfSameHits = 0.6 |
||
) |
Combines identical solutions.
[in] | solutions | The solution of interest |
[in] | ratioOfSameHits | Ratio of same hits used as threshold to Combine the solutions |
[out] | result | A vector of found solutions |
bool PndApollonius::ApolloniusTripletFunctions::ContainsTriplet | ( | Triplet & | triplet, |
TripletSolution & | solution | ||
) |
Determines if a solution already contains a triplet.
[in] | triplet | The triplet that is investigated |
[in] | solution | The solution that is investigated if the triplet is alraedy contained |
ReductionMaps PndApollonius::ApolloniusTripletFunctions::CreateMaps | ( | TripletValues & | triplets, |
std::map< FairLink, int > & | fMapHitstoCATracklet | ||
) |
Created maps that connect the hits with a corresponding CA tracklet.
[in] | triplets | All inner, mid and outer tubes |
[in] | fMapHitstoCATracklet | A map that connects each hit to the corresponding CA tracklet |
double PndApollonius::ApolloniusTripletFunctions::DistanceCirclePoint | ( | TVector3 & | circle, |
FairHit * | hit | ||
) |
Determines the distance between a point and a circle.
[in] | circle | The circle parameters |
[in] | hit | The hit |
[out] | result | The distance between the point and the circle |
double PndApollonius::ApolloniusTripletFunctions::DistanceCircleSttHit | ( | TVector3 & | circle, |
PndSttHit * | sttHit | ||
) |
Determines the distance between a STT Hit and a circle.
[in] | circle | The circle parameters |
[in] | sttHit | The STT hit |
[out] | result | The distance between the STT hit and the circle |
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.
[in] | circle | The circle parameters |
[in] | sttHit | The STT hit |
[in] | sqaredDistance | The squared distance between the center of the circle and the center of the STT Hits |
[out] | result | The distance between the STT hit and the circle |
double PndApollonius::ApolloniusTripletFunctions::DistanceLinePoint | ( | TVector3 & | circle, |
FairHit * | hit | ||
) |
Determines the distance between a point and a line.
[in] | circle | The circle parameters |
[in] | hit | The point |
[out] | result | The distance between the point and the circle |
|
inline |
Determines the distance between a STT Hit and a line if the squared distance between the line and hit are already known.
[in] | circle | The circle parameters |
[in] | sttHit | The STT hit |
[in] | sqaredDistance | The squared distance between the center of the circle and the center of the STT Hits |
[out] | result | The distance between the STT hit and the circle |
Definition at line 384 of file PndApolloniusTriplet.h.
References sqrt().
double PndApollonius::ApolloniusTripletFunctions::DistanceLineSttHit | ( | TVector3 & | circle, |
PndSttHit * | sttHit | ||
) |
Determines the distance between a STT Hit and a line.
[in] | circle | The circle parameters |
[in] | sttHit | The STT hit |
[out] | result | The distance between the STT hit and the circle |
std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::FindBestSolutions | ( | std::vector< TripletSolution > & | solutions | ) |
Select best solution(s) out of the 8 generated by triplet.
[in] | solutions | A vector of all possible track candidates for one triplet |
[out] | result | A vector of the best candidates for one triplet |
TripletSolution PndApollonius::ApolloniusTripletFunctions::FindHitsCloseToCircle | ( | std::vector< PndSttHit *> & | sttHits, |
TVector3 & | circle, | ||
double & | fDistanceThresholdSTTFar, | ||
PndSttGeometryMap * | fGeometryMap | ||
) |
Finds all hits that are close to a specific circle.
[in] | sttHits | A vector of all stt hits in a preselected group |
[in] | circle | An apollonius circle |
[in] | fDistanceThresholdSTTFar | The distance threshold used to define an STT hit to be close to the circle |
[in] | fGeometryMap | The Geometry of detector to check if hits are skewed layer |
[out] | result | A vector of all STT hits that are close to the circle |
PndTrack PndApollonius::ApolloniusTripletFunctions::FromTripletSolutionToPndTrack | ( | PndApollonius::TripletSolution & | sol, |
Double_t | B | ||
) |
Converts a TripletSolution to a PndTrack.
[in] | sol | The TripletSolution |
[out] | result | The PndTrack |
PndTrack PndApollonius::ApolloniusTripletFunctions::FromTripletSolutionToPndTrack | ( | PndApollonius::TripletSolution & | sol, |
Double_t | B, | ||
PndTrackCand & | cand | ||
) |
Converts a TripletSolution to a PndTrack.
[in] | sol | The TripletSolution |
[in] | cand | A PndTrackCand that is different from the one chosen in the sol. |
[out] | result | The PndTrack |
std::vector<TripletSolution> PndApollonius::ApolloniusTripletFunctions::GenerateTripletTracks | ( | Triplet | triplet, |
std::vector< PndSttHit *> & | sttHits, | ||
PndSttGeometryMap * | fGeometryMap | ||
) |
Generate tracks for one triplet.
[in] | triplet | One Triplet |
[in] | sttHits | All STT hits |
[in] | fGeometryMap | The geometry of the detector |
[out] | result | A vector of all solutions for one triplet |
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.
[in] | hits | STTHits of one preselected group |
[in] | fGeometryMap | The Geometry of the detector to get the STT row |
[in] | fAllHitsCounter | Counts 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] | result | A map that connects each row with the hits in that row. |
std::map<FairLink, int> PndApollonius::ApolloniusTripletFunctions::GetHitsToCAMap | ( | PndSttCA * | fCATrackFinder | ) |
Returns a map that connects hits to the corresponding CA tracklet.
[in] | fCATrackFinder | The Cellular Automaton |
std::vector<std::vector<int> > PndApollonius::ApolloniusTripletFunctions::GetKOutOfN | ( | int | k, |
int | n | ||
) |
Determines all possible combinations of tracks.
[in] | k | The number of expected tracks |
[in] | n | The number of existing tracks |
[out] | result | A vector containing all possible index combinations |
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.
[in] | hits | STTHits of one preselected group |
[in] | fGeometryMap | The Geometry of the detector to get the STT row |
[in] | fAllHitsCounter | Counts 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] | fIsStrongCurling | A 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] | result | A 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 |
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
[in] | solutions | A vector of possible track soluutions |
[in] | combinations | A possible combination for tracks that might be the same track |
[out] | result | A vector of all tubes of all tracks in one combination. |
bool PndApollonius::ApolloniusTripletFunctions::IsContinuous | ( | TripletSolution & | solution, |
PndSttGeometryMap * | fGeometryMap | ||
) |
Checks if the found STT hits are continuous.
[in] | solutions | A vector of all solutions for one triplet |
[in] | fGeometryMap | The geometry of the detector to identify skewed layers |
[out] | bool |
bool PndApollonius::ApolloniusTripletFunctions::IsTripletUsed | ( | std::vector< TripletSolution > & | solutions, |
Triplet & | triplet | ||
) |
Checks if the triplet is already found in a good solution.
[in] | solutions | All already found good solutions |
[in] | triplet | One Triplet |
[out] | bool | is already found (true) or not (false) |
double PndApollonius::ApolloniusTripletFunctions::MeanSquareDistance | ( | TripletSolution & | solution | ) |
Determines the mean square distance of the hits to the circle.
[in] | solution | The found track |
[out] | result | The mean square distance of the hits to the circle |
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.
[in] | triplets | All inner, mid and outer tubes |
[in] | fMapHitstoCATracklet | A map that connects each hit to the corresponding CA tracklet |
[in] | sttHits | All STT hits |
[in] | fCATrackFinder | The Cellular Automaton |
[in] | fGeometryMap | The Geometry of the detector |
[in] | fMinDistance | A minimum distance between the innermost and outermost hit |
[in] | fWithCombiReduction | A bool to test if the number of combinations should be reduced or to use all combinations |
[out] | result | A vector of triplets |
double PndApollonius::ApolloniusTripletFunctions::SquaredDistanceLineSttHit | ( | TVector3 & | circle, |
PndSttHit * | sttHit | ||
) |
Determines the squared distance between a STT Hit and a line.
[in] | circle | The circle parameters |
[in] | sttHit | The STT hit |
[out] | result | The squred distance between the STT hit and the circle |
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.
[in] | Rows | The row frum which to choose the tubes |
[in] | tubeStructure | A 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] | fMapHitstoCATracklet | A map that connects hits to the corresponding CA tracklet |
[in] | position | An index that indicates if the first (0), mid (1) od last (2) row is reduced. |
[out] | result | Stt hits chosen for combination |