Skip to content
DosiPlot
EN
Download

Articles · Tutorials

GATE vs PRIMO: comparing Monte Carlo tools

Comparative analysis of GATE and PRIMO for Monte Carlo simulation in medical physics: advantages, limitations and use cases.

By Dr Yassine Oulhouq · · 8 min read

Introduction to Monte Carlo simulation in medical physics

Monte Carlo simulation has become an essential tool in medical physics. It makes it possible to model the transport of particles through matter with remarkable accuracy, by simulating each physical interaction individually. Among the many codes available, two tools stand out for their accessibility and their growing adoption in the community: GATE and PRIMO.

These two programs meet different needs and rely on distinct simulation engines. This article offers a detailed comparative analysis to help medical physicists, researchers and students choose the tool best suited to their problem.

GATE: the versatile platform

Architecture and simulation engine

GATE (Geant4 Application for Tomographic Emission) is a Monte Carlo simulation platform built on top of CERN’s Geant4 library. Geant4 is a general-purpose framework for simulating particle transport, used in fields ranging from high-energy physics to space physics.

GATE wraps the complexity of Geant4 in a macro-style interface (script files) that lets users define simulations without writing C++ code. Geometries, radiation sources, detectors and physics parameters are described in readable text files.

Fields of application

GATE is particularly well suited to:

  • Nuclear imaging: simulation of gamma cameras, SPECT and PET
  • External beam radiotherapy: modelling of photon and electron beams
  • Brachytherapy: simulation of sealed radioactive sources
  • Hadron therapy: transport of protons and carbon ions
  • Radiation protection: estimation of secondary doses and shielding
  • CT imaging: simulation of computed tomography systems

Physical models

Geant4 offers several physics lists (Physics Lists) that group the interaction models for different types of particles and energy ranges. For medical physics, the most widely used lists are:

  • emstandard_opt3 and emstandard_opt4: electromagnetic models optimised for dosimetry
  • QGSP_BIC_HP: for hadron therapy, with accurate hadronic models
  • Livermore and Penelope: low-energy models for imaging and low-energy photons

PRIMO: the solution dedicated to LINAC dosimetry

Architecture and simulation engine

PRIMO is a stand-alone program designed specifically for the Monte Carlo simulation of the linear accelerators (LINACs) used in radiotherapy. It is based on the PENELOPE code (PENetration and Energy LOss of Positrons and Electrons), a Monte Carlo code developed by the University of Barcelona and the OECD/NEA.

PENELOPE is recognised for its detailed modelling of electromagnetic interactions at low and medium energy, with a rigorous treatment of the elastic scattering of electrons and of polarisation effects.

Fields of application

PRIMO specialises in:

  • Photon beam dosimetry: depth dose curves, dose profiles
  • Electron beam dosimetry: simulation of applicators
  • Modelling of linear accelerators: Varian, Elekta and Siemens
  • Dose calculation in the patient: from CT images
  • Verification of planning systems: comparison with TPS algorithms

Physical models

PENELOPE uses a mixed simulation scheme for the transport of electrons and positrons. Interactions fall into two categories:

  • Hard interactions (hard collisions): simulated individually, with exact conservation of energy and momentum
  • Soft interactions (soft collisions): treated collectively through multiple-scattering distributions

This scheme gives a good compromise between accuracy and computing time.

Detailed comparison

Comparison table

CriterionGATEPRIMO
MC engineGeant4PENELOPE
InterfaceMacro scripts (text)Graphical interface (GUI)
Operating systemLinux (native), macOSWindows, Linux
LicenceOpen-source (LGPL)Free (academic use)
Learning curveSteepModerate
Nuclear imagingExcellentNot supported
LINAC dosimetryGoodExcellent
LINAC modelsTo be built by the userPre-integrated (Varian, Elekta)
Hadron therapyExcellentNot supported
BrachytherapyGoodNot supported
Patient dose calculationVia extension (DICOM)Integrated
ParallelisationMPI, multi-threadingMulti-threading
VisualisationOpenGL (via Geant4)Integrated
DocumentationExtensive, community-drivenComplete, structured

Ease of use

PRIMO offers a considerable advantage in terms of accessibility. Its graphical interface lets you set up a complete simulation in a few clicks: selecting the accelerator model, defining the geometry, choosing the physics parameters and launching the simulation. The results (PDD, profiles, 2D and 3D distributions) can be viewed directly in the interface.

GATE requires a command of macro files and an understanding of the Geant4 architecture. Setting up a simulation involves writing scripts that define the geometry, the sources, the physical models and the actors (scoring systems). This approach offers maximum flexibility but demands a significant initial investment.

Performance and computing time

