Deaccelerating an electron beam