fTrackToFollow.ResetClusters();
//Refitting...
- if (RefitAt(3.7, &fTrackToFollow, t)) {
+ if (RefitAt(3.7, &fTrackToFollow, t, kTRUE)) {
fTrackToFollow.SetLabel(t->GetLabel());
fTrackToFollow.CookdEdx();
CookLabel(&fTrackToFollow,0.); //For comparison only
return d/(xn*xn);
}
-Bool_t
-AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,const AliITStrackV2 *c) {
+Bool_t AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,
+ const AliITStrackV2 *c, Bool_t extra) {
//--------------------------------------------------------------------
// This function refits the track "t" at the position "x" using
// the clusters from "c"
+ // If "extra"==kTRUE,
+ // the clusters from overlapped modules get attached to "t"
//--------------------------------------------------------------------
Int_t index[kMaxLayer];
Int_t k;
return kFALSE;
}
}
- /*
- if (cl==0)
- if (t->GetNumberOfClusters()>2) {
- Double_t dz=4*TMath::Sqrt(t->GetSigmaZ2()+kSigmaZ2[i]);
- Double_t dy=4*TMath::Sqrt(t->GetSigmaY2()+kSigmaY2[i]);
- Double_t zmin=t->GetZ() - dz;
- Double_t zmax=t->GetZ() + dz;
- Double_t ymin=t->GetY() + phi*r - dy;
- Double_t ymax=t->GetY() + phi*r + dy;
- layer.SelectClusters(zmin,zmax,ymin,ymax);
-
- const AliITSRecPoint *c=0; Int_t ci=-1;
- while ((c=layer.GetNextCluster(ci))!=0) {
- if (idet != c->GetDetectorIndex()) continue;
- Double_t chi2=t->GetPredictedChi2(c);
- if (chi2<maxchi2) { cl=c; maxchi2=chi2; idx=ci; }
- }
- }
- */
+
if (cl) {
if (!t->Update(cl,maxchi2,idx)) {
return kFALSE;
t->CorrectForMaterial(-step*d,x0);
}
+ if (extra) { //search for extra clusters
+ AliITStrackV2 tmp(*t);
+ Double_t dz=4*TMath::Sqrt(tmp.GetSigmaZ2()+kSigmaZ2[i]);
+ if (dz < 0.5*TMath::Abs(tmp.GetTgl())) dz=0.5*TMath::Abs(tmp.GetTgl());
+ Double_t dy=4*TMath::Sqrt(t->GetSigmaY2()+kSigmaY2[i]);
+ if (dy < 0.5*TMath::Abs(tmp.GetSnp())) dy=0.5*TMath::Abs(tmp.GetSnp());
+ Double_t zmin=t->GetZ() - dz;
+ Double_t zmax=t->GetZ() + dz;
+ Double_t ymin=t->GetY() + phi*r - dy;
+ Double_t ymax=t->GetY() + phi*r + dy;
+ layer.SelectClusters(zmin,zmax,ymin,ymax);
+
+ const AliITSRecPoint *c=0; Int_t ci=-1,cci=-1;
+ Double_t maxchi2=1000.*kMaxChi2, tolerance=0.1;
+ while ((c=layer.GetNextCluster(ci))!=0) {
+ if (idet == c->GetDetectorIndex()) continue;
+
+ const AliITSdetector &det=layer.GetDetector(c->GetDetectorIndex());
+
+ if (!tmp.Propagate(det.GetPhi(),det.GetR())) continue;
+
+ if (TMath::Abs(tmp.GetZ() - c->GetZ()) > tolerance) continue;
+ if (TMath::Abs(tmp.GetY() - c->GetY()) > tolerance) continue;
+
+ Double_t chi2=tmp.GetPredictedChi2(c);
+ if (chi2<maxchi2) { maxchi2=chi2; cci=ci; }
+ }
+ if (cci>=0) t->SetExtraCluster(i,(i<<28)+cci);
+ }
+
// track time update [SR, GSI 17.02.2003]
if (t->IsStartedTimeIntegral() && step==1) {
Double_t newX, newY, newZ;
//--------------------------------------------------------------------
AliTracker::UseClusters(t,from);
- AliITSRecPoint *c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(0));
+ Int_t clusterIndex = t->GetClusterIndex(0);
+ AliITSRecPoint *c= 0x0;
+
+ if (clusterIndex>-1)
+ c = (AliITSRecPoint *)GetCluster(clusterIndex);
if (c && c->GetSigmaZ2()>0.1) c->UnUse();
- c=(AliITSRecPoint *)GetCluster(t->GetClusterIndex(1));
+
+ c = 0x0;
+ clusterIndex = t->GetClusterIndex(1);
+ if (clusterIndex>-1)
+ c=(AliITSRecPoint *)GetCluster(clusterIndex);
if (c && c->GetSigmaZ2()>0.1) c->UnUse();
}