- TVector3 vec(cluster->X(),cluster->Y(),cluster->Z());
- Double_t alpha = ((int)(vec.Phi()*TMath::RadToDeg()/20)+0.5)*20*TMath::DegToRad();
- //Rotate to proper local coordinate
- vec.RotateZ(-alpha);
- trkParamTmp->Rotate(alpha);
- //extrapolation is done here
- if(!AliTrackerBase::PropagateTrackToBxByBz(trkParamTmp, vec.X(), track->GetMass(), fStep, kFALSE, 0.8, -1)) continue;
-
- //Calculate the residuals
- trkParamTmp->GetXYZ(trkPos);
- TVector3 clsPosVec(cluster->X(),cluster->Y(),cluster->Z());
- TVector3 trkPosVec(trkPos[0],trkPos[1],trkPos[2]);
+ Float_t clsPos[3] = {cluster->X(),cluster->Y(),cluster->Z()};
+ Double_t dR = TMath::Sqrt(TMath::Power(trkPos[0]-clsPos[0],2)+TMath::Power(trkPos[1]-clsPos[1],2)+TMath::Power(trkPos[2]-clsPos[2],2));
+// printf("\n dR=%f,wind=%f\n",dR,fClusterWindow); //MARCEL
+ if(dR > fClusterWindow) continue;