Skip to main content
v2026.11,986 entries · CC-BY 4.0

Geant4: Architecture, Physics Lists & Lab Guide

Comprehensive guide to Geant4: core C++ architecture, reference physics lists, geometry modeling, multi-threaded tracking, and laboratory simulation setups.

Written and maintained by CASRAI Editorial Board

Published

On this page

Short answer

Geant4 (GEometry ANd Tracking 4) is an open-source C++ software toolkit developed by an international collaboration hosted at CERN for simulating particle interactions in matter using Monte Carlo statistical methods. It models electromagnetic, hadronic, and optical processes from sub-electron-volt chemistry to multi-TeV collider physics, powering detector design, medical radiation dosimetry, and space shielding.

Definition and scope

Geant4 is an object-oriented software toolkit designed to simulate the microscopic interactions of ionizing radiation with physical materials. Developed as the successor to the Fortran-based GEANT3 package used during CERN’s Large Electron-Positron (LEP) collider era, Geant4 was re-engineered from first principles in C++ during the mid-1990s. The foundational architecture, detailed by Agostinelli et al. (2003) and expanded by Allison et al. (2006, 2016), established a modular simulation framework that removed the geometric and physical limitations of legacy codes.

The toolkit is maintained and continuously updated by the international Geant4 Collaboration, a worldwide consortium of national laboratories—including CERN, SLAC, KEK, INFN, and Fermilab—alongside space agencies such as ESA and academic medical physics research groups. The software is distributed under the open-source Geant4 Software License, supporting research, educational, and commercial utilization in accordance with open-source software principles.

The operational scope of Geant4 spans four core capabilities:

  • Geometry definition and navigation: Constructing spatial setups from microscopic cellular organelles to kilometer-scale collider calorimeters using Constructive Solid Geometry (CSG), boundary representations, tessellated solids, CAD exchanges via GDML, and voxelized patient CT scans.
  • Particle interaction physics: Modeling electromagnetic processes (photoelectric, Compton, pair production, bremsstrahlung, multiple scattering), hadronic interactions (elastic, intra-nuclear cascades, pre-equilibrium, fission, string fragmentation), and optical processes (Cherenkov, scintillation, reflection).
  • Energy range coverage: Tracking particles from thermal neutron energies (0.025 eV) and sub-excitation electronic thresholds (down to ~7.4 eV in water via Geant4-DNA) up to cosmic-ray scales exceeding 100 TeV.
  • Event scoring and readout: Recording particle tracks, energy deposition, secondary generation, charge collection, and pulse generation via customizable sensitive detectors and automated mesh scorers.

Geant4 is defined strictly as a toolkit rather than a turnkey monolithic executable. Instead of running a static binary with an input deck, researchers build custom applications by subclassing core C++ base classes, retaining programmatic control over event generation, materials, tracking, and data acquisition.

How it works or how it is used in practice

A Geant4 simulation program operates through an execution pipeline that initializes static data structures before processing stochastic particle history events. At the top level, an application instantiates a run manager (such as G4MTRunManager or G4TaskRunManager) to coordinate state transitions between pre-initialization, initialization, and the active event loop.

Mandatory User Initialization Classes

Every Geant4 application must register three mandatory initialization classes with the run manager:

  1. Detector Construction (G4VUserDetectorConstruction): Defines the experimental setup using a three-tier hierarchy:
    • Solid (G4Solid): Specifies spatial shape and dimensions (e.g., G4Box, G4Tubs, or Boolean combinations).
    • Logical Volume (G4LogicalVolume): Assigns physical properties to the solid, including material composition (from NIST databases via G4NistManager or isotopic fractions), electromagnetic fields, step limits, and sensitive detector hooks.
    • Physical Volume (G4VPhysicalVolume): Places a logical volume at a precise coordinate and rotation inside an enclosing mother volume (e.g., G4PVPlacement). The root volume is the World volume.
  2. Physics List (G4VModularPhysicsList): Registers all particle species and activates specific physical processes. Rather than coding individual cross sections, teams select or configure vetted reference physics lists.
  3. Action Initialization (G4VUserActionInitialization): Instantiates thread-local user actions on worker threads while managing master-thread synchronization in multi-threaded environments.

