Penetration of an electron beam in a solid material: a simple model and a numerical simulation