Monte Carlo simulation of the interaction of electrons with supported and unsupported thin films