--- calo/flight/CaloNuclei/src/CaloNuclei.cpp 2007/11/26 08:48:24 1.11 +++ calo/flight/CaloNuclei/src/CaloNuclei.cpp 2008/03/14 09:24:35 1.13 @@ -142,11 +142,13 @@ // find energy released along the strip of maximum on the first plane and on the two neighbour strips // if ( indx > 0 ){ - Int_t mindx = (Int_t)TMath::LocMax(indx,stfpl); + 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.;