User Action Hooks and Tracking Mechanics

During the event loop, user action classes inject custom behaviors into the tracking pipeline:

  • G4VUserPrimaryGeneratorAction (mandatory): Generates primary beam particles per event using G4ParticleGun or G4GeneralParticleSource (GPS).
  • G4UserRunAction: Handles run-level setup and teardown, file input/output (ROOT, CSV, HDF5), and global histogram booking.
  • G4UserEventAction: Executes at event boundaries for event filtering and raw detector hit extraction.
  • G4UserSteppingAction: Intercepts individual tracking steps, granting real-time access to energy loss, momentum changes, and volume boundaries.
  • G4UserTrackingAction and G4UserStackingAction: Manage particle track lifecycles and prioritize secondary particles within tracking stacks.

Particle Transport and Range Cuts

Particle transport proceeds through discrete integration steps. Dynamic particle state is encapsulated in a G4Track object, and each step displacement is represented by G4Step. For each step, active continuous and discrete processes propose candidate step lengths:

Step Length = min(s_geom, s_physics, s_user)

The geometric limit (s_geom) is determined by the navigator projecting trajectories against volume boundaries, while physical interaction distances (s_physics) are sampled stochastically from total cross sections Σ = Σ_i n_i σ_i. If a physical process wins, the particle interacts and secondary particles are stacked; if the boundary wins, the particle steps to the interface and transfers to the adjacent volume.

Unlike codes that terminate particles below fixed kinetic energy thresholds, Geant4 enforces a production cut-by-range (via SetCutsWithDefault(), typically in millimeters). The toolkit converts this spatial range into material-specific energy thresholds for each volume. Secondaries with ranges below the cut threshold are not tracked as distinct particles; instead, their energy is deposited locally as continuous loss along the parent track, dramatically accelerating execution without boundary artifacts.

Multi-Threaded Architecture (Geant4-MT)

Since release 10.0, Geant4 has featured a master-worker multi-threading architecture (Allison et al., 2016) that scales efficiently across multi-core systems:

  • Shared Master Memory: Geometry, materials, and physics cross-section tables are allocated once on the master thread and accessed read-only by all worker threads, preventing memory duplication.
  • Thread-Private Memory: Each worker thread runs an independent event loop with private instances of run managers, event managers, and hit collections.

Because particle histories are statistically independent, worker threads process events concurrently without lock contention. At run conclusion, thread-local tallies are merged into the master thread, yielding near-linear core scaling with minimal RAM overhead.

Evaluating Geant4 requires examining both application architectures—raw C++ programming versus domain frameworks—and alternative Monte Carlo transport engines across particle and nuclear engineering fields.

Direct C++ Development versus Domain Application Frameworks

Because writing native Geant4 requires advanced C++ programming, international consortia have developed declarative software wrappers built on top of the Geant4 kernel:

  • TOPAS (Tool for Particle Simulation): Developed by Perl et al. (2012) for proton and carbon-ion radiotherapy. TOPAS uses text parameter files to define treatment nozzles, beam modulation wheels, and patient CT imports directly from hospital PACS archives using DICOM standards (compatible with DICOMweb protocols). Its physics lists conform to IAEA TRS-398 clinical dosimetry standards.
  • GATE (Geant4 Application for Tomographic Emission): Created by the OpenGATE Collaboration (Jan et al., 2004) for PET, SPECT, CT, and optical imaging. GATE integrates time-dependent scanner rotations, radionuclide decay kinetics, detector dead-time, and respiratory motion.
  • BDSIM (Beam Delivery Simulation): Simulates accelerator beamlines, synchrotron radiation, and tunnel backgrounds directly from optical lattice files (MADX).
  • ESA SPENVIS and GRAS: European Space Agency tools for satellite radiation belt integration, total ionizing dose (TID), and single-event upset modeling without writing C++ code.

Geant4 Compared with Alternative Monte Carlo Transport Engines

The table below summarizes key differences between Geant4 and major alternative Monte Carlo radiation transport platforms:

