Fast particle irradiation of solids: Excitation of secondary electrons and the related energy-deposition function