X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALUnfolding.cxx;h=c9d603fd07de7b6f1ef114adaa2e7e6dec4dedd9;hb=01b4609893fba0ccc67b985a5f904f3ca35d1283;hp=df27c8fb01cdd22e281ecb90b0a16b847c66acbd;hpb=37486cebd88560b91a0c0f7703b911cd93e91510;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALUnfolding.cxx b/EMCAL/AliEMCALUnfolding.cxx index df27c8fb01c..c9d603fd07d 100644 --- a/EMCAL/AliEMCALUnfolding.cxx +++ b/EMCAL/AliEMCALUnfolding.cxx @@ -779,10 +779,16 @@ Bool_t AliEMCALUnfolding::FindFitV2(AliEMCALRecPoint * recPoint, AliEMCALDigit * Int_t iphi = 0 ;//x direction Int_t ieta = 0 ;//z direstion - for(iDigit = 0; iDigit < nDigits; iDigit++){ + for(iDigit = 0; iDigit < nDigits; iDigit++) + { digit = maxAt[iDigit]; - if(digit==0) AliError("energy of digit = 0!"); - fGeom->GetCellIndex(digit->GetId(),iSupMod,iTower,iIphi,iIeta); + if(!digit) + { + AliError("Null digit pointer"); + continue; + } + + fGeom->GetCellIndex(digit->GetId(),iSupMod,iTower,iIphi,iIeta); fGeom->GetCellPhiEtaIndexInSModule(iSupMod,iTower, iIphi, iIeta,iphi,ieta);