--- calo/flight/CaloNuclei/src/CaloNuclei.cpp 2008/03/12 14:19:21 1.12 +++ calo/flight/CaloNuclei/src/CaloNuclei.cpp 2008/03/14 09:24:35 1.13 @@ -145,8 +145,10 @@ Int_t mindx = (Int_t)TMath::LocMax(indx,vfpl); for (Int_t ii=0; ii=0 && stfpl[ii] == stfpl[mindx-1] ) stdedx1 += vfpl[ii]; - if ( (mindx+1)<96 && stfpl[ii] == stfpl[mindx+1] ) stdedx1 += vfpl[ii]; + if ( (mindx-1)>=0 && stfpl[ii] == (stfpl[mindx]-1) ) stdedx1 += vfpl[ii]; + if ( (mindx+1)<96 && stfpl[ii] == (stfpl[mindx]+1) ) stdedx1 += vfpl[ii]; + // if ( (mindx-1)>=0 && stfpl[ii] == stfpl[mindx-1] ) stdedx1 += vfpl[ii]; + // if ( (mindx+1)<96 && stfpl[ii] == stfpl[mindx+1] ) stdedx1 += vfpl[ii]; }; } else { stdedx1 = 0.;