]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes a small problem with finding clusters close to the Z ends
authorjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2012 08:05:08 +0000 (08:05 +0000)
committerjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2012 08:05:08 +0000 (08:05 +0000)
 Sergey Gorbunov

TPC/AliTPCtrackerSector.cxx

index e32ede533d4649ff04cd7eeeb793a460e6af603b..cf4688985c0af789638bb703013df024b47ea6ad 100644 (file)
@@ -164,11 +164,13 @@ AliTPCclusterMI * AliTPCtrackerRow::FindNearest2(Double_t y, Double_t z, Double_
   AliTPCclusterMI *cl =0;
 
   //PH Check boundaries. 510 is the size of fFastCluster
-  Int_t iz1 = Int_t(z-roadz+254.5);
-  if (iz1<0 || iz1>=510) return cl;
+  Int_t iz1 = Int_t(z-roadz+254.5);  
+  if ( iz1>=510) return cl;
+  if (iz1<0 ) iz1 = 0;
   iz1 = TMath::Max(GetFastCluster(iz1)-1,0);
   Int_t iz2 = Int_t(z+roadz+255.5);
-  if (iz2<0 || iz2>=510) return cl;
+  if (iz2<0 ) return cl;
+  if ( iz2>=510) iz2 = 509;
   iz2 = TMath::Min(GetFastCluster(iz2)+1,fN);
   Bool_t skipUsed = !(AliTPCReconstructor::GetRecoParam()->GetClusterSharing());
   //FindNearest3(y,z,roady,roadz,index);