--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/05/24 16:45:48 1.36 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2007/08/31 14:56:51 1.40 @@ -52,13 +52,14 @@ ayv[ip] = 0; dedx_x[ip] = 0; dedx_y[ip] = 0; + multmaxx[ip] = 0; + multmaxy[ip] = 0; + seedx[ip] = 0; + seedy[ip] = 0; + xpu[ip] = 0; + ypu[ip] = 0; + }; -// clx = 0; -// cly = 0; -// clx = new TRefArray(6,0); //forse causa memory leak??? -// cly = new TRefArray(6,0); //forse causa memory leak??? -// clx = TRefArray(6,0); -// cly = TRefArray(6,0); TrkParams::SetTrackingMode(); TrkParams::SetPrecisionFactor(); @@ -96,13 +97,13 @@ ayv[ip] = t.ayv[ip]; dedx_x[ip] = t.dedx_x[ip]; dedx_y[ip] = t.dedx_y[ip]; + multmaxx[ip] = t.multmaxx[ip]; + multmaxy[ip] = t.multmaxy[ip]; + seedx[ip] = t.seedx[ip]; + seedy[ip] = t.seedy[ip]; + xpu[ip] = t.xpu[ip]; + ypu[ip] = t.ypu[ip]; }; -// clx = 0; -// cly = 0; -// if(t.clx)clx = new TRefArray(*(t.clx)); -// if(t.cly)cly = new TRefArray(*(t.cly)); -// clx = TRefArray(t.clx); -// cly = TRefArray(t.cly); TrkParams::SetTrackingMode(); TrkParams::SetPrecisionFactor(); @@ -141,11 +142,15 @@ t.ayv[ip] = ayv[ip]; t.dedx_x[ip] = dedx_x[ip]; t.dedx_y[ip] = dedx_y[ip]; + t.multmaxx[ip] = multmaxx[ip]; + t.multmaxy[ip] = multmaxy[ip]; + t.seedx[ip] = seedx[ip]; + t.seedy[ip] = seedy[ip]; + t.xpu[ip] = xpu[ip]; + t.ypu[ip] = ypu[ip]; }; -// t.clx = TRefArray(clx); -// t.cly = TRefArray(cly); }; //-------------------------------------- @@ -365,6 +370,103 @@ } 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 "<5){ + cout << "Float_t TrkTrack::GetEffectiveAngle(int "< wrong input"< wrong input"<ntrk() ; - cout << endl << "nclsx() : " << this->nclsx(); - cout << endl << "nclsy() : " << this->nclsy(); + cout << endl << "good : "; for(int i=0; i<12; i++) cout << hex <<" 0x"<< good[i]<Dump(); } - if(SingletX){ - TClonesArray &sx = *SingletX; - for(int i=0; iDump(); - } - if(SingletY){ - TClonesArray &sy = *SingletY; - for(int i=0; iDump(); - } +// if(SingletX){ +// TClonesArray &sx = *SingletX; +// for(int i=0; iDump(); +// } +// if(SingletY){ +// TClonesArray &sy = *SingletY; +// for(int i=0; iDump(); +// } + cout << endl; } /** * \brief Dump processing status @@ -1140,6 +1253,12 @@ t_track->ayv[ip] = l2->ayv_nt[i][ip]; t_track->dedx_x[ip] = l2->dedx_x[i][ip]; t_track->dedx_y[ip] = l2->dedx_y[i][ip]; + t_track->multmaxx[ip] = l2->multmaxx[i][ip]; + t_track->multmaxy[ip] = l2->multmaxy[i][ip]; + t_track->seedx[ip] = l2->seedx[i][ip]; + t_track->seedy[ip] = l2->seedy[i][ip]; + t_track->xpu[ip] = l2->xpu[i][ip]; + t_track->ypu[ip] = l2->ypu[i][ip]; //----------------------------------------------------- //----------------------------------------------------- //-----------------------------------------------------