--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2009/02/03 13:57:15 1.53 +++ 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 "< 1 || ip < 0 || ip > 5 || il < 0 || il > 2) && true){ @@ -708,34 +717,34 @@ cout << " is ip il = "<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<<" ** "<= TrkParams::xGF_max[i] - toll || + yGF[i] <= TrkParams::yGF_min[i] + toll || + yGF[i] >= TrkParams::yGF_max[i] - toll || + false){ + + return false; + } } return true; +} + +/** + * Returns true if the track is inside one of the surfaces which define the + * geometrical acceptance. + * @param surf tag of the surface (possible values are: S11 S12 S21 S22 T1 + * CUF T2 T3 T4 T5 CLF T6 S31 S32). + * @param toll Tolerance around the nominal surface (toll>0 define an inner + * fiducial surface) +*/ +Bool_t TrkTrack::IsInsideGFSurface(const char* surf, float toll){ + + + int ngf = TrkParams::nGF; + bool SURFOK = false; + for(int i=0; i TrkParams::xGF_min[i] + toll && + xGF[i] < TrkParams::xGF_max[i] - toll && + yGF[i] > TrkParams::yGF_min[i] + toll && + yGF[i] < TrkParams::yGF_max[i] - toll && + true)return true; + } + } + if( !SURFOK )cout << " Bool_t TrkTrack::IsInsideGFSurface(char* surf, float toll) --> suface "<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::SetXGood(int,int,int,int,bool) --> 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?!?!"<GetClass()->GetName(),"TrkTrack")==0){ + if(Track)Track->Clear("C"); + Track = track; + } +} +//-------------------------------------- +// +// +//-------------------------------------- void TrkLevel2::Dump(){ // @@ -2110,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]; @@ -2177,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 "<