Protection added (T.Kuhr)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 2004 08:15:41 +0000 (08:15 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Aug 2004 08:15:41 +0000 (08:15 +0000)
EMCAL/AliEMCALRecPoint.cxx
TRD/AliTRDtracker.cxx

index c27080e27920b43e45179724779d4054fbd67ee7..38ec13e4d3390be88dd82a43fa307f524487210d 100644 (file)
@@ -499,6 +499,7 @@ void  AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
   for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
     digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ; 
     Int_t nprimaries = digit->GetNprimary() ;
+    if ( nprimaries == 0 ) continue ;
     Int_t * newprimaryarray = new Int_t[nprimaries] ;
     Int_t ii ; 
     for ( ii = 0 ; ii < nprimaries ; ii++)
@@ -520,7 +521,7 @@ void  AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits)
          break ;
        }
       } // end of check
-      if ( !already) { // store it
+      if ( !already && (fMulTrack < fMaxTrack)) { // store it
        tempo[fMulTrack] = newprimary ; 
        fMulTrack++ ;
       } // store it
@@ -549,6 +550,7 @@ void  AliEMCALRecPoint::EvalParents(TClonesArray * digits)
   for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
     digit = dynamic_cast<AliEMCALDigit *>(digits->At( fDigitsList[index] )) ; 
     Int_t nparents = digit->GetNiparent() ;
+    if ( nparents == 0 ) continue ;
     Int_t * newparentarray = new Int_t[nparents] ;
     Int_t ii ; 
     for ( ii = 0 ; ii < nparents ; ii++)
@@ -570,7 +572,7 @@ void  AliEMCALRecPoint::EvalParents(TClonesArray * digits)
          break ;
        }
       } // end of check
-      if ( !already) { // store it
+      if ( !already && (fMulTrack < fMaxTrack)) { // store it
        tempo[fMulParent] = newparent ; 
        fMulParent++ ;
       } // store it
index f764263b841f793f7c831c5fd119176ffee900ea..bc654160406c50f0faf53bd6010f58ac63708aa7 100644 (file)
@@ -594,7 +594,10 @@ Int_t AliTRDtracker::PropagateBack(AliESD* event) {
        continue;
       }
       Double_t xTOF0 = 371. ;          
-      PropagateToOuterPlane(*track,xTOF0); 
+      if (!PropagateToOuterPlane(*track,xTOF0)) {
+        delete track;
+        continue;
+      }
       //      
       Double_t ymax=xtof*TMath::Tan(0.5*AliTRDgeometry::GetAlpha());
       Double_t y=track->GetYat(xtof);