detxy[1] = det.GetR()*TMath::Sin(det.GetPhi());
Double_t alpha = t->GetAlpha();
Double_t xdetintrackframe = detxy[0]*TMath::Cos(alpha)+detxy[1]*TMath::Sin(alpha);
- Float_t phi = TMath::ASin(t->GetSnpAt(xdetintrackframe,GetBz()));
+ Float_t phi = TMath::ASin(t->GetSnpAt(xdetintrackframe+cl->GetX(),GetBz()));
phi += alpha-det.GetPhi();
Float_t tgphi = TMath::Tan(phi);
//
// Compute predicted chi2
//
+ // Take into account the mis-alignment (bring track to cluster plane)
+ Double_t xTrOrig=track->GetX();
+ if (!track->Propagate(xTrOrig+cluster->GetX())) return 1000.;
Float_t erry,errz,covyz;
Float_t theta = track->GetTgl();
Float_t phi = track->GetSnp();
- phi = TMath::Abs(phi)*TMath::Sqrt(1./((1.-phi)*(1.+phi)));
+ phi *= TMath::Sqrt(1./((1.-phi)*(1.+phi)));
AliITSClusterParam::GetError(layer,cluster,theta,phi,track->GetExpQ(),erry,errz,covyz);
AliDebug(2,Form(" chi2: tr-cl %f %f tr X %f cl X %f",track->GetY()-cluster->GetY(),track->GetZ()-cluster->GetZ(),track->GetX(),cluster->GetX()));
- // Take into account the mis-alignment (bring track to cluster plane)
- Double_t xTrOrig=track->GetX();
- if (!track->Propagate(xTrOrig+cluster->GetX())) return 1000.;
AliDebug(2,Form(" chi2: tr-cl %f %f tr X %f cl X %f",track->GetY()-cluster->GetY(),track->GetZ()-cluster->GetZ(),track->GetX(),cluster->GetX()));
Double_t chi2 = track->GetPredictedChi2MI(cluster->GetY(),cluster->GetZ(),erry,errz,covyz);
// Bring the track back to detector plane in ideal geometry
tmp.GetClIndex(lay),((AliESDtrack*)tmp.GetESDtrack())->GetLabel())) ;
if (tmp.GetClIndex(lay)>=0) ncl_in++;
}
- Int_t ncl=ncl_out+ncl_out;
+ Int_t ncl=ncl_out+ncl_in;
Bool_t nextout = kFALSE;
if(ilayer==AliITSgeomTGeo::kNLayers-1) nextout=kTRUE; // you are already on the outermost layer
else nextout = ((tmp.GetClIndex(ilayer+1)>=0)? kTRUE : kFALSE );