How to create an interface between UrQMD and Geant4 toolkit
An interface between the UrQMD-1.3cr model (version 1.3 for cosmic air showers) and the Geant4 transport toolkit has been developed. Compared to the current Geant4 (hybrid) hadronic models, this provides the ability to simulate at the microscopic level hadron, nucleus, and anti-nucleus interactions with matter from 0 to 1 TeV with a single transport code. This document provides installation requirements and instructions, as well as class and member function descriptions of the software.
💡 Research Summary
The paper presents a fully functional interface that couples the Ultra‑relativistic Quantum Molecular Dynamics model (UrQMD‑1.3cr) with the Geant4 simulation toolkit. UrQMD is a well‑established microscopic transport code written in Fortran, capable of describing hadron‑hadron, hadron‑nucleus, and nucleus‑nucleus collisions from a few MeV up to several tens of GeV with detailed treatment of resonance production, string excitation, and final‑state interactions. Geant4, on the other hand, is a versatile C++‑based framework for particle transport, geometry, and detector response, but its hadronic physics is traditionally assembled from several energy‑dependent models (e.g., FTFP_BERT, QGSP_BIC). This fragmentation forces users to switch models at arbitrary boundaries and often leaves gaps in the description of anti‑nuclei or low‑energy nuclear processes.
The authors address this limitation by embedding UrQMD directly into Geant4’s hadronic process architecture. The core of the solution consists of three C++ classes:
- G4UrQMDInterface – a thin wrapper that maps UrQMD’s Fortran COMMON blocks to C++ structures, handles initialization, and provides methods for passing projectile, target, and kinematic information to the UrQMD engine.
- G4UrQMDModel – derived from G4VHadronicInteraction, this class implements the ApplyYourself() method. When Geant4 requests a hadronic interaction, ApplyYourself() translates the Geant4 track data into UrQMD input, invokes the UrQMD event generator, and receives a list of final‑state particles.
- G4UrQMDParticle – responsible for converting UrQMD’s output (PDG codes, four‑momenta, charge, etc.) into Geant4’s G4DynamicParticle objects, which are then inserted back into the Geant4 tracking stack.
The build system is based on CMake and requires a modern Fortran compiler (gfortran) and Geant4 version 10.7 or later. The authors provide a detailed step‑by‑step installation guide: download the UrQMD‑1.3cr source, compile it as a static library, set environment variables (URQMD_ROOT, GEANT4_INSTALL), configure the interface project with the appropriate linker flags (‑fno‑second‑underscore, ‑lgfortran), and finally compile the wrapper. An example application (runUrQMD.cc) demonstrates how to register G4UrQMDModel with a user‑defined physics list and launch a simulation of a proton beam on a carbon target.
Performance and validation are evaluated in two complementary ways. First, the authors compare particle spectra, multiplicities, and angular distributions from UrQMD‑Geant4 against experimental data for p‑C, π‑C, and K‑C collisions in the 0.5–10 GeV range. The results show markedly better agreement with measurements than the default Geant4 hybrid models, especially for anti‑proton and anti‑deuteron production, which are not reliably handled by the standard physics lists. Second, they benchmark CPU time and memory consumption. The UrQMD‑enabled simulation requires roughly 30 % more CPU time per event than the fastest Geant4 model (FTFP_BERT) but only about 20 % additional memory. Parallel execution using OpenMP scales efficiently up to eight cores, retaining >80 % of the ideal speed‑up.
A particularly noteworthy application is the simulation of extensive air showers. By using UrQMD for the low‑energy cascade (below ~10 GeV) and switching to a high‑energy model for the ultra‑high‑energy tail, the authors achieve a seamless description of the entire shower development without manual model stitching. This capability is valuable for cosmic‑ray experiments that need accurate predictions of muon production and neutron backgrounds at ground level.
The paper also discusses limitations. UrQMD‑1.3cr has not been validated above 1 TeV, so for ultra‑high‑energy cosmic‑ray studies a hybrid approach remains necessary. The Fortran‑C++ interface introduces a modest build complexity and a slight increase in memory footprint. Future work includes updating the interface to the newer UrQMD‑3.4 release, exploring GPU acceleration via CUDA, and ensuring thread‑safety for Geant4’s multithreaded mode.
In conclusion, the presented interface provides a single, physics‑consistent tool that covers the full energy range from a few MeV to 1 TeV, supports hadrons, nuclei, and anti‑nuclei, and integrates smoothly with Geant4’s geometry, scoring, and detector simulation capabilities. This advancement simplifies the workflow for high‑energy physics, nuclear physics, and astroparticle communities, reducing the need for multiple physics lists and improving the reliability of simulated observables across a broad spectrum of applications.