34.5. Radiotherapy Simulation
Table of Contents
Clinical Goals of Radiotherapy Simulation
Radiotherapy simulation in Geant4 focuses on reproducing how therapeutic radiation beams deposit dose inside a patient or phantom. The primary clinical goal is to compute absorbed dose distributions with enough accuracy and resolution to support treatment planning, evaluation, and research into new techniques.
In a typical scenario, you want to know how much dose is delivered to the tumor volume and how much dose is unintentionally delivered to surrounding healthy tissues and organs at risk. Geant4 does this by transporting individual particles through a realistic model of the treatment head and the patient, and by tracking the energy deposited in each region of interest.
For beginners, it is helpful to think of a radiotherapy simulation as a virtual treatment machine, a virtual patient, and a virtual dose measurement system. The quality of the simulation is judged by how well it reproduces measured depth dose curves, beam profiles, absolute dose levels, and dose-volume relationships in clinically relevant geometries.
Geant4 based radiotherapy simulations are used for a wide range of purposes. These include validating or benchmarking commercial treatment planning systems, investigating small-field and stereotactic techniques, exploring new beam modalities, and studying doses in complex situations, such as near high-density implants or in very heterogeneous tissues. In all cases, the essential observable is dose, usually expressed in gray (Gy), and often normalized to a reference point or monitor unit condition.
Because patient safety is paramount, radiotherapy simulations must be carefully validated before any result is used to influence clinical practice. In this chapter, you focus on how to set up the main components specific to radiotherapy problems, leaving general Geant4 mechanics to other chapters.
Linac and Beam Modeling
Most external beam radiotherapy treatments use medical linear accelerators, or linacs, that generate megavolt photon or electron beams. A Geant4 radiotherapy model commonly starts by building a simplified but realistic representation of the linac head, from the particle source down to the patient surface.
A typical linac head model contains several key elements. First is the primary electron source, usually represented as a monoenergetic or slightly broadened electron beam incident on a target. For photon therapy beams, electrons hit a high-Z target, such as tungsten, to produce bremsstrahlung photons. Downstream, there is a primary collimator that shapes the initial cone of radiation, followed by flattening filters or flattening filter free components, monitor chambers, jaws, and possibly multileaf collimators. For electron therapy beams, the geometry is different, and includes scattering foils and applicators rather than a bremsstrahlung target and flattening filter.
You can model each of these components with Geant4 solids and materials, using technical data from the manufacturer if available, or approximate shapes if you only need generic behavior. Details such as leaf shapes in multileaf collimators and the precise positioning of jaws are especially important for small fields and intensity modulated techniques.
In many applications, you do not simulate the whole accelerator from the electron gun. Instead, you may use a phase space file recorded at some plane inside the head, or you may model a simplified effective photon source that reproduces measured beam characteristics. This trade off between realism and speed is central to practical radiotherapy simulations.
For proton and ion therapy, beam modeling replaces the linac head with the appropriate accelerator or beamline elements, including magnets, degraders, and nozzles. The same principles apply: you construct the beamline geometry, define the primary beam parameters, and ensure that the emergent beam at the patient surface matches measured dose distributions and spot properties.
Patient and Phantom Geometry
To study dose in realistic conditions, you introduce a patient or phantom geometry below the treatment head. For research or linac commissioning, this is often a water phantom, typically a rectangular box of water with dimensions large enough to contain the beam plus scattered radiation. You can place scoring volumes or voxels inside this phantom to obtain depth dose curves and lateral profiles.
Clinical studies require patient specific geometry. In that case, you usually represent the patient as a voxelized phantom derived from CT data. Each voxel has an associated material and density that reflects the local tissue composition. Geant4 provides classes for regular and parameterized geometries that can be used to build such voxel grids.
Within the patient or phantom, you may also define regions corresponding to target volumes and organs at risk, such as brain, spinal cord, lungs, or parotid glands. These can be logical volumes or groups of voxels. Even if you compute dose everywhere, these named regions are helpful for analysis, for example when you later build dose volume histograms.
It is important to ensure that the phantom or patient geometry extends far enough around the beam to capture scatter and that there are no unwanted overlaps between volumes. In radiotherapy, heterogeneities, such as lung, bone, and air cavities, have a strong influence on dose. Your geometry must represent these heterogeneities with adequate fidelity if you want clinically meaningful results.
Dose Scoring in Tissue
Once the beam and patient geometry are defined, the central task of radiotherapy simulation is to score dose in tissue. Geant4 gives you access to the energy deposited by each particle step. You accumulate this energy in well defined volumes inside the patient, then convert it to dose by dividing by the mass of each volume.
In practice, dose scoring is often implemented by dividing the phantom into a three dimensional grid of voxels and associating a dose value with each voxel. Every time a step deposits energy inside a voxel, you add that energy to the voxel total. At the end of the run, you convert the accumulated energy $E_i$ in voxel $i$ to a dose $D_i$ using the voxel mass $m_i$.
The absorbed dose in a volume $i$ is
$$D_i = \frac{E_i}{m_i},$$
where $E_i$ is the total energy deposited in joules and $m_i$ is the mass in kilograms. The resulting dose $D_i$ is in gray (Gy).
You can implement this manually using user actions and your own arrays, or you can rely on Geant4 scoring meshes and scorers. A scoring mesh lets you define a regular lattice over the phantom and attach a built in scorer that automatically computes quantities such as energy deposition or dose. This approach simplifies code and is especially convenient for beginners.
Statistical uncertainty is intrinsic to Monte Carlo dose scoring. For each voxel you can estimate the relative statistical error from the variance of the deposited energy over many histories. Regions with low fluence, such as outside the primary beam, require many more primary particles to reach the same statistical precision as regions near the central axis. When analyzing results, you should always consider both the dose and its associated uncertainty.
Clinical analysis typically uses dose profiles, depth dose curves, and dose volume histograms. Even if you do not implement these within Geant4, you can structure your output so that each voxel knows its spatial coordinates and dose value. External analysis tools, including ROOT, can then build the desired plots. Dose scoring in radiotherapy is not only about computing correct numerical values, but also about organizing them so that they can be compared with measurements and treatment planning results.
Beam Configurations and Treatment Plans
Radiotherapy treatments are rarely delivered with a single static beam. Instead, you have multiple fields, beam angles, and sometimes very complex fluence patterns. A flexible Geant4 radiotherapy model must therefore accommodate different beam configurations and, in more advanced work, complete treatment plans.
The simplest extension beyond a single field is to rotate the gantry or couch. In the simulation, you achieve this by rotating either the linac head geometry around the patient or, equivalently, by rotating the patient and keeping the head fixed. Consistent coordinate conventions are crucial so that beam angles in your model match the clinical definitions used by the treatment planning system.
For multi field treatments, you can run several simulations, one per beam, and then sum the resulting dose distributions with appropriate weight factors, or you can model all beams in a single Geant4 run by changing source directions and jaw or multileaf collimator settings between groups of events. Each configuration corresponds to a segment of the clinical plan, with its own number of monitor units or relative weight.
Intensity modulated and volumetric modulated treatments introduce further complexity, because both the fluence and field shape can vary continuously during delivery. To simulate this, you usually discretize the plan into a series of control points, each with specific leaf positions, jaw settings, and beam weights. Geant4 does not interpret treatment plans directly, so you must write code or use external tools that read a plan file, such as a DICOM RT Plan, and translate it into a sequence of beam configurations and source parameters.
Proton and ion therapy often use scanned pencil beams rather than shaped photon fields. Here, the plan defines a set of spots, each with a position, energy, and number of particles. Within Geant4, you loop over these spots, adjust the primary beam energy and direction, and distribute the correct number of primary particles according to the spot weights. Correct reproduction of spot positions and energies is essential to obtaining an accurate depth dose and lateral dose distribution.
Regardless of modality, your simulation must keep track of how many primary particles or monitor unit equivalent histories are assigned to each beam or segment. This is necessary to produce a composite dose distribution that matches the planned relative contributions. It is common to normalize simulations to a reference condition, and then scale doses to absolute units by comparison with measured calibration data.
Verification of Radiotherapy Simulations
Because radiotherapy simulations can influence clinical decisions, verification and validation are non negotiable. Verification in this context means checking that your Geant4 model implementation is correct and that it reproduces expected physical behavior under controlled conditions.
A standard first step is to compare simulated percentage depth dose curves and beam profiles in a water phantom with measurements from the same machine and beam settings. You place scoring voxels along the central axis and perpendicular directions, run enough histories, and then normalize the results at a reference depth, such as $d_{max}$. Agreement within a few percent in both depth dose and profiles over the clinically relevant field sizes and depths is a basic requirement for a credible model.
Later, you can test more complex configurations, such as off axis fields, different field sizes, and heterogeneous phantoms that mimic bone, lung, or air cavities. For these test cases, measurements may come from ionization chambers, diodes, films, or three dimensional dosimetry systems. The comparison may involve point doses, planar dose distributions, or three dimensional dose maps.
A powerful way to summarize the agreement between simulation and measurement is to use gamma index analysis, where each point in the dose distribution is tested for agreement in both dose difference and spatial distance to agreement. Although Geant4 does not compute gamma indices itself, your output should be suitable for use with external gamma analysis tools. This type of analysis is particularly useful for validating complex fields, such as intensity modulated or stereotactic treatments.
Verification also includes checks that are internal to the simulation. You should confirm that energy is conserved within reasonable numerical limits and that secondary particle production is consistent with your chosen physics list. You may inspect secondary particle spectra, track length distributions, or specific interaction rates to ensure that nothing unexpected happens in your model.
Finally, you should pay attention to numerical and statistical uncertainties. For each voxel, or at least for representative positions, you should estimate the statistical error and ensure that it is smaller than the level of agreement you wish to claim. It is not meaningful to compare simulation and measurement within 2 percent if your Monte Carlo statistical uncertainty is 5 percent. Verification therefore requires not just agreement in mean values but also a good understanding of the uncertainty in your simulated results.
With a verified model, you can move with more confidence to patient specific simulations, research on new techniques, or detailed studies of dose in challenging clinical situations, while always recognizing that continuous validation against experimental data remains a core part of radiotherapy simulation practice.
Views: 8
KAHIBARO