Improved bethe bloch ion stopping calculation to take energy as input rather than beta