Analysis of the response evolution of the CMS electromagnetic calorimeter under electron and pion irradiation