  In this work, a generic rigorous Bayesian formalism is introduced to predict
the most likely path of any ion crossing a medium between two detection points.
The path is predicted based on a combination of the particle scattering in the
material and measurements of its initial and final position, direction and
energy. The path estimate's precision is compared to the Monte Carlo simulated
path. Every ion from hydrogen to carbon is simulated in two scenarios to
estimate the accuracy achievable: one where the range is fixed and one where
the initial velocity is fixed. In the scenario where the range is kept
constant, the maximal root-mean-square error between the estimated path and the
Monte Carlo path drops significantly between the proton path estimate (0.50 mm)
and the helium path estimate (0.18 mm), but less so up to the carbon path
estimate (0.09 mm). In the scenario where the initial velocity is kept
constant, helium have systematically the minimal root-mean-square error
throughout the path. As a result, helium is found to be the optimal particle
for ion imaging.
