/** * \file LitTrackFinderNN.h * \author Andrey Lebedev * \date 2013 * \brief Parallel implementation of the nearest neighbor tracking algorithm. */ #ifndef LITTRACKFINDERNN_H_ #define LITTRACKFINDERNN_H_ #include "LitDetectorLayout.h" #include "LitHitData.h" #include #include using std::vector; using std::set; #include "LitScalPixelHit.h" #include "LitScalTrack.h" namespace lit { namespace parallel { class LitTrackFinderNN { public: /** * \brief Constructor. */ LitTrackFinderNN(); /** * \brief Destructor. */ virtual ~LitTrackFinderNN(); /** * \brief Main function for track reconstruction. * \param[in] Array of hits. * \param[in] Array of track seeds. * \param[out] Output array of reconstructed tracks. */ void DoFind( const vector& hits, const vector& trackSeeds, vector& tracks); /* Setters */ void SetDetectorLayout(const LitDetectorLayoutScal& layout) { fLayout = layout; } void SetNofIterations(int nofIterations) { fNofIterations = nofIterations; } void SetMaxNofMissingHits(const vector& maxNofMissingHits) { fMaxNofMissingHits = maxNofMissingHits; } void SetPDG(const vector& pdg) { fPDG = pdg; } void SetChiSqStripHitCut(const vector& chiSqStripHitCut) { fChiSqStripHitCut = chiSqStripHitCut; } void SetChiSqPixelHitCut(const vector& chiSqPixelHitCut) { fChiSqPixelHitCut = chiSqPixelHitCut; } void SetSigmaCoef(const vector& sigmaCoef) { fSigmaCoef = sigmaCoef; } protected: void ArrangeHits( const vector& hits); /** * \brief Initialize track seeds and copy to local array. */ void InitTrackSeeds( const vector& trackSeeds); void PropagateVirtualStations( LitTrackParamScal& par); void PropagateToStation( unsigned char stationId, LitTrackParamScal& par); /** * \brief Follow tracks through detector */ void FollowTracks(); void SelectTracks(); /** * \brief Write already used hits to a used hits set. */ void RemoveHits(); /** * \brief Copy tracks to output array. */ void CopyToOutput( vector& tracks); private: vector fTracks; // Local copy of tracks. LitHitData fHitData; // Hit storage. set fUsedHitsSet; // Sets with hits that have been used. set fUsedSeedsSet; // Set with track seeds that have been used. LitDetectorLayoutScal fLayout; // Detector layout int fNofIterations; // Number of tracking iterations int fIteration; // Current tracking iteration // Tracking parameters for each iteration vector fMaxNofMissingHits; // Maximum number of acceptable missing hits. vector fPDG; // Particle hypothesis for tracking. vector fChiSqStripHitCut; // Chi-square cut for strip hits. vector fChiSqPixelHitCut; // Chi-square cut for pixel hits. vector fSigmaCoef; // Sigma coefficient for preliminary hit selection }; } // namespace parallel } // namespace lit #endif /* LITTRACKFINDERNN_H_ */