GOSS is a lightweight orchestration suite for Geant4 that consolidates existing components into a structured, reproducible workflow. It is designed to simplify setup and reduce boilerplate while maintaining full flexibility for dose scoring and analysis.
| Feature | Description |
|---|---|
| IAEA Phase-Space Files | Read and write PHSP files for particle sources with full MT support |
| Sensitive Detectors | Preconfigured detector grids with automatic dose scoring in CSV format |
| Configurable Geometry | Runtime configuration via UI commands for world and detector parameters |
| Multi-threaded | Full support for Geant4 MT builds with thread-safe operations |
GOSS/
├── GOSS/ # Main application source
│ ├── include/ # Header files
│ │ ├── G4IAEAphspReader.hh
│ │ ├── G4IAEAphspWriter.hh
│ │ ├── SensitiveDetector.hh
│ │ └── ...
│ ├── src/ # Implementation files
│ │ ├── DetectorConstruction.cc
│ │ ├── SensitiveDetector.cc
│ │ └── ...
│ ├── iaea_phsp/ # IAEA phase-space library
│ ├── phsp/ # Example PHSP files
│ ├── CMakeLists.txt
│ └── IAEAphsp.cc # Main application entry
├── docs/ # Documentation
│ └── phsp.md # Detailed PHSP documentation
├── LICENSE
└── README.md
Supports reading and writing IAEA-format phase-space files:
- Reader: Load particles from
.IAEAphspfiles as primary generator - Writer: Record particles at constant-Z scoring planes
- Full support for gantry/collimator rotations and spatial transforms
# UI Commands
/action/IAEAphspReader/fileName <name> # Read from <name>.IAEA* files
/action/IAEAphspWriter/namePrefix <name> # Write output files
/action/IAEAphspWriter/zphsp <z> <unit> # Define scoring plane📖 See docs/phsp.md for complete PHSP documentation.
Configurable detector array for dose scoring:
- 40×40 detector grid with 5 layers
- Automatic energy deposition tracking
- CSV output with position, energy, and statistical data
Output columns:
Detector_Number,x,y,zTotal_Energy_Deposited,Energy_Per_ParticleEnergy_Squared_Sum,Quadric_Energy_Per_Particle3sigma(uncertainty),nEventCounterThread
Runtime-configurable world and detector geometry:
/my_geom/worldXY <size> <unit> # World XY half-size
/my_geom/worldZ <size> <unit> # World Z half-size- Geant4 ≥ 10.6 (with MT support recommended)
- CMake ≥ 3.16
- C++17 compatible compiler
# Set Geant4 path
export Geant4_DIR=/path/to/geant4/lib/cmake/Geant4
# Build
cd GOSS
mkdir build && cd build
cmake -DGeant4_DIR="$Geant4_DIR" ..
cmake --build . --parallel./IAEAphsp./IAEAphsp test-reader.mac # Read PHSP file only
./IAEAphsp test-writer.mac # Write PHSP output
./IAEAphsp test-rw.mac # Read and write PHSP
./IAEAphsp vis.mac # Visualization./IAEAphsp test-reader.mac 4 # Run with 4 threadsResults are saved to output.csv in the working directory, containing dose data for each detector with statistical analysis.
- PHSP Documentation — Detailed IAEA phase-space file usage
This project is distributed under the Apache License 2.0. See LICENSE for details.
If you use the IAEA phase-space components, please cite:
M.A. Cortes-Giraldo et al., Int J Radiat Biol 88(1-2): 200-208 (2012)
doi: 10.3109/09553002.2011.627977