MedPhys - 12.1 - Photon Beam Treatment Planning I: Dose calculations algorithms.