Computer simulation of the UMER electron gun