Capture and escape in quantum wells as scattering events in Monte Carlo simulation