X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=EMCAL%2FAliEMCALRecPoint.cxx;h=38ec13e4d3390be88dd82a43fa307f524487210d;hp=326609045838ca92dda8a05f526969c783e9cf71;hb=5c0368b8d81dcdd03bbc36014a9e2779cd75ea41;hpb=f792c3121f806b0722180f75dbd371fecfcafacb diff --git a/EMCAL/AliEMCALRecPoint.cxx b/EMCAL/AliEMCALRecPoint.cxx index 32660904583..38ec13e4d33 100644 --- a/EMCAL/AliEMCALRecPoint.cxx +++ b/EMCAL/AliEMCALRecPoint.cxx @@ -499,6 +499,7 @@ void AliEMCALRecPoint::EvalPrimaries(TClonesArray * digits) for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits digit = dynamic_cast(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(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++) @@ -564,13 +566,13 @@ void AliEMCALRecPoint::EvalParents(TClonesArray * digits) Int_t newparent = newparentarray[jndex] ; Int_t kndex ; Bool_t already = kFALSE ; - for ( kndex = 0 ; kndex < fMulTrack ; kndex++ ) { //check if not already stored + for ( kndex = 0 ; kndex < fMulParent ; kndex++ ) { //check if not already stored if ( newparent == tempo[kndex] ){ already = kTRUE ; break ; } } // end of check - if ( !already) { // store it + if ( !already && (fMulTrack < fMaxTrack)) { // store it tempo[fMulParent] = newparent ; fMulParent++ ; } // store it