MinGLE: A Minimalist, Configurable, and Pedagogical Geant4 Application Template
Jing Liu
TL;DR
MinGLE tackles the steep learning curve of Geant4 by offering a minimalist, fully functional application template with under 70 lines of C++ and runtime-configurable detector definitions via Text Geometry. It replaces boilerplate and low-level assembly with modern Geant4 factory classes and a file-based learning roadmap that uses Git branches and tags to document eleven core components. The template is hosted on GitHub, supports batch and interactive modes, and includes a prebuilt Docker image to provide immediate usability. As a pedagogical tool, MinGLE demonstrates a continuous, compilable path from a simple UI to a feature-rich simulation while preserving standard Geant4 interfaces without extension code. Distributed under the MIT license, it aims to be a reusable educational and research-oriented foundation in Geant4.
Abstract
The Geant4 toolkit is the leading software for the simulation of particle transport through matter, widely used in nuclear physics, high-energy physics, and medical physics. However, the initial learning curve for new developers can be steep, often due to the complexity and experiment-specific nature of many introductory examples. This paper introduces MinGLE (Mini Geant4 Learning Example), a dedicated application template designed to be a universal, flexible, and educational starting point for Geant4 projects. MinGLE achieves a complete, functional simulation kernel using fewer than 70 lines of core C++ code. This minimalism is realized by leveraging contemporary Geant4 features, including factory classes for run management and physics, and the Text Geometry format for detector definition. Furthermore, MinGLE employs a unique pedagogical structure, using Git tags to document the incremental development of eleven core Geant4 components, with each tagged version being fully compilable, executable, and testable, providing a clear, step-by-step learning resource.
