  Both the interplanetary space and the Earth magnetosphere are populated by
low energy ($\leq300$ keV) protons that are potentially able to scatter on the
reflecting surface of Wolter-I optics of X-ray focusing telescopes and reach
the focal plane. This phenomenon, depending on the X-ray instrumentation, can
dramatically increase the background level, reducing the sensitivity or, in the
most extreme cases, compromising the observation itself. The use of a magnetic
diverter, deflecting protons away from the field of view, requires a detailed
characterization of their angular and energy distribution when exiting the
mirror. We present the first end-to-end Geant4 simulation of proton scattering
by X-ray optics and the consequent interaction with the diverter field and the
X-ray detector assembly, selecting the ATHENA Wide Field Imager as a case study
for the evaluation of the residual soft proton induced background. We obtain
that, in absence of a magnetic diverter, protons are indeed funneled towards
the focal plane, with a focused Non X-ray Background well above the level
required by ATHENA science objectives ($5\times10^{-4}$ counts cm$^{-2}$
s$^{-1}$ keV$^{-1}$), for all the plasma regimes encountered in both L1 and L2
orbits. These results set the proton diverter as a mandatory shielding system
on board the ATHENA mission and all high throughput X-ray telescopes operating
in the interplanetary space. For a magnetic field computed to deflect 99\% of
the protons that would otherwise reach the WFI, Geant4 simulations show that
this configuration, in the assumption of a uniform field, would efficiently
shield the focal plane, yielding a residual background level of the order or
below the requirement.
