FairRoot/PandaRoot
|
#include <PndRiemannTrackFinder.h>
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< PndTrackCand > | GetTrackCand () |
Returns the hits belonging to track i. More... | |
std::vector< PndTrackCand > | GetMergedTrackCands () |
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< PndRiemannTrack > | fTracks |
Resulting Riemann Tracks. More... | |
std::vector< std::set< Int_t > > | fHitsInTracks |
Vector of indizes which hits where used in which track. More... | |
std::vector< PndTrackCand > | fTrackCand |
List of track candidates. More... | |
std::vector< std::pair< double, double > > | fCurvAndDipOfCand |
Curvature and dip of fPndTrackCand. More... | |
std::vector< PndTrackCand > | fMergedTrackCand |
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 |
Definition at line 15 of file PndRiemannTrackFinder.h.
PndRiemannTrackFinder::PndRiemannTrackFinder | ( | ) |
Definition at line 8 of file PndRiemannTrackFinder.cxx.
References fHits, fMapHitToID, fMapIDtoHit, fUseZeroPos, and pos.
|
virtual |
Definition at line 21 of file PndRiemannTrackFinder.cxx.
References fHits, and fUseZeroPos.
|
inline |
Definition at line 26 of file PndRiemannTrackFinder.h.
References fHits.
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
Definition at line 27 of file PndRiemannTrackFinder.cxx.
References fHits, fMapHitToID, fMapIDtoHit, and i.
void PndRiemannTrackFinder::AddHits | ( | TClonesArray * | hits, |
Int_t | branchId | ||
) |
Appends the new array of hits to the existing one.
Definition at line 44 of file PndRiemannTrackFinder.cxx.
References fHits, fMapHitToID, fMapIDtoHit, and i.
|
protected |
Tests if the distance is larger than fMinPointDistance.
Definition at line 238 of file PndRiemannTrackFinder.cxx.
References fHits, fMinPointDist, fVerbose, and HitDistance().
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), PndMvdSttGemRiemannTrackFinder::GetStartTracks(), GetStartTracks(), and PndMvdSttGemRiemannTrackFinder::GetTooCloseHitsInLayer().
|
protected |
Tests if hits in the same sensor are selected.
Definition at line 305 of file PndRiemannTrackFinder.cxx.
References fHits.
Referenced by PndMvdSttGemRiemannTrackFinder::GetStartTracks(), and GetStartTracks().
|
protected |
Check if this HitId is used in the track already.
Definition at line 320 of file PndRiemannTrackFinder.cxx.
References fVerbose.
Referenced by PndMvdSttGemRiemannTrackFinder::FindTracks().
|
protected |
Definition at line 331 of file PndRiemannTrackFinder.cxx.
References PndRiemannTrack::calcSZChi2(), PndRiemannTrack::dist(), fabs(), fMaxPlaneDist, fMaxSZChi2, fMaxSZDist, fVerbose, and PndRiemannTrack::szDist().
Referenced by FindTracks().
|
protected |
Tests the results of the sz fit.
Definition at line 249 of file PndRiemannTrackFinder.cxx.
References fMaxSZChi2, fVerbose, PndRiemannTrack::szChi2(), and PndRiemannTrack::szFit().
Referenced by GetStartTracks().
|
protected |
If the track contains (0,0) all points have to go forward or all have to go backward.
Definition at line 259 of file PndRiemannTrackFinder.cxx.
References fHits, fMapHitToID, fVerbose, and hit.
Referenced by PndMvdSttGemRiemannTrackFinder::FindTracks(), and PndMvdSttGemRiemannTrackFinder::GetStartTracks().
|
protected |
Definition at line 560 of file PndRiemannTrackFinder.cxx.
References PndTrackCand::AddHit(), PndTrackCandHit::GetDetId(), PndTrackCandHit::GetHitId(), PndTrackCand::GetNHits(), PndTrackCand::GetSortedHit(), hits, i, and map.
Referenced by MergeTracks().
|
protected |
Creates a PndRiemannTrack from an array of indices of Hits.
Definition at line 292 of file PndRiemannTrackFinder.cxx.
References PndRiemannTrack::addHit(), fHits, hit, PndRiemannTrack::refit(), and PndRiemannTrack::szFit().
Referenced by FindTracks(), and PndMvdSttGemRiemannTrackFinder::FindTracks().
void PndRiemannTrackFinder::FindTracks | ( | ) |
Main function to start the riemann track finding.
Definition at line 61 of file PndRiemannTrackFinder.cxx.
References PndTrackCand::AddHit(), PndRiemannTrack::addHit(), CheckHitDistance(), CheckRiemannHit(), CreateRiemannTrack(), PndRiemannTrack::dDip(), PndRiemannTrack::dip(), PndRiemannTrack::dR(), PndRiemannTrack::dX(), PndRiemannTrack::dY(), fCurvAndDipOfCand, fHits, fHitsInTracks, fHitsTooClose, fMapHitToID, fMinNumberOfHits, fTrackCand, fTracks, fVerbose, PndRiemannTrack::getNumHits(), GetStartTracks(), PndRiemannTrack::getSZm(), PndRiemannTrack::getSZt(), hits, n, PndRiemannTrack::orig(), p, r, PndRiemannTrack::r(), PndRiemannTrack::refit(), s, PndRiemannTrack::szFit(), TrackExists(), and TrackHits().
|
protected |
---------—added by me
Definition at line 448 of file PndRiemannTrackFinder.cxx.
References fVerbose, PndTrackCandHit::GetDetId(), PndTrackCandHit::GetHitId(), PndTrackCand::GetNHits(), PndTrackCand::GetSortedHit(), i, m, and RemoveTrack().
Referenced by MergeTracks().
|
protected |
Definition at line 412 of file PndRiemannTrackFinder.cxx.
References Double_t, fabs(), fCurvAndDipOfCand, fTrackCand, fVerbose, i, and RemoveTrack().
Referenced by MergeTracks().
|
inline |
Definition at line 33 of file PndRiemannTrackFinder.h.
References fMergedTrackCand.
|
inline |
Returns the track with the index i.
Definition at line 30 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
protected |
Definition at line 176 of file PndRiemannTrackFinder.cxx.
References PndRiemannTrack::addHit(), CheckHitDistance(), CheckHitInSameSensor(), CheckSZ(), fHits, fHitsTooClose, fVerbose, i, PndRiemannTrack::orig(), PndRiemannTrack::r(), PndRiemannTrack::refit(), and TrackExists().
Referenced by FindTracks().
|
inline |
Returns the number of found tracks.
Definition at line 29 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec().
|
inline |
Returns the hits belonging to track i.
Definition at line 32 of file PndRiemannTrackFinder.h.
References fTrackCand.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
Definition at line 34 of file PndRiemannTrackFinder.h.
References fTrackCand, and i.
|
inline |
Definition at line 31 of file PndRiemannTrackFinder.h.
References fHitsInTracks, and i.
double PndRiemannTrackFinder::HitDistance | ( | FairHit * | h1, |
FairHit * | h2 | ||
) |
Calculates the distance between two hits.
Definition at line 537 of file PndRiemannTrackFinder.cxx.
Referenced by CheckHitDistance(), and 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
Definition at line 547 of file PndRiemannTrackFinder.cxx.
References fabs(), fHits, fVerbose, h1, HitDistance(), and i.
void PndRiemannTrackFinder::MergeTracks | ( | ) |
Definition at line 354 of file PndRiemannTrackFinder.cxx.
References counter, CreateOneTrackCand(), fCurvDiff, fDipDiff, FindTracksWithSimilarHits(), FindTracksWithSimilarParameters(), fMergedTrackCand, fTrackCand, fVerbose, i, and RemoveTrack().
|
inline |
Definition at line 28 of file PndRiemannTrackFinder.h.
References fTrackCand.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
protected |
Definition at line 495 of file PndRiemannTrackFinder.cxx.
References i.
Referenced by FindTracksWithSimilarHits(), FindTracksWithSimilarParameters(), and MergeTracks().
|
inline |
Definition at line 44 of file PndRiemannTrackFinder.h.
References fCurvDiff, and val.
|
inline |
Definition at line 45 of file PndRiemannTrackFinder.h.
|
inline |
Definition at line 23 of file PndRiemannTrackFinder.h.
|
inline |
Definition at line 38 of file PndRiemannTrackFinder.h.
References fMaxPlaneDist, and val.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
Definition at line 40 of file PndRiemannTrackFinder.h.
References fMaxSZChi2, and val.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
Definition at line 39 of file PndRiemannTrackFinder.h.
References fMaxSZDist, and val.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
Definition at line 43 of file PndRiemannTrackFinder.h.
References fMinNumberOfHits, and val.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
Definition at line 41 of file PndRiemannTrackFinder.h.
References fMinPointDist, and val.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
inline |
|
inline |
Adds one new hit to the array of hits.
Definition at line 27 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinderTask::Exec(), and PndMvdRiemannTrackFinderTask::Exec().
|
protected |
Definition at line 506 of file PndRiemannTrackFinder.cxx.
References fHitsInTracks, fVerbose, and i.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), and GetStartTracks().
|
protected |
Curvature and dip of fPndTrackCand.
Definition at line 52 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), and FindTracksWithSimilarParameters().
|
protected |
TrackMerger parameter.
Definition at line 62 of file PndRiemannTrackFinder.h.
Referenced by MergeTracks(), and SetCurvDiff().
|
protected |
TrackMerger parameter.
Definition at line 63 of file PndRiemannTrackFinder.h.
Referenced by MergeTracks(), and SetDipDiff().
|
protected |
Vector of all FairHits used for track finding (fitting)
Definition at line 48 of file PndRiemannTrackFinder.h.
Referenced by AddHit(), PndMvdSttGemRiemannTrackFinder::AddHits(), AddHits(), PndMvdSttGemRiemannTrackFinder::CheckBoarderHitsStt(), CheckHitDistance(), CheckHitInSameSensor(), CheckZeroPassing(), CreateRiemannTrack(), FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), PndMvdSttGemRiemannTrackFinder::GetStartTracks(), GetStartTracks(), PndMvdSttGemRiemannTrackFinder::GetStrawSector(), HitTooClose(), PndRiemannTrackFinder(), SetHits(), and ~PndRiemannTrackFinder().
|
protected |
Vector of indizes which hits where used in which track.
Definition at line 50 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), GetTrackCandidates(), and TrackExists().
|
protected |
matrix of TrackNr and hits which are too close to one of the three starting points
Definition at line 54 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), PndMvdSttGemRiemannTrackFinder::GetStartTracks(), and GetStartTracks().
|
protected |
size of the magnetic field in Tesla
Definition at line 64 of file PndRiemannTrackFinder.h.
|
protected |
map to convert the list of hits back into a FairLink
Definition at line 55 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinder::AddHits(), AddHits(), CheckZeroPassing(), FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), PndMvdSttGemRiemannTrackFinder::GetStartTracks(), PndMvdSttGemRiemannTrackFinder::GetStrawSector(), and PndRiemannTrackFinder().
|
protected |
map to convert the list of detID/hitID hits into the list of hits for track finding
Definition at line 56 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinder::AddHits(), AddHits(), PndMvdSttGemRiemannTrackFinder::AssignGemHits(), PndMvdSttGemRiemannTrackFinder::AssignSkewedSttHits(), PndMvdSttGemRiemannTrackFinder::AssignSttHits(), PndMvdSttGemRiemannTrackFinder::CheckBoarderHitsStt(), PndMvdSttGemRiemannTrackFinder::GetStrawSector(), and PndRiemannTrackFinder().
|
protected |
Distance cut between new point and riemann plane.
Definition at line 57 of file PndRiemannTrackFinder.h.
Referenced by CheckRiemannHit(), PndMvdSttGemRiemannTrackFinder::GetMaxPlaneDist(), and SetMaxPlaneDistance().
|
protected |
Maximum allowed Chi2 in an sz fit.
Definition at line 60 of file PndRiemannTrackFinder.h.
Referenced by CheckRiemannHit(), CheckSZ(), PndMvdSttGemRiemannTrackFinder::GetMaxSZChi2(), and SetMaxSZChi2().
|
protected |
Distance cut between s-z coordinate of a new point and the sz-fit of the hits in the track.
Definition at line 58 of file PndRiemannTrackFinder.h.
Referenced by CheckRiemannHit(), PndMvdSttGemRiemannTrackFinder::CheckRiemannHitMvd(), and SetMaxSZDist().
|
protected |
Definition at line 53 of file PndRiemannTrackFinder.h.
Referenced by GetMergedTrackCands(), and MergeTracks().
|
protected |
Minimum number of hits in track necessary for a match.
Definition at line 61 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), and SetMinNumberOfHits().
|
protected |
Minimum distance between two points to use them as point for the base plane.
Definition at line 59 of file PndRiemannTrackFinder.h.
Referenced by CheckHitDistance(), and SetMinPointDist().
|
protected |
List of track candidates.
Definition at line 51 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), FindTracksWithSimilarParameters(), GetTrackCand(), MergeTracks(), and NTracks().
|
protected |
Resulting Riemann Tracks.
Definition at line 49 of file PndRiemannTrackFinder.h.
Referenced by FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), GetPndTrack(), and GetTrack().
|
protected |
Definition at line 67 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinder::GetStartTracks(), PndMvdSttGemRiemannTrackFinder::PndMvdSttGemRiemannTrackFinder(), PndRiemannTrackFinder(), SetUseZeroPos(), and ~PndRiemannTrackFinder().
|
protected |
Definition at line 66 of file PndRiemannTrackFinder.h.
Referenced by PndMvdSttGemRiemannTrackFinder::AddHits(), PndMvdSttGemRiemannTrackFinder::AssignGemHits(), PndMvdSttGemRiemannTrackFinder::AssignSkewedSttHits(), PndMvdSttGemRiemannTrackFinder::AssignSttHits(), PndMvdSttGemRiemannTrackFinder::CheckBoarderHitsStt(), CheckHitDistance(), CheckHitInTrack(), CheckRiemannHit(), PndMvdSttGemRiemannTrackFinder::CheckRiemannHitGem(), PndMvdSttGemRiemannTrackFinder::CheckRiemannHitMvd(), PndMvdSttGemRiemannTrackFinder::CheckRiemannHitSkewedStt(), PndMvdSttGemRiemannTrackFinder::CheckRiemannHitStt(), PndMvdSttGemRiemannTrackFinder::CheckSZ(), CheckSZ(), CheckZeroPassing(), FindTracks(), PndMvdSttGemRiemannTrackFinder::FindTracks(), FindTracksWithSimilarHits(), FindTracksWithSimilarParameters(), PndMvdSttGemRiemannTrackFinder::GetStartTracks(), GetStartTracks(), PndMvdSttGemRiemannTrackFinder::GetStrawSector(), HitTooClose(), MergeTracks(), SetVerbose(), and TrackExists().