Articles · Tutorials
Monte Carlo for beginners: understanding simulation in 10 minutes
Discover the basics of Monte Carlo simulation applied to medical physics. A complete guide for students and radiotherapy professionals.
What is Monte Carlo simulation?
Monte Carlo simulation is a numerical method that uses random numbers to solve complex problems. In medical physics, it makes it possible to simulate the transport of particles (photons, electrons) through matter with remarkable accuracy.
The principle is simple: instead of solving the transport equations analytically, you simulate the individual path of millions of particles and observe the statistical results.
Why Monte Carlo in radiotherapy?
In radiotherapy, dosimetric accuracy is crucial. An error of a few percent in the delivered dose can have significant clinical consequences. Monte Carlo simulation makes it possible to:
- Calculate the absorbed dose with an accuracy of the order of 1-2%
- Model the interactions of photons and electrons with matter
- Check the algorithms of treatment planning systems
- Study complex geometries that are difficult to measure experimentally
The steps of a Monte Carlo simulation
1. Defining the source
The first step is to define the characteristics of the beam: type of particle (photon or electron), energy, field geometry, source-to-surface distance.
2. Particle transport
Each particle is followed individually. At each interaction, the program randomly determines:
- The type of interaction (photoelectric effect, Compton scattering, pair production)
- The direction of the scattered particle
- The energy transferred to the medium
3. Energy deposition
The energy deposited in each voxel of the medium is recorded. After simulating millions of particles, you obtain a statistically reliable dose map.
4. Analysis of the results
The results include percentage depth dose (PDD) curves, lateral dose profiles, and 3D dose distributions.
Monte Carlo codes in medical physics
Several codes are used in the field:
| Code | Developer | Speciality |
|---|---|---|
| GATE | OpenGATE | Imaging and radiotherapy |
| PRIMO | PRIMO team | Linear accelerators |
| EGSnrc | NRC Canada | Reference dosimetry |
| PENELOPE | NEA/OECD | Low-energy electrons |
| Geant4 | CERN | General purpose |
Practical application with DosiPlot
DosiPlot includes Monte Carlo data pre-calculated with PRIMO for common clinical configurations. This allows students to view and understand the results without having to run heavy simulations.
The energies available in DosiPlot:
- Photons: 6 MV and 15 MV
- Electrons: 6 MeV and 12 MeV
Tips for getting started
- Start by understanding the physics before diving into the code
- Use simple geometries (a homogeneous water phantom) for your first tests
- Always check your results against experimental data or benchmarks
- The number of particles matters: the more particles you simulate, the lower the statistical uncertainty
- Document your parameters: reproducibility is essential in research
FAQ
How many particles do you need to simulate?
For a statistical uncertainty below 2% on the dose, you generally need to simulate between 10 and 100 million particles, depending on the geometry and the spatial resolution you want.
Is Monte Carlo simulation exact?
The Monte Carlo method is considered the “gold standard” of dose calculation in radiotherapy. Its accuracy depends mainly on the interaction cross-sections used and on the number of particles simulated.
What is the difference between Monte Carlo and analytical algorithms?
Analytical algorithms (such as Pencil Beam or AAA) use approximations to speed up the calculation. Monte Carlo simulates each interaction individually, which makes it more accurate but slower. The difference is particularly noticeable in heterogeneous media and at tissue-air interfaces.
Does DosiPlot use Monte Carlo directly?
DosiPlot does not run a Monte Carlo simulation in real time. It uses data pre-calculated with the PRIMO code, which allows instant visualisation of the results.