The elevated relative biological effectiveness (RBE) of heavy ions like carbon is the main reason for their use in radiotherapy and is due to the microscopic distribution of dose inside each particle track. High local doses produce lesions that are expected to have a diminished possibility of repair. Thus, RBE depends on track structure and on the biological repair capacity of the tissue that is affected by the irradiation. For tumor treatment planning with heavy ions, the beam quality and the tissue sensitivity have to be taken into account. Using the dependence of radial dose distribution on particle energy and atomic number on the physical side and x-ray dose response for the repair capacity on the biological side, the response to particle irradiation can be calculated in the local effect model (LEM) and used for treatment planning. This article traces the route from electron emission as the basis of track structure to the RBE calculation and the application in treatment planning.