--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/01/16 15:29:47 1.55 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/08/27 14:44:37 1.58 @@ -391,6 +391,14 @@ return (last_plane-first_plane+1); } /** + * Returns the number of hit planes + */ +Int_t TrkTrack::GetNhit() { + int np=0; + for(Int_t ip=0; ip<6; ip++) np += (XGood(ip)||YGood(ip)) ; + return np; +}; +/** * Returns the reduced chi-square of track x-projection */ Float_t TrkTrack::GetChi2X(){ @@ -398,7 +406,7 @@ 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 "<al[i]; - for(int j=0; j<5; j++) coval[i][j]=track->cov[i][j]; + al[i]= (float) (track->al[i]); + for(int j=0; j<5; j++) coval[i][j]= (float) (track->cov[i][j]); } - chi2 = track->chi2; - nstep = track->nstep; + chi2 = (float) (track->chi2); + nstep = (float) (track->nstep); for(int i=0; i<6; i++){ - xv[i] = track->xv[i]; - yv[i] = track->yv[i]; - zv[i] = track->zv[i]; - xm[i] = track->xm[i]; - ym[i] = track->ym[i]; - zm[i] = track->zm[i]; - axv[i] = track->axv[i]; - ayv[i] = track->ayv[i]; + xv[i] = (float) (track->xv[i]); + yv[i] = (float) (track->yv[i]); + zv[i] = (float) (track->zv[i]); + xm[i] = (float) (track->xm[i]); + ym[i] = (float) (track->ym[i]); + zm[i] = (float) (track->zm[i]); + axv[i] = (float) (track->axv[i]); + ayv[i] = (float) (track->ayv[i]); + resx[i] = (float) (track->resx[i]); //Elena 10th + resy[i] = (float) (track->resy[i]); } } @@ -810,8 +821,8 @@ for(int ip=0; ip<6; ip++){ // cout << ip<<" ** "< MA SEI DI COCCIO?!?!"<5||clid<0||il<-1||il>2||is<-1||is>1) + if(ip<0||ip>5||clid<1||il<-1||il>2||is<-1||is>1) cout << " void TrkTrack::SetYGood(int,int,int,int,bool) --> MA SEI DI COCCIO?!?!"< zin[i] && i < npoint); npoint=i; - if(npoint != n)cout << "NB! Trajectory created with "<