Computation of cell survival in heavy ion beams for therapy