Simulation Code Governing Organization Primary Language Licensing Model Geometry Specification Primary Application Strengths
Geant4 CERN & International Collaboration C++ Open Source (Geant4 License) Constructive Solid Geometry (CSG), CAD / GDML, Voxelized CT Collider detectors, beamlines, hadron therapy, nanoscale radiobiology
MCNP Los Alamos National Laboratory Fortran 90 / C Proprietary (U.S. Export Controlled / 10 CFR Part 810) Surface-sense combinatorial geometry Criticality safety, reactor physics, neutron shielding, nonproliferation
FLUKA CERN / INFN Collaboration Fortran 77 / C++ Custom Non-Commercial CERN License Combinatorial geometry via Flair GUI Accelerator radiation protection, spallation targets, heavy ion therapy
EGSnrc National Research Council of Canada Mortran3 / C Open Source (GNU AGPLv3) RGS cylindrical / voxel phantoms Benchmark electron and photon clinical medical physics dosimetry

While MCNP remains the standard for licensed reactor physics, Geant4 is predominant in high-energy physics and multidisciplinary detector development due to its open-source C++ API and geometry flexibility. Methodological studies comparing transport codes regularly appear in journals such as Computer Physics Communications.

The dataset below compares standard Geant4 reference physics lists, detailing high-energy inelastic models, nuclear cascade engines, neutron precision, and computational overhead.

Where it matters for labs, clinics or supply decisions

Geant4 serves as an indispensable computational baseline across research, clinical, and industrial sectors where physical measurements require validation against first-principles simulations.

High-Energy Collider Experiments

At facilities like CERN’s Large Hadron Collider, Geant4 models detector responses for ATLAS, CMS, ALICE, and LHCb. Experimental collision data are analyzed by comparing observed signals against billions of Monte Carlo simulated events across silicon trackers, liquid argon calorimeters, and muon spectrometers.

Clinical Radiation Oncology and Proton Therapy

In radiation oncology, Geant4 and TOPAS serve as reference standards for clinical treatment planning systems (TPS). Commercial TPS algorithms rely on analytical approximations that exhibit dose calculation errors exceeding 5% near tissue-bone-air interfaces. Medical physics teams use Geant4 to perform full Monte Carlo recalculations of treatment plans in patient CT geometries, ensuring dose delivery conforms to AAPM TG-51 and IAEA TRS-398 dosimetry protocols.

Radiobiology and Nanoscale Dosimetry (Geant4-DNA)

Biological radiation damage depends on microscopic ionization clustering along particle tracks. Through Geant4-DNA (Incerti et al., 2010, 2018), researchers model discrete physical cross sections in liquid water down to 7.4 eV, trace water radiolysis up to 1 microsecond, and quantify single- and double-strand DNA breaks to evaluate relative biological effectiveness (RBE).

Radiation Safety, Shielding, and Facility Compliance

Laboratories operating accelerators, cyclotrons, or isotopic sources use Geant4 to design shielding walls, labyrinths, and beam dumps. Simulations predict secondary neutron and gamma dose rates outside barriers, verifying compliance with national regulations and oversight by the institutional Radiation Safety Committee (RSC).

Computing Infrastructure and Reproducibility

Deploying Geant4 in institutional environments requires specific computational provisioning:

  • Memory Sizing: In multi-threaded mode, master geometry and cross-section tables require 500 MB to 2 GB of RAM. Worker threads require only 50 to 150 MB each, allowing a 64-core node to run efficiently with 8 to 16 GB of system RAM.
  • External Data Libraries: Simulations require 5 to 10 GB of external cross-section datasets (e.g., G4NDL, G4EMLOW), configured via environment variables like G4NEUTRONHPDATA.
  • Computational Reproducibility: Ensuring computational reproducibility across cluster runs requires explicit pseudo-random number generator seeding (e.g., MixMaxRng, Ranlux64), recording master seeds, and version-locking Geant4 releases and data libraries.
  • GPU Acceleration: Research projects such as CERN AdePT and US DOE Celeritas are actively developing GPU-native transport engines to offload electromagnetic showers to graphics hardware while maintaining compatibility with Geant4 geometries.

Common misunderstandings

Several frequent misconceptions lead to operational and modeling errors among Geant4 users:

Misunderstanding 1: Geant4 Is a Standalone Executable

Geant4 is a software development toolkit of C++ libraries, not a standalone program. Users write a C++ application and compile it with CMake. Researchers seeking turnkey executables should adopt pre-built frameworks like TOPAS or GATE.

