Energy reconstruction of events in a multichannel γ-spectrometer