25 #include "StFgtHHTracking.h"
30 StFgtHHTracking::StFgtHHTracking(
const Char_t* name ) :
StFgtTracking( name ), mBeamPos(0,0), mMinRad( 2500 ), mMaxRad( 55000 ) { };
36 StFgtHHTracking::~StFgtHHTracking(){ };
38 void StFgtHHTracking::Clear(
const Option_t *opt ){
43 Int_t StFgtHHTracking::findTracks(){
49 StFgtTrPointVec::const_iterator iter1, iter2;
51 Float_t beamNorm2 = mBeamPos.Mod2();
53 for( Int_t disc1 = 0; disc1 < kFgtNumDiscs-1; ++disc1 ){
54 StFgtTrPointVec &pointVec1 = mPointVecPerDisc[ disc1 ];
56 for( iter1 = pointVec1.begin(); iter1 != pointVec1.end(); ++iter1 ){
57 TVector2 delta1 = (iter1->pos.XYvector() - mBeamPos);
60 Float_t m1 = - delta1.X() / delta1.Y();
61 Float_t b1 = ( iter1->pos.Perp2() - beamNorm2 ) / delta1.Y() * 0.5;
70 for( Int_t disc2 = disc1+1; disc2 < kFgtNumDiscs; ++disc2 ){
71 StFgtTrPointVec &pointVec2 = mPointVecPerDisc[ disc2 ];
73 for( iter2 = pointVec2.begin(); iter2 != pointVec2.end(); ++iter2 ){
74 TVector2 delta2 = (iter2->pos.XYvector() - mBeamPos);
77 Float_t m2 = - delta2.X() / delta2.Y();
78 Float_t b2 = ( iter2->pos.Perp2() - beamNorm2 ) / delta2.Y() * 0.5;
88 Float_t x0 = - ( b2 - b1 )/( m2 - m1 );
89 Float_t y0 = m1*x0 + b1;
90 Float_t r = (mBeamPos - TVector2( x0, y0 )).Mod();
101 if( r > mMinRad && r < mMaxRad )
102 mHelixVec.push_back(
StFgtHHelix( iter1->ptIdx, iter2->ptIdx, x0, y0, r ) );
109 if( !mHelixVec.empty() ){
110 LOG_INFO << GetEventNumber() <<
" mPointsTot = " << mPointsTot << endm;
111 LOG_INFO << GetEventNumber() <<
" have " << mHelixVec.size() <<
" points in the Hough space" << endm;
113 StFgtHHelixVec::iterator helixIter;
114 for( helixIter = mHelixVec.begin(); helixIter != mHelixVec.end(); ++helixIter ){
115 LOG_INFO << helixIter->idx1 <<
' ' << helixIter->idx2 <<
' ' << atan2( helixIter->y0, helixIter->x0 ) <<
' ' << helixIter->r << endm;