--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/03/15 12:17:10 1.29 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/03/28 09:22:28 1.31 @@ -235,7 +235,8 @@ // Float_t TrkTrack::GetDEDX(){ Float_t dedx=0; - for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*xgood[i]+dedx_y[i]*ygood[i]; +// for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*xgood[i]+dedx_y[i]*ygood[i]; + for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*XGood(i)+dedx_y[i]*YGood(i); dedx = dedx/(this->GetNX()+this->GetNY()); return dedx; }; @@ -251,8 +252,8 @@ cout << endl << "al : "; for(int i=0; i<5; i++)cout << al[i] << " "; cout << endl << "chi^2 : "<< chi2; cout << endl << "n.step : "<< nstep; - cout << endl << "xgood : "; for(int i=0; i<6; i++)cout << xgood[i] ; - cout << endl << "ygood : "; for(int i=0; i<6; i++)cout << ygood[i] ; + cout << endl << "xgood : "; for(int i=0; i<6; i++)cout << XGood(i) ; + cout << endl << "ygood : "; for(int i=0; i<6; i++)cout << YGood(i) ; cout << endl << "xm : "; for(int i=0; i<6; i++)cout << xm[i] << " "; cout << endl << "ym : "; for(int i=0; i<6; i++)cout << ym[i] << " "; cout << endl << "zm : "; for(int i=0; i<6; i++)cout << zm[i] << " "; @@ -289,6 +290,7 @@ * Set the TrkTrack good measurement */ void TrkTrack::SetGood(int *xg, int *yg){ + // NB! si perdera` l'informazione sul numero del cluster for(int i=0; i<6; i++) xgood[i]=*xg++; for(int i=0; i<6; i++) ygood[i]=*yg++; } @@ -316,8 +318,10 @@ for(int i=0; i<6; i++){ - track.xgood[i]=xgood[i]; - track.ygood[i]=ygood[i]; +// track.xgood[i]=xgood[i]; +// track.ygood[i]=ygood[i]; + track.xgood[i]=XGood(i); + track.ygood[i]=YGood(i); track.xm[i]=xm[i]; track.ym[i]=ym[i]; @@ -330,10 +334,10 @@ track.xm_b[i]=xm[i]; track.ym_a[i]=ym[i]; track.ym_b[i]=ym[i]; - if( xgood[i] && !ygood[i] ){ + if( XGood(i) && !YGood(i) ){ track.ym_a[i] = track.ym_a[i]+segment; track.ym_b[i] = track.ym_b[i]-segment; - }else if( !xgood[i] && ygood[i]){ + }else if( !XGood(i) && YGood(i)){ track.xm_a[i] = track.xm_a[i]+segment; track.xm_b[i] = track.xm_b[i]-segment; } @@ -451,10 +455,27 @@ for(int j=0; j<5; j++) coval[i][j]=0.; } } +/* + * Set the tracking mode + */ void TrkTrack::SetTrackingMode(int trackmode){ extern cMini2track track_; track_.trackmode = trackmode; } +/* + * Set the factor scale for tracking precision + */ +void TrkTrack::SetPrecisionFactor(double fact){ + extern cMini2track track_; + track_.fact = fact; +} +/* + * Set the factor scale for tracking precision + */ +void TrkTrack::SetStepMin(int istepmin){ + extern cMini2track track_; + track_.istepmin = istepmin; +} /* @@ -865,8 +886,8 @@ l2->coval[i][it2][it1] = ((TrkTrack *)Track->At(i))->coval[it1][it2]; }; for(int ip=0;ip<6;ip++){ - l2->xgood_nt[i][ip] = ((TrkTrack *)Track->At(i))->xgood[ip]; - l2->ygood_nt[i][ip] = ((TrkTrack *)Track->At(i))->ygood[ip]; + l2->xgood_nt[i][ip] = ((TrkTrack *)Track->At(i))->XGood(ip); + l2->ygood_nt[i][ip] = ((TrkTrack *)Track->At(i))->YGood(ip); l2->xm_nt[i][ip] = ((TrkTrack *)Track->At(i))->xm[ip]; l2->ym_nt[i][ip] = ((TrkTrack *)Track->At(i))->ym[ip]; l2->zm_nt[i][ip] = ((TrkTrack *)Track->At(i))->zm[ip];