Reconstruction of the signal amplitude of the CMS electromagnetic calorimeter