# Dose Calculation Algorithms for External Radiation Therapy: An Overview for Practitioners
## 2 Dose Calculation Algorithm for Photon Beams  
A photon dose calculation algorithm must model the energy deposition pattern induced by a clinical RT X-ray beam from a radiation source, most commonly from a linear accelerator (LINAC), in patient tissues, characterized by the electron density derived from computed tomography (CT) imaging of patients. The accelerator head represents the radiation source and patient tissues and organs stands for the interaction targets. Photons interact with matter according to a stochastic process that depends on photon energy and on the atomic number and density of the medium through which they travel. The principal types of photon interaction in the megavoltage energy range are the photoelectric effect, Compton scattering and pair production, which attenuate the beam according to the Lambert-Beer law [7] with an overall linear attenuation coefficient \(\mu(E)\) given by the sum of single-process attenuation coefficients.  
Modern dose calculation algorithms (Figure 1)--the so called model-based algorithms, in contraposition to correction-based algorithms--for photon beams are based on the total energy released in matter (TERMA) value, which is the total energy per unit of target mass released at the primary photon interaction point [8].  
The differential TERMA energy distribution \(T_{E}(\mathbf{r})\) is related to the energy differential fluence \(\psi_{E}(\mathbf{r})\) of the primary photon beam by the following relation:  
\[T_{E}(\mathbf{r})=\frac{\mu}{\rho}(\mathbf{r},E)\psi_{E}(\mathbf{r}) \tag{1}\]  
where \(\rho(\mathbf{r})\) is the local density, estimated from the CT number value, and \(\frac{\mu}{\rho}(\mathbf{r},E)\) is the mass attenuation coefficient at \(\mathbf{r}\).  
Integrating over the beam spectrum, we obtain the TERMA [8]:  
\[T\left(\mathbf{r}\right)=\int_{E}\frac{\mu}{\rho}(\mathbf{r},E)\psi_{E}(r)dE \tag{2}\]  
Figure 1: Historical evolution of dose calculation engines and their relative accuracy. Abbreviations: PBC: pencil beam convolution, AAA: analytical anisotropic algorithm, CCC: collapsed cone convolution, MC: Monte Carlo, LBTE: linear Boltzmann transport equations.  
If released energy is absorbed locally, TERMA coincides with the absorbed dose. Conversely, if a secondary energy transport is considered, the dose in a homogenous medium can be derived as the following convolution:  
\[D(r)=\int_{E}\,\int_{V}T_{E}(\mathbf{s})h(\mathbf{r}-\mathbf{s},\ E)dsdE \tag{3}\]  
where \(h(\mathbf{s},\ E)\) is the normalized point spread function, or \"dose spread kernel\" (DSK), at energy \(E\) and position \(\mathbf{s}\) relative to the point of scattering of the primary photon [8]. The DSK describes the energy transport by the secondary particles, including single and multiple scattered photons, photoelectric electrons, Compton electrons, electron-positron pairs, bremsstrahlung photons, photonuclear particles and so on.  
For inhomogeneous media, the translation invariance is broken and a single DSK can no longer account for the secondary transport throughout the target. In this case, a full superposition integral need to be carried out:  
\[D(\mathbf{r})=\frac{1}{\rho(\mathbf{r})}\,\int_{E}\,\int_{V}T_{E}(\mathbf{s})\rho(\mathbf{s})k( \mathbf{r},\mathbf{s},E)dsdE \tag{4}\]  
where \(k(\mathbf{r},\mathbf{s},E)\) is the normalized energy delivered at point \(\mathbf{r}\) by secondary particles, associated to a primary photon of energy \(E\) interacting in \(\mathbf{s}\):  
\[\int_{V}k(\mathbf{r},\mathbf{s},E)dr=1 \tag{5}\]