--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/02/27 11:24:43 1.56 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2014/10/15 08:45:51 1.59 @@ -381,8 +381,8 @@ int first_plane = -1; int last_plane = -1; for(Int_t ip=0; ip<6; ip++){ - if( XGood(ip)*YGood(ip) && first_plane == -1 )first_plane = ip; - if( XGood(ip)*YGood(ip) && first_plane != -1 )last_plane = ip; + if( XGood(ip) && YGood(ip) && first_plane == -1 )first_plane = ip; + if( XGood(ip) && YGood(ip) && first_plane != -1 )last_plane = ip; } if( first_plane == -1 || last_plane == -1){ cout<< "Int_t TrkTrack::GetLeverArmXY() -- XGood(ip)*YGood(ip) always false ??? "<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]; - 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]); } } @@ -1576,6 +1584,16 @@ // // //-------------------------------------- +void TrkLevel2::SetTrackArray(TClonesArray *track){ + if(track && strcmp(track->GetClass()->GetName(),"TrkTrack")==0){ + if(Track)Track->Clear("C"); + Track = track; + } +} +//-------------------------------------- +// +// +//-------------------------------------- void TrkLevel2::Dump(){ // @@ -2186,7 +2204,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 +2271,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 "<