--- DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2008/01/22 08:55:07 1.43 +++ DarthVader/TrackerLevel2/src/TrkLevel2.cpp 2008/03/05 17:00:19 1.44 @@ -60,13 +60,20 @@ ypu[ip] = 0; }; - + // TrkParams::SetTrackingMode(); // TrkParams::SetPrecisionFactor(); // TrkParams::SetStepMin(); TrkParams::SetMiniDefault(); TrkParams::SetPFA(); + int ngf = TrkParams::nGF; + for(int i=0; i>> OBSOLETE !!! use TrkTrack::DoTrack2(Trajectory* t) instead + * */ int TrkTrack::DoTrack(Trajectory* t){ + cout << " int TrkTrack::DoTrack(Trajectory* t) --->> OBSOLETE !!! "<npoint]; double *dyout = new double[t->npoint]; double *dzin = new double[t->npoint]; @@ -299,7 +322,8 @@ return dedx; }; /** - * Returns 1 if the cluster on a tracker view includes bad strips. + * Returns 1 if the cluster on a tracker view includes bad strips + * (at least one bad strip among the four strip used by p.f.a.) * @param ip plane (0-5) * @param iv view (0=x 1=y) */ @@ -890,20 +914,69 @@ } /** - * Returns 1 if the track is inside the magnet cavity - * Set the minimum number of steps for tracking precision + * Returns true if the track is inside the magnet cavity. + * @param toll Tolerance around the nominal volume (toll>0 define an inner fiducial volume) */ -Bool_t TrkTrack::IsInsideCavity(){ - float xmagntop, ymagntop, xmagnbottom, ymagnbottom; - xmagntop = xv[0] + (ZMAGNHIGH-zv[0])*tan(acos(-1.0)*axv[0]/180.); - ymagntop = yv[0] + (ZMAGNHIGH-zv[0])*tan(acos(-1.0)*ayv[0]/180.); - xmagnbottom = xv[5] + (ZMAGNLOW-zv[5])*tan(acos(-1.0)*axv[5]/180.); - ymagnbottom = yv[5] + (ZMAGNLOW-zv[5])*tan(acos(-1.0)*ayv[5]/180.); - if( xmagntop>XMAGNLOW && xmagntopYMAGNLOW && ymagntopXMAGNLOW && xmagnbottomYMAGNLOW && ymagnbottomXMAGNLOW && xmagntopYMAGNLOW && ymagntopXMAGNLOW && xmagnbottomYMAGNLOW && ymagnbottom= 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 the nominal acceptance, which is defined + * by the intersection among magnet cavity, silicon-plane sensitive area and + * ToF sensitive area (nominal values from the official document used to + * calculate the geometrical factor) + */ +Bool_t TrkTrack::IsInsideAcceptance(){ + + int ngf = TrkParams::nGF; + for(int i=0; i= TrkParams::xGF_max[i] || + yGF[i] <= TrkParams::yGF_min[i] || + yGF[i] >= TrkParams::yGF_max[i] || + false)return false; + } + return true; + } /** * Method to retrieve ID (0,1,...) of x-cluster (if any) associated to this track. @@ -1219,6 +1292,11 @@ dedx_y[ip] = 0; }; + int ngf = TrkParams::nGF; + for(int i=0; iClear(); // if(cly)cly->Clear(); // clx.Clear(); @@ -1245,11 +1323,13 @@ //-------------------------------------- TrkSinglet::TrkSinglet(){ // cout << "TrkSinglet::TrkSinglet() " << GetUniqueID()<al);//<<<< integrate the trajectory + for(int ip=0; ipxGF[ip] = tgf.x[ip]; + t_track->yGF[ip] = tgf.y[ip]; + } + // if(t_track->IsSaturated())t_track->Dump(); new(t[i]) TrkTrack(*t_track); t_track->Clear(); - }; + };//end loop over track // ---------------- // *** SINGLETS *** @@ -1507,6 +1603,8 @@ t_singlet->coord[0] = l2->xs[i][0]; t_singlet->coord[1] = l2->xs[i][1]; t_singlet->sgnl = l2->signlxs[i]; + t_singlet->multmax = l2->multmaxsx[i]; + if(l2->sxbad[i]>0) t_singlet->multmax = -1*t_singlet->multmax; //----------------------------------------------------- // if(l1) t_singlet->cls = l1->GetCluster(l2->clsx[i]-1); //----------------------------------------------------- @@ -1520,12 +1618,16 @@ t_singlet->coord[0] = l2->ys[i][0]; t_singlet->coord[1] = l2->ys[i][1]; t_singlet->sgnl = l2->signlys[i]; + t_singlet->multmax = l2->multmaxsy[i]; + if(l2->sybad[i]>0) t_singlet->multmax = -1*t_singlet->multmax; //----------------------------------------------------- // if(l1) t_singlet->cls = l1->GetCluster(l2->clsy[i]-1); //----------------------------------------------------- new(sy[i]) TrkSinglet(*t_singlet); t_singlet->Clear(); }; + + delete t_track; delete t_singlet;