Simulation times depend strongly on the geometry, the number of particles and the accuracy required. In general:

  • PRIMO is optimised for LINAC simulation and offers pre-computed phase spaces that speed up simulations considerably. Simulating the accelerator head can be avoided if a matching phase space is available.

  • GATE is more general-purpose and does not systematically benefit from these LINAC-specific optimisations. However, it supports MPI parallelisation, which makes it possible to distribute the calculations across computing clusters.

For a typical depth dose simulation of a 6 MV beam in a water phantom (10 x 10 cm2, 100 million particles):

PlatformApproximate time (8 cores)
PRIMO (with phase space)30 min - 1 h
PRIMO (full simulation)2 - 4 h
GATE (Geant4)3 - 6 h

Verification and benchmarks

Both tools have been extensively compared with experimental measurements:

PRIMO has been checked against Varian Clinac and TrueBeam accelerators, as well as Elekta accelerators, with agreement between measured and simulated dose generally within 2% in regions of steep gradient and within 1% in regions of electronic equilibrium.

GATE has been checked in a large number of configurations, from nuclear imaging to radiotherapy. Reference benchmarks are maintained by the OpenGATE community and regularly published in peer-reviewed journals.

Practical use cases

Case 1: Checking a TPS in radiotherapy

To check the dose calculation algorithms of a treatment planning system, PRIMO is the most relevant choice. It makes it possible to:

  1. Select the exact model of the clinical accelerator
  2. Define the beam parameters (energy, field size, collimator angle)
  3. Simulate the dose distribution in a water phantom or in the patient (from CT images)
  4. Compare the results with those of the TPS (profiles, PDD, 2D distributions)

Case 2: Simulating a PET system

To model a PET scanner and optimise its performance, GATE is indispensable. It makes it possible to:

  1. Define the complete geometry of the scanner (crystals, detectors, electronics)
  2. Simulate the radioactive sources (activity distribution)
  3. Model the detection chain (energy resolution, time windowing)
  4. Generate simulated sinograms for image reconstruction

Case 3: Dosimetric study in hadron therapy

To evaluate the dose delivered by proton beams, including the secondary dose due to neutrons, GATE is necessary because:

  1. It includes the hadronic models of Geant4 for the transport of protons and nuclear fragments
  2. It makes it possible to calculate the dose contributions of the different secondary particles
  3. It supports the simulation of passive scattering and active scanning systems

Case 4: Commissioning a new accelerator

When a new accelerator is commissioned, PRIMO makes it easier to:

  1. Compare measured data with reference simulations
  2. Adjust the beam model parameters (initial energy, focal spot size)
  3. Generate additional data for configurations that were not measured

Outlook and developments

GATE 10 and beyond

The OpenGATE community is working on major developments:

  • GATE 10: an architectural overhaul with Python as the main interface, gradually replacing text macros
  • GPU integration: speeding up simulations by computing on a graphics card
  • Deep learning models: coupling with neural networks to speed up dose calculations

PRIMO and new technologies

PRIMO continues to expand to support:

  • New treatment modalities (VMAT, stereotactic treatments)
  • Latest-generation accelerators (Halcyon, Ethos)
  • Integration with treatment verification systems

How DosiPlot fits in

DosiPlot uses Monte Carlo data pre-computed with PRIMO. The depth dose curves and dose profiles available in DosiPlot were generated from PRIMO simulations, giving students and physicists immediate access to simulated dose curves without having to run simulations that take a long time to compute.

FAQ

Can I use GATE on Windows?

GATE is natively developed for Linux. Using it on Windows is possible through the Windows Subsystem for Linux (WSL2) or through a virtual machine. However, for optimal use, installation on a native Linux system (Ubuntu, CentOS) is recommended. PRIMO, on the other hand, has a native Windows version, which makes it easier to deploy in a clinical environment.

Which tool should I choose for a thesis in medical physics?

The choice depends on the research topic. For a thesis focused on photon beam dosimetry or TPS checking, PRIMO is generally sufficient and lets you produce results quickly. For a thesis in nuclear imaging, hadron therapy, or one that needs great flexibility in defining geometries, GATE is preferable. In some cases, the two tools can be used in a complementary way.

Are GATE and PRIMO results comparable?

Yes. For the configurations where both tools apply (photon beam dosimetry), the results are generally in excellent agreement (differences below 1-2%). Any discrepancies come mainly from differences in the physical models (Geant4 vs PENELOPE) and in the simulation parameters (cut-off thresholds, transport parameters).

How long does it take to learn to use these tools?

For PRIMO, a medical physicist familiar with the basic concepts of Monte Carlo simulation can be operational within a few days to a week. For GATE, you should allow several weeks to a few months to master the macro files and understand the Geant4 architecture. Tutorials and online courses are available for both tools, and the user communities are active and accessible.