Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 May 2005 09:55:35 +0000 (09:55 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 May 2005 09:55:35 +0000 (09:55 +0000)
RICH/AliRICHClusterFinder.cxx

index 9c243c9..8351b10 100644 (file)
@@ -213,11 +213,13 @@ void AliRICHClusterFinder::FindLocalMaxima()
       }
     }
     if(iNotMax==0) {
-      TVector2 x2=AliRICHParam::Pad2Loc(pad1);
-      fLocalX[fNlocals]=x2.X();fLocalY[fNlocals]=x2.Y();
-      fLocalQ[fNlocals] = (Double_t)padQ1;
-      fLocalC[fNlocals] = padC1;
-      fNlocals++;
+      if (fNlocals<100) {
+       TVector2 x2=AliRICHParam::Pad2Loc(pad1);
+       fLocalX[fNlocals]=x2.X();fLocalY[fNlocals]=x2.Y();
+       fLocalQ[fNlocals] = (Double_t)padQ1;
+       fLocalC[fNlocals] = padC1;
+       fNlocals++;
+      }
     }
   }
   AliDebug(1,Form("Number of local maxima found ---> %i",fNlocals));