fVertexer = vertexer;
}
-
+/*
//____________________________________________________________________________
AliITStrackerSA::AliITStrackerSA(const AliITStrackerSA& tracker):AliITStrackerMI(),
fPhiEstimate(tracker.fPhiEstimate),
return *this;
}
-
+*/
//____________________________________________________________________________
AliITStrackerSA::~AliITStrackerSA(){
// destructor
// is done in the ITS only. In the standard reconstruction chain this option
// can be set via AliReconstruction::SetOption("ITS","onlyITS")
Int_t rc=0;
+
if(!fITSStandAlone){
rc=AliITStrackerMI::Clusters2Tracks(event);
}
}
if(!rc){
rc=FindTracks(event,kFALSE);
- if(AliITSReconstructor::GetRecoParam()->GetSAUseAllClusters()==kTRUE) {
+ Int_t nSPDcontr=0;
+ const AliESDVertex *spdv = event->GetPrimaryVertexSPD();
+ if(spdv) nSPDcontr = spdv->GetNContributors();
+ if(AliITSReconstructor::GetRecoParam()->GetSAUseAllClusters()==kTRUE &&
+ nSPDcontr<=AliITSReconstructor::GetRecoParam()->GetMaxSPDcontrForSAToUseAllClusters()) {
rc=FindTracks(event,kTRUE);
}
}
-
return rc;
}
&trs,primaryVertex[2],pflag);
Int_t nextLay=theLay+seedStep;
Bool_t goon=kTRUE;
+ if(nextLay<0 || nextLay == 6) goon = kFALSE;
while(goon){
kk++;
nClusLay[kk] = SearchClusters(nextLay,fPhiWin[nloop],fLambdaWin[nloop],
}
- Int_t ncl = fCluLayer[layer]->GetEntries();
+ Double_t phiExpect=fPhiEstimate;
+ Double_t lamExpect=fLambdac;
+
+ Int_t ncl = fCluLayer[layer]->GetEntriesFast();
for (Int_t index=0; index<ncl; index++) {
- AliITSRecPoint *c = (AliITSRecPoint*)fCluLayer[layer]->At(index);
+ AliITSRecPoint *c = (AliITSRecPoint*)fCluLayer[layer]->UncheckedAt(index);
if (!c) continue;
- if (c->GetQ()<=0) continue;
- if(layer>1 && c->GetQ()<=fMinQ) continue;
- AliITSclusterTable* arr = (AliITSclusterTable*)GetClusterCoord(layer,index);
- Double_t phi = arr->GetPhi();
- if (TMath::Abs(phi-fPhiEstimate)>phiwindow) continue;
-
- Double_t lambda = arr->GetLambda();
- if (TMath::Abs(lambda-fLambdac)>lambdawindow) continue;
-
- if(trs->GetNumberOfClustersSA()==trs->GetMaxNumberOfClusters()) return 0;
- if(trs->GetNumberOfMarked(layer)==trs->GetMaxNMarkedPerLayer()) return 0;
- Int_t orind = arr->GetOrInd();
- trs->AddClusterSA(layer,orind);
- trs->AddClusterMark(layer,index);
- nc++;
- fLambdac=lambda;
- fPhiEstimate=phi;
+ AliITSclusterTable* arr = (AliITSclusterTable*)GetClusterCoord(layer,index);
- fPointc[0]=arr->GetX();
- fPointc[1]=arr->GetY();
+ Double_t lambda = arr->GetLambda();
+ if (TMath::Abs(lambda-lamExpect)>lambdawindow) continue;
+ Double_t phi = arr->GetPhi();
+ Double_t deltaPhi = phi-phiExpect;
+ if(deltaPhi>TMath::Pi()) deltaPhi-=2*TMath::Pi();
+ else if(deltaPhi<-TMath::Pi()) deltaPhi+=2*TMath::Pi();
+ if (TMath::Abs(deltaPhi)>phiwindow) continue;
+
+ if(trs->GetNumberOfClustersSA()==trs->GetMaxNumberOfClusters()) return 0;
+ if(trs->GetNumberOfMarked(layer)==trs->GetMaxNMarkedPerLayer()) return 0;
+ Int_t orind = arr->GetOrInd();
+ trs->AddClusterSA(layer,orind);
+ trs->AddClusterMark(layer,index);
+ nc++;
+ fLambdac=lambda;
+ fPhiEstimate=phi;
+
+ fPointc[0]=arr->GetX();
+ fPointc[1]=arr->GetY();
+
}
return nc;
}
Bool_t AliITStrackerSA::SetFirstPoint(Int_t lay, Int_t clu, Double_t* primaryVertex){
// Sets the first point (seed) for tracking
- AliITSRecPoint* cl = (AliITSRecPoint*)fCluLayer[lay]->At(clu);
+ AliITSRecPoint* cl = (AliITSRecPoint*)fCluLayer[lay]->UncheckedAt(clu);
if(!cl) return kFALSE;
if (cl->GetQ()<=0) return kFALSE;
if(lay>1 && cl->GetQ()<=fMinQ) return kFALSE;