// ------------------------------------------------------------------------- // ----- CbmSttTrackFinderHough header file ----- // ----- Created 28/03/06 by R. Castelijns ----- // ------------------------------------------------------------------------- /** CbmSttTrackFinderHough *@author R.Castelijns ** ** Hough track finder in the STT for simulated data. **/ #ifndef CBMSTTTRACKFINDERHOUGH #define CBMSTTTRACKFINDERHOUGH 1 #include "CbmSttTrackFinder.h" #include "CbmSttHoughAccumulatorNew.h" #include "TCanvas.h" #include using std::list; class TClonesArray; class CbmSttTrackFinderHough : public CbmSttTrackFinder { public: /** Default constructor **/ CbmSttTrackFinderHough(); /** Standard constructor **/ CbmSttTrackFinderHough(Int_t verbose); /** Destructor **/ virtual ~CbmSttTrackFinderHough(); /** Initialisation **/ virtual void Init(); /** Track finding algorithm ** This just reads MC truth (MCTracks and MCPoints), creates ** one StsTrack for each MCTrack and attaches the hits according ** to the MCTrack of the corresponding MCPoint ** *@param mHitArray Array of Stt hits *@param trackArray Array of CbmStsTrack ** *@value Number of tracks created **/ virtual Int_t DoFind(TClonesArray* trackArray); virtual void AddHitCollection(TClonesArray* mHitArray, TClonesArray* mPointArray) {fHitCollectionList.Add(mHitArray); fPointCollectionList.Add(mPointArray); } CbmSttHit* GetHitFromCollections(Int_t hitCounter); CbmMCPoint* GetPointFromCollections(Int_t hitCounter); private: // Int_t DoFindLinear(TClonesArray* mHitArray, TClonesArray* trackArray); Int_t DoFindCircular(TClonesArray* trackArray); void GetTrackletCircular(Double_t firstX, Double_t firstY, Double_t firstR, Double_t secondX, Double_t secondY, Double_t secondR, Double_t thirdX, Double_t thirdY, Double_t thirdR, Double_t *circleRadii, Double_t *circleCentersX, Double_t *circleCentersY) const; TCanvas *finderCanvas; void AddMissingHits(Double_t dSeed, Double_t pSeed, Double_t rSeed, vector &possibleHits); Bool_t CreateTracks(list *tmpTrackArray, TClonesArray *realTrackArray, Int_t &nTracks); /** Verbosity level **/ Int_t fVerbose; Int_t fEventCounter; Bool_t putStraw(Double_t xpos, Double_t ypos, Double_t radius); void plotAllStraws(); void GetTracklet(Double_t thisX, Double_t thisY, Double_t thisR, Double_t otherX, Double_t otherY, Double_t otherR, Double_t *contactPointsXWithOther, Double_t *contactPointsYWithOther, Double_t *angleWithOther, Double_t *contactPointsXAtOther, Double_t *contactPointsYAtOther) const; Int_t NumberOfLineCircleIntersections(Double_t xline1, Double_t yline1, Double_t xline2, Double_t yline2, Double_t xcircle, Double_t ycircle, Double_t rcircle) const; Double_t GetChiSquare(Double_t xCircleCenter, Double_t yCircleCenter, Double_t rCircle, CbmSttHit *pMhit); void ZoomTrack(Double_t &dSeed, Double_t &phiSeed, Double_t &rSeed, vector &hits); Double_t CalculateRadialHitCoordinatesCircular(Double_t xCenter, Double_t yCenter, Double_t radius, CbmSttHit *pMhit); CbmSttHoughAccumulatorNew *fAccumulator; TList fHitCollectionList; TList fPointCollectionList; ClassDef(CbmSttTrackFinderHough,1); }; #endif