// store positions of centre of SPD modules (in z)
// The convetion is that fSPDdetzcentre is ordered from -z to +z
Double_t tr[3];
+ AliITSgeomTGeo::GetTranslation(1,1,1,tr);
if (tr[2]<0) { // old geom (up to v5asymmPPR)
AliITSgeomTGeo::GetTranslation(1,1,1,tr);
fSPDdetzcentre[0] = tr[2];
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) {
(currenttrack->GetY()-cl->GetY())*(currenttrack->GetY()-cl->GetY())*msy > 1. )
{ // cluster not associated to track
AliDebug(2,"not associated");
+ // MvL: added here as well
+ // bring track back to ideal detector plane
+ currenttrack->Propagate(xTrOrig);
continue;
}
// bring track back to ideal detector plane
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]++;
}
Int_t l=(index & 0xf0000000) >> 28;
Int_t c=(index & 0x0fffffff) >> 00;
if (c>fgLayers[l].GetNumberOfClusters()) continue;
- if (ny[l]<1.e-13){
- printf("problem\n");
- }
+ // if (ny[l]<1.e-13){
+ // printf("problem\n");
+ // }
AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(index);
Float_t weight=1;
//
Int_t index = clusterlist[icluster];
Int_t l=(index & 0xf0000000) >> 28;
Int_t c=(index & 0x0fffffff) >> 00;
- if (ny[l]<1.e-13){
- printf("problem\n");
- }
+ // if (ny[l]<1.e-13){
+ // printf("problem\n");
+ // }
if (c>fgLayers[l].GetNumberOfClusters()) continue;
//if (l>3) continue;
AliITSRecPoint *cl = (AliITSRecPoint*)GetCluster(index);
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
AliITStrackMI * oldtrack = (AliITStrackMI*)(track->GetESDtrack()->GetITStrack());
if (oldtrack) delete oldtrack;
track->GetESDtrack()->SetITStrack(new AliITStrackMI(*track));
- if (TMath::Abs(track->GetDnorm(1))<0.000000001){
- printf("Problem\n");
- }
+ // if (TMath::Abs(track->GetDnorm(1))<0.000000001){
+ // printf("Problem\n");
+ // }
}
//------------------------------------------------------------------------
Int_t AliITStrackerMI::GetNearestLayer(const Double_t *xr) const{
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 );