Table of Contents
Fetching ...

GEARS -- A Fully Run-Time Configurable Geant4 Application

Jing Liu

TL;DR

GEARS tackles the barrier of modifying and recompiling Geant4 code by delivering a fully run-time configurable Geant4 application with a minimal C++ core. It achieves this through external configurations for geometry (GDML or plain text), physics (PHYSLIST via environment variable), primary sources (GPS/macros), and output (run-time macros), packaged in a Docker container for instant deployment. The system also provides a flat ROOT ntuple with short variable names to speed data analysis and includes step-zero data capture, enabling comprehensive, interactive exploration of simulations without touching C++ code. This approach enables rapid prototyping and deployment for small to medium experiments, significantly lowering the learning curve and iteration cycle in detector design and physics studies. Collectively, GEARS demonstrates a practical blueprint for turning a complex toolkit into an accessible, production-ready tool that emphasizes configurability, usability, and reproducibility.

Abstract

The Geant4 toolkit is the standard for simulating the passage of particles through matter, but its conventional architecture often requires users to modify and recompile C++ code to alter fundamental simulation parameters such as geometry, physics list, and primary particle source. This architectural constraint introduces significant friction for new users and slows down the experimental iteration cycle. This paper introduces GEARS (Geant4 Example Application with Rich features yet Small footprint), a universally applicable Geant4 application that fundamentally addresses this issue. GEARS achieves complete simulation configurability without C++ recompilation by strictly utilizing external configuration methods: Geometry is defined via simple text-based configuration, the Physics List is selected via the standard PHYSLIST environment variable, and the Primary Source is defined through the General Particle Source (GPS) macro commands. Furthermore, regarding GEARS as an application instead of a framework, key features include a flat ntuple structure with short variable names for highly efficient analysis and a solution for capturing vital initial step data. Output creation is also fully managed via run-time macro commands and volume properties. The project is distributed as a ready-to-use Docker container to eliminate compilation barriers. Through these design considerations, GEARS transforms Geant4 into a practical, ready-to-use tool, enabling users to rapidly prototype and execute simulations for diverse experiments solely through simple text configuration files, without ever needing to modify or compile the underlying C++ source code.

GEARS -- A Fully Run-Time Configurable Geant4 Application

TL;DR

GEARS tackles the barrier of modifying and recompiling Geant4 code by delivering a fully run-time configurable Geant4 application with a minimal C++ core. It achieves this through external configurations for geometry (GDML or plain text), physics (PHYSLIST via environment variable), primary sources (GPS/macros), and output (run-time macros), packaged in a Docker container for instant deployment. The system also provides a flat ROOT ntuple with short variable names to speed data analysis and includes step-zero data capture, enabling comprehensive, interactive exploration of simulations without touching C++ code. This approach enables rapid prototyping and deployment for small to medium experiments, significantly lowering the learning curve and iteration cycle in detector design and physics studies. Collectively, GEARS demonstrates a practical blueprint for turning a complex toolkit into an accessible, production-ready tool that emphasizes configurability, usability, and reproducibility.

Abstract

The Geant4 toolkit is the standard for simulating the passage of particles through matter, but its conventional architecture often requires users to modify and recompile C++ code to alter fundamental simulation parameters such as geometry, physics list, and primary particle source. This architectural constraint introduces significant friction for new users and slows down the experimental iteration cycle. This paper introduces GEARS (Geant4 Example Application with Rich features yet Small footprint), a universally applicable Geant4 application that fundamentally addresses this issue. GEARS achieves complete simulation configurability without C++ recompilation by strictly utilizing external configuration methods: Geometry is defined via simple text-based configuration, the Physics List is selected via the standard PHYSLIST environment variable, and the Primary Source is defined through the General Particle Source (GPS) macro commands. Furthermore, regarding GEARS as an application instead of a framework, key features include a flat ntuple structure with short variable names for highly efficient analysis and a solution for capturing vital initial step data. Output creation is also fully managed via run-time macro commands and volume properties. The project is distributed as a ready-to-use Docker container to eliminate compilation barriers. Through these design considerations, GEARS transforms Geant4 into a practical, ready-to-use tool, enabling users to rapidly prototype and execute simulations for diverse experiments solely through simple text configuration files, without ever needing to modify or compile the underlying C++ source code.

Paper Structure

This paper contains 38 sections, 1 equation, 1 table.