What problem does it solve?
Helps you create, modify, and debug complete Geant4 particle simulation projects (geometry, primary generator, physics list, and runnable build setup) instead of assembling boilerplate code manually.
Core Features & Use Cases
- End-to-end project scaffolding: Generates a standard Geant4 project layout with
CMakeLists.txt, main entry point, detector geometry, and action initialization structure for a compile-ready workflow.
- Particle source setup: Provides a
PrimaryGeneratorAction pattern to simulate specific particles (e.g., neutrons at a chosen energy) and guide you in extending it to other sources.
- Physics list guidance: Recommends appropriate built-in physics lists (notably
FTFP_BERT for general purpose) and explains when to switch for energy ranges and particle types.
- Data collection and analysis patterns: Supports adding ROOT output using
RunAction, EventAction, and SteppingAction with correct per-event aggregation flow.
- Modular geometry and iteration: Offers best practices for geometry naming, overlap checking, materials, and how to make minimal changes when updating existing projects.
- Optional visualization macro: Includes an
init_vis.mac starter for OpenGL-based visualization so you can validate geometry and trajectories quickly.
Quick Start
Use the geant4-project skill to generate a complete Geant4 project that compiles and runs a simulation of 10 MeV neutrons striking an aluminum target.