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);
if(LocalModuleCoord(ilayer,idet,vtrack,xloc,zloc)) { // local module coords
vtrack->SetModuleIndexInfo(ilayer,idet,modstatus,xloc,zloc);
}
- if(constrain) vtrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
+ if(constrain && AliITSReconstructor::GetRecoParam()->GetImproveWithVertex()) vtrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
ntracks[ilayer]++;
continue;
}
TMath::Abs(updatetrack->GetD(1)/(1.+ilayer)) > // z
AliITSReconstructor::GetRecoParam()->GetMaxDZforPrimTrk()) isPrim=kFALSE;
}
- if (isPrim) updatetrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
+ if (isPrim && AliITSReconstructor::GetRecoParam()->GetImproveWithVertex()) updatetrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
}
updatetrack->SetNDeadZone(updatetrack->GetNDeadZone()+1);
if (dead) {
TMath::Abs(updatetrack->GetD(1)/(1.+ilayer)) > // z
AliITSReconstructor::GetRecoParam()->GetMaxDZforPrimTrk()) isPrim=kFALSE;
}
- if (isPrim) updatetrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
+ if (isPrim && AliITSReconstructor::GetRecoParam()->GetImproveWithVertex()) updatetrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
} //apply vertex constrain
ntracks[ilayer]++;
} // create new hypothesis
vtrack->SetClIndex(ilayer,-1);
modstatus = 3; // skipped
vtrack->SetModuleIndexInfo(ilayer,idet,modstatus,xloc,zloc);
- vtrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
+ if(AliITSReconstructor::GetRecoParam()->GetImproveWithVertex()) vtrack->Improve(budgetToPrimVertex,xyzVtx,ersVtx);
vtrack->IncrementNSkipped();
ntracks[ilayer]++;
}
backtrack = new(backtrack) AliITStrackMI(*track);
if (track->GetConstrain()) {
if (!CorrectForPipeMaterial(backtrack,"inward")) continue;
- if (!backtrack->Improve(0,xyzVtx,ersVtx)) continue;
+ if (AliITSReconstructor::GetRecoParam()->GetImproveWithVertex()) {
+ if (!backtrack->Improve(0,xyzVtx,ersVtx)) continue;
+ }
backtrack->ResetCovariance(10.);
}else{
backtrack->ResetCovariance(10.);
//
// 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 );