A radiotherapy system is disclosed. The radiotherapy system comprises an electron beam generator for generating an electron beam and a magnetic field generator for generating a magnetic field. In some embodiments of the present invention, the system further comprises a controller for controlling the electron beam and the magnetic field generators such that the electron beam is dynamically shifted and the magnetic field is dynamically redirected synchronously with the shifting.