Accumulated path length for ions that reach a particular area of a patient is used in dose planning as an indicator of plan robustness. Also, the magnitude of the variations of the accumulated path lengths is determined for a number of beam directions, allowing beam directions to be selected for maximum robustness in treatment planning.