Focusing of an electron beam