Misunderstanding 2: Confusing Range Cuts with Energy Thresholds

Setting range cuts excessively small (e.g., 1 micrometer across a large detector) forces the tracking of vast numbers of soft delta-electrons that never escape their initial voxel, multiplying runtime without improving macroscopic dose accuracy. Range cuts should align with physical detector voxel sizes.

Misunderstanding 3: Overlapping Geometries Cause No Harm

Physical volumes must not overlap unless arranged in an explicit mother-daughter hierarchy. Geometry overlaps cause navigation failures, infinite stepping loops, and corrupted cross-section lookups. Overlaps must be screened using /geometry/test/run.

Misunderstanding 4: A Single Physics List Suits All Applications

No single physics list is universally optimal. Using high-energy FTFP_BERT for neutron shielding causes errors due to parameterized capture models; high-precision lists like Shielding or QGSP_BERT_HP are required. Conversely, enabling high-precision neutron transport in high-energy calorimeters adds severe runtime penalties without benefit.

Misunderstanding 5: User Code Is Automatically Thread-Safe

While Geant4 kernel classes are thread-safe under Geant4-MT, user code is not automatically protected. Storing accumulators in global or static variables across stepping actions creates data races. Accumulators must use G4Accumulable or thread-private scorers.

Frequently asked questions

What is Geant4 used for?

Geant4 simulates particle transport and radiation interactions in matter. Major applications include high-energy physics detector design, radiation oncology treatment verification, space satellite shielding analysis, and nuclear security detector modeling.

Is Geant4 free and open source?

Yes. Geant4 is distributed free under the open-source Geant4 Software License. Full source code, test suites, and documentation are available through CERN and GitHub for academic and commercial use.

How does Geant4 handle multi-threading?

Geant4-MT uses an event-level master-worker architecture. Static geometry, materials, and physics cross sections are loaded into shared read-only memory, while worker threads run independent event loops on thread-private tracking structures, maximizing CPU throughput with minimal RAM usage.

What is the difference between Geant4 and MCNP?

Geant4 is an open-source C++ object-oriented toolkit with complete programmatic extensibility, widely used in high-energy and medical physics. MCNP is a proprietary, export-controlled Fortran/C package maintained by LANL, regarded as the regulatory standard for nuclear reactor physics and criticality safety.

What are Geant4 physics lists?

A physics list is a modular C++ class specifying particles and physical processes in a simulation. Geant4 provides vetted reference physics lists (e.g., FTFP_BERT, QGSP_BERT_HP, QBBC) tailored to specific experimental domains.

When should I choose FTFP_BERT versus QGSP_BERT?

FTFP_BERT is the recommended standard for collider physics and calorimetry. QGSP_BERT applies the Quark-Gluon String model above 12 GeV and is utilized in specialized nuclear applications. For low-energy neutron transport down to thermal energies (0.025 eV), the High Precision (HP) variants should be selected.

Can Geant4 simulate chemical reactions and DNA damage?

Yes. Geant4-DNA models discrete physical interactions in liquid water down to ~7.4 eV, simulates water radiolysis and radical diffusion up to 1 microsecond, and quantifies single- and double-strand DNA breakage in cell geometries.

How can research teams ensure computational reproducibility in Geant4?

Reproducibility requires explicit pseudo-random number generator seeding (e.g., MixMaxRng), recording master seeds, locking production cuts, and archiving exact versions of the Geant4 toolkit and external data libraries.

