fTrackingPhase="PropagateBack";
Int_t nentr=event->GetNumberOfTracks();
// Info("PropagateBack", "Number of ESD tracks: %d\n", nentr);
-
+ double bz0 = GetBz();
+ const double kWatchStep=10.; // for larger steps watch arc vs segment difference
+ //
Int_t ntrk=0;
for (Int_t i=0; i<nentr; i++) {
AliESDtrack *esd=event->GetTrack(i);
Double_t xyzTrk[3],xyzVtx[3]={GetX(),GetY(),GetZ()};
t.GetXYZ(xyzTrk);
Double_t dst2 = 0.;
- for (Int_t icoord=0; icoord<3; icoord++) {Double_t di = xyzTrk[icoord] - xyzVtx[icoord];dst2 += di*di; }
+ {
+ double dxs = xyzTrk[0] - xyzVtx[0];
+ double dys = xyzTrk[1] - xyzVtx[1];
+ double dzs = xyzTrk[2] - xyzVtx[2];
+ // RS: for large segment steps d use approximation of cicrular arc s by
+ // s = 2R*asin(d/2R) = d/p asin(p) \approx d/p (p + 1/6 p^3) = d (1+1/6 p^2)
+ // where R is the track radius, p = d/2R = 2C*d (C is the abs curvature)
+ // Hence s^2/d^2 = (1+1/6 p^2)^2
+ dst2 = dxs*dxs + dys*dys;
+ if (dst2 > kWatchStep*kWatchStep) { // correct circular part for arc/segment factor
+ double crv = TMath::Abs(esd->GetC(bz0));
+ double fcarc = 1.+crv*crv*dst2/6.;
+ dst2 *= fcarc*fcarc;
+ }
+ dst2 += dzs*dzs;
+ }
t.StartTimeIntegral();
t.AddTimeStep(TMath::Sqrt(dst2));
//
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-Bool_t AliITStrackerMI::IsOKForPlaneEff(const AliITStrackMI* track, const Int_t *clusters, Int_t ilayer) const {
+Bool_t AliITStrackerMI::IsOKForPlaneEff(const AliITStrackMI* track, const Int_t *clusters, Int_t ilayer){
//
// Method to be optimized further:
// Aim: decide whether a track can be used for PlaneEff evaluation
//
Double_t nsigx=AliITSReconstructor::GetRecoParam()->GetNSigXFromBoundaryPlaneEff();
Double_t nsigz=AliITSReconstructor::GetRecoParam()->GetNSigZFromBoundaryPlaneEff();
- Double_t dx=nsigx*TMath::Sqrt(tmp.GetSigmaY2()); // those are precisions in the tracking reference system
- Double_t dz=nsigz*TMath::Sqrt(tmp.GetSigmaZ2()); // Use it also for the module reference system, as it is
- // done for RecPoints
+ Double_t distx=AliITSReconstructor::GetRecoParam()->GetDistXFromBoundaryPlaneEff();
+ Double_t distz=AliITSReconstructor::GetRecoParam()->GetDistZFromBoundaryPlaneEff();
+ Double_t dx=nsigx*TMath::Sqrt(tmp.GetSigmaY2()) + distx;
+ // those are precisions in the tracking reference system
+ Double_t dz=nsigz*TMath::Sqrt(tmp.GetSigmaZ2()) + distz;
+ // Use it also for the module reference system, as it is done for RecPoints
+
+ if(AliITSReconstructor::GetRecoParam()->GetSwitchOnMaxDistNSigFrmBndPlaneEff()){
+ if(nsigx*TMath::Sqrt(tmp.GetSigmaY2())<=distx) dx -= nsigx*TMath::Sqrt(tmp.GetSigmaY2());
+ else dx -= distx;
+
+ if(nsigz*TMath::Sqrt(tmp.GetSigmaZ2())<=distz) dz -= nsigz*TMath::Sqrt(tmp.GetSigmaZ2());
+ else dz -= distz;
+ }
// exclude tracks at boundary between detectors
//Double_t boundaryWidth=AliITSRecoParam::GetBoundaryWidthPlaneEff();
(locx+dx > blockXmx-boundaryWidth) ||
(locz-dz < blockZmn+boundaryWidth) ||
(locz+dz > blockZmx-boundaryWidth) ) return kFALSE;
+
+ if(ilayer==0){
+ const AliESDEvent *myesd = ((AliESDtrack*)tmp.GetESDtrack())->GetESDEvent();
+ //The beam pipe
+ if (CorrectForPipeMaterial(&tmp,"inward")) {
+ const AliESDVertex* vtx = myesd->GetVertex();
+ if(!vtx) return kFALSE;
+ Double_t ddz[2],cov[3];
+ Double_t maxD=3.;
+ if(!tmp.PropagateToDCA(vtx,AliTracker::GetBz(),maxD,ddz,cov)) return kFALSE;
+ if(TMath::Abs(ddz[0])>=AliITSReconstructor::GetRecoParam()->GetDCACutPlaneEff()) return kFALSE;
+
+ Double_t covar[6]; vtx->GetCovMatrix(covar);
+ Double_t p[2]={tmp.GetParameter()[0]-ddz[0],tmp.GetParameter()[1]-ddz[1]};
+ Double_t c[3]={covar[2],0.,covar[5]};
+ Double_t chi2= ((AliESDtrack*)tmp.GetESDtrack())->GetPredictedChi2(p,c);
+ if (chi2>AliITSReconstructor::GetRecoParam()->GetVertexChi2CutPlaneEff()) return kFALSE; // Use this to cut on chi^2
+
+ } else return kFALSE;
+ }
+
+
return kTRUE;
}
//------------------------------------------------------------------------
msz *= AliITSReconstructor::GetRecoParam()->GetNSigma2RoadZNonC();
msy *= AliITSReconstructor::GetRecoParam()->GetNSigma2RoadYNonC();
}
+
+ if(AliITSReconstructor::GetRecoParam()->GetSwitchOffStdSearchClusPlaneEff()){
+ Double_t nsigx=AliITSReconstructor::GetRecoParam()->GetNSigXSearchClusterPlaneEff();
+ Double_t nsigz=AliITSReconstructor::GetRecoParam()->GetNSigZSearchClusterPlaneEff();
+ Double_t distx=AliITSReconstructor::GetRecoParam()->GetDistXSearchClusterPlaneEff();
+ Double_t distz=AliITSReconstructor::GetRecoParam()->GetDistZSearchClusterPlaneEff();
+ msy = nsigx*TMath::Sqrt(tmp.GetSigmaY2()) + distx;
+ msz = nsigz*TMath::Sqrt(tmp.GetSigmaZ2()) + distz;
+
+ if(AliITSReconstructor::GetRecoParam()->GetSwitchOnMaxDistNSigSrhClusPlaneEff()){
+ if(nsigx*TMath::Sqrt(tmp.GetSigmaY2())<=distx) msy -= nsigx*TMath::Sqrt(tmp.GetSigmaY2());
+ else msy -= distx;
+
+ if(nsigz*TMath::Sqrt(tmp.GetSigmaZ2())<=distz) msz -= nsigz*TMath::Sqrt(tmp.GetSigmaZ2());
+ else msz -= distz;
+ }
+
+ msy *= msy;
+ msz *= msz;
+
+ }
+
+ if(msz==0 || msy==0){AliWarning("UseTrackForPlaneEff: null search frame"); return;}
+
msz = 1./msz; // 1/RoadZ^2
msy = 1./msy; // 1/RoadY^2
-//
const AliITSRecPoint *cl=0; Int_t clidx=-1, ci=-1;
Int_t idetc=-1;
}
return nfound;
}
-