--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/02/27 11:24:43 1.56 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/06/04 07:57:04 1.57 @@ -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(){ @@ -664,12 +672,12 @@ // cout << i<<" - "<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]; - resx[i] = track->resx[i]; //Elena 10th - resy[i] = track->resy[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]); } } @@ -2186,7 +2194,7 @@ * (By default is created with z-coordinates inside the tracking volume) */ Trajectory::Trajectory(){ - npoint = 10; + npoint = 6; x = new float[npoint]; y = new float[npoint]; z = new float[npoint]; @@ -2253,17 +2261,18 @@ thy = new float[npoint]; tl = new float[npoint]; int i=0; - do{ - x[i] = 0; - y[i] = 0; + do{ + x[i] = 0.; + y[i] = 0.; z[i] = zin[i]; - thx[i] = 0; - thy[i] = 0; - tl[i] = 0; + thx[i] = 0.; + thy[i] = 0.; + tl[i] = 0.; i++; }while(zin[i-1] > zin[i] && i < npoint); npoint=i; - if(npoint != n)cout << "NB! Trajectory created with "<