Sources

  • Agostinelli, S., Allison, J., Amako, K., Apostolakis, J., Araujo, H., Arce, P., Asai, M., et al. (2003). “GEANT4—a simulation toolkit.” Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 506(3), 250–303. https://doi.org/10.1016/S0168-9002(03)01368-8.
  • Allison, J., Amako, K., Apostolakis, J., Araujo, H., Arce, P., Asai, M., et al. (2006). “Geant4 developments and applications.” IEEE Transactions on Nuclear Science, 53(1), 270–278. https://doi.org/10.1109/TNS.2006.869826.
  • Allison, J., Amako, K., Apostolakis, J., Arce, P., Asai, M., Aso, T., et al. (2016). “Recent developments in Geant4.” Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 835, 186–225. https://doi.org/10.1016/j.nima.2016.06.125.
  • CERN / Geant4 Collaboration. (2026). “Geant4 Documentation and User’s Guides (Release 11.4 / 11.5).” European Organization for Nuclear Research. Accessed November 14, 2026. https://geant4.web.cern.ch/docs/.
  • Incerti, S., Baldacchino, G., Bernal, M., Capra, R., Champion, C., Francis, Z., Guatelli, S., et al. (2010). “The Geant4-DNA project.” International Journal of Modeling, Simulation, and Scientific Computing, 1(2), 157–178. https://doi.org/10.1142/S1793962310000122.
  • Jan, S., Santin, G., Strul, D., Staelens, S., Assie, K., Autret, D., Avner, S., et al. (2004). “GATE: a simulation toolkit based on Geant4 for emission tomography.” Physics in Medicine and Biology, 49(19), 4543–4561. https://doi.org/10.1088/0031-9155/49/19/007.
  • Perl, J., Shin, J., Schumann, J., Faddegon, B., & Paganetti, H. (2012). “TOPAS: an innovative proton Monte Carlo platform for research and clinical applications.” Medical Physics, 39(11), 6818–6837. https://doi.org/10.1118/1.4758060.
  • European Space Agency (ESA). (2026). “SPENVIS: Space Environment, Effects, and Education System.” European Space Research and Technology Centre (ESTEC). Accessed November 14, 2026. https://www.spenvis.oma.be/.

Data: Geant4 Reference Physics Lists: Model Architectures, Energy Bounds, and Domain Applications

Comparative specification matrix of standard Geant4 reference physics lists, detailing high-energy string models, nuclear cascade engines, low-energy neutron transport precision, and recommended domain applications compiled from CERN Geant4 technical documentation and validation publications.

Period covered: 2003/2026. Coverage: Global.

Geant4 Reference Physics Lists: Model Architectures, Energy Bounds, and Domain Applications
Physics ListPrimary Application DomainHadron High-Energy Inelastic ModelHadron Cascade Inelastic ModelNeutron High Precision (HP) DataDefault Electromagnetic ConstructorLower Energy Cutoff Threshold (eV)Relative Computing Time Factor (relative to FTFP_BERT)
FTFP_BERTHigh-energy collider physics and calorimetry (LHC standard)Fritiof (FTF) string model (>3 GeV)Bertini cascade (0 to 12 GeV)Standard parameterized captureStandard EM (Option 0)10001
FTFP_BERT_HPUnderground physics, dark matter, and neutron background studiesFritiof (FTF) string model (>3 GeV)Bertini cascade (0 to 12 GeV)G4NDL evaluated thermal data (ENDF/B-VII)Standard EM (Option 0)0.0254.2
QGSP_BERTHigh-energy physics showers and accelerator target simulationsQuark-Gluon String (QGS) model (>12 GeV)Bertini cascade (0 to 12 GeV)Standard parameterized captureStandard EM (Option 0)10001.05
QGSP_BERT_HPNuclear reactor physics, criticality, and isotope productionQuark-Gluon String (QGS) model (>12 GeV)Bertini cascade (0 to 12 GeV)G4NDL evaluated thermal data (ENDF/B-VII)Standard EM (Option 0)0.0254.5
QBBCSpace radiation, particle therapy, and medical physicsFritiof (FTF) string model (>3 GeV)Binary cascade (BIC) for nucleons/ions; Bertini for pionsHigh-precision neutron capture enabledStandard EM with ion stopping improvements10001.25
ShieldingSpallation neutron sources, accelerator shielding, and heavy targetsFritiof (FTF) string model (>3 GeV)Bertini cascade with S(alpha,beta) thermal scatteringG4NDL evaluated thermal data (ENDF/B-VII)Standard EM (Option 0)0.0254.8
Geant4-DNANanoscale radiobiology, DNA track structure, and microdosimetryDiscrete track structure liquid water modelsSub-excitation vibrational excitation and dissociative attachmentNot applicable (sub-cellular electron/ion focus)Geant4-DNA discrete processes7.418.5

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about Geant4: Architecture, Physics Lists & Lab Guide

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →