Monte Carlo method for proton and heavy ion treatment room shielding calculation