Calculations for cancer radiotherapy with pion beams