26 #ifndef _ST_FGT_LH_TRACKING_
27 #define _ST_FGT_LH_TRACKING_
29 #include "StFgtTracking.h"
32 #include "StRoot/StFgtUtil/StFgtConsts.h"
35 std::vector< Int_t> pointIdx;
37 Double_t mx, my, bx, by;
41 StFgtLHLine() : mx(0), my(0), bx(0), by(0), vertZ(-1e11), res(0) { };
43 StFgtLHLine( UShort_t bits, Double_t mx_, Double_t my_, Double_t bx_, Double_t by_) :
44 discBits(bits), mx(mx_), my(my_), bx(bx_), by(by_) {
45 vertZ = ( mx || my ? -( mx*bx + my*by )/(mx*mx+my*my) : -1e11 );
53 Int_t pointPerDisc[ kFgtNumDiscs ];
54 Double_t resSqPerDisc[ kFgtNumDiscs ];
58 for( Int_t i=0; i<kFgtNumDiscs; ++i ){
60 resSqPerDisc[i] = 1e10;
65 for( Int_t i=0; i<kFgtNumDiscs; ++i ){
67 resSqPerDisc[i] = 1e10;
72 typedef std::vector< StFgtLHLine > StFgtLHLineVec;
73 typedef std::vector< StFgtLHTrack > StFgtLHTrackVec;
86 virtual void Clear(
const Option_t *opt =
"" );
88 void setNumPoints( Int_t val );
89 void setNumAgreeThres( Int_t val );
90 void setFitThres( Double_t val );
91 void setIncludeThres( Double_t val );
92 void setUseVertex( Bool_t val );
94 const StFgtLHTrackVec& getTrackVec();
98 StFgtLHLineVec mLineVec;
99 StFgtLHTrackVec mTrackVec;
104 Double_t mIncludeThres;
105 Int_t mNumAgreeThres;
109 virtual Int_t findTracks();
110 void makePointTuples( StFgtTrPointVec& points, Int_t startDiscIdx, UShort_t discBitArray );
111 void makeLine( StFgtTrPointVec& points, UShort_t discBitArray,
StFgtLHLine* linePtr = 0 );
113 Double_t perpDistSqLineToPoint(
const StFgtLHLine& line,
const TVector3& pointPos )
const;
123 inline Double_t StFgtLHTracking::perpDistSqLineToPoint(
const StFgtLHLine& line,
const TVector3& pointPos )
const {
124 Double_t dx = ( line.mx*pointPos.Z() + line.bx - pointPos.X() );
125 Double_t dy = ( line.my*pointPos.Z() + line.by - pointPos.Y() );
127 return dx*dx + dy*dy;
130 inline void StFgtLHTracking::setNumPoints( Int_t val ){ mPoints = val; };
131 inline void StFgtLHTracking::setNumAgreeThres( Int_t val ){ mNumAgreeThres = val; };
132 inline void StFgtLHTracking::setFitThres( Double_t val ){ mFitThres = val; };
133 inline void StFgtLHTracking::setIncludeThres( Double_t val ){ mIncludeThres = val; };
134 inline void StFgtLHTracking::setUseVertex( Bool_t val ){ mUseVertex = val; };
136 inline const StFgtLHTrackVec& StFgtLHTracking::getTrackVec(){
return mTrackVec; };