--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/05/14 11:03:05 1.33 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/06/06 09:36:07 1.37 @@ -12,8 +12,13 @@ extern "C" { void dotrack_(int*, double*, double*, double*, double*, int*); void dotrack2_(int*, double*, double*, double*, double*,double*, double*, double*,int*); - void mini2_(int*,int*,int*); - void guess_(); + void mini2_(int*,int*,int*); + void guess_(); + void gufld_(float*, float*); + float risxeta2_(float *); + float risxeta3_(float *); + float risxeta4_(float *); + float risyeta2_(float *); } //-------------------------------------- @@ -360,6 +365,56 @@ } return (last_plane-first_plane+1); } +/** + * Returns the reduced chi-square of track x-projection + */ +Float_t TrkTrack::GetChi2X(){ + float chiq=0; + for(int ip=0; ip<6; ip++)if(XGood(ip))chiq+= pow((xv[ip]-xm[ip])/resx[ip],2.); + if(GetNX()>3)chiq=chiq/(GetNX()-3); + else chiq=0; + if(chiq==0)cout << " Float_t TrkTrack::GetChi2X() -- WARNING -- value not defined "<2)chiq=chiq/(GetNY()-2); + else chiq=0; + if(chiq==0)cout << " Float_t TrkTrack::GetChi2Y() -- WARNING -- value not defined "<3)lnl=lnl/(GetNX()-3); + else lnl=0; + if(lnl==0)cout << " Float_t TrkTrack::GetLnLX() -- WARNING -- value not defined "<2)lnl=lnl/(GetNY()-2); + else lnl=0; + if(lnl==0)cout << " Float_t TrkTrack::GetLnLY() -- WARNING -- value not defined "<10) index=10; + tailx[i]=tx[index]; + if(flag==1) { + if(fabs(axv[i])<=10.) fact = resx[i]/risxeta2_(&(axv[i])); + if(fabs(axv[i])>10.&&fabs(axv[i])<=15.) fact = resx[i]/risxeta3_(&(axv[i])); + if(fabs(axv[i])>15.) fact = resx[i]/risxeta4_(&(axv[i])); + } else fact = 1.; + resx[i] = sx[index]*fact; + } + for(int i=0; i<6; i++) { + index = int((fabs(ayv[i])+1.)/2.); + if(index>10) index=10; + taily[i]=ty[index]; + if(flag==1) fact = resy[i]/risyeta2_(&(ayv[i])); + else fact = 1.; + resy[i] = sy[index]*fact; + } +} +/** + * Set the TrkTrack good measurement */ void TrkTrack::SetGood(int *xg, int *yg){ @@ -468,6 +604,8 @@ track.resx[i]=resx[i]; track.resy[i]=resy[i]; + track.tailx[i]=tailx[i]; + track.taily[i]=taily[i]; } for(int i=0; i<5; i++) track.al[i]=al[i]; @@ -523,12 +661,12 @@ * * @see TrkParams::SetPFA(int) */ -void TrkTrack::EvaluateClusterPositions(){ +Bool_t TrkTrack::EvaluateClusterPositions(){ // cout << "void TrkTrack::GetClusterPositions() "<XMAGNLOW && xmagntopYMAGNLOW && ymagntopXMAGNLOW && xmagnbottomYMAGNLOW && ymagnbottomDump(); } } +/** + * \brief Dump processing status + */ +void TrkLevel2::StatusDump(int view){ + cout << "DSP n. "<= 12)return false; + return !(good[view]&flagmask); + +}; + + //-------------------------------------- // //