Ion beams in radiotherapy - From tracks to treatment planning