Skip to content

Repository files navigation

GEANT4 with GDML + Opticks Simulation Example

Overview

This repository provides a hybrid CPU–GPU simulation environment integrating:

  • Geant4: Particle transport and detector simulation
  • Opticks: GPU-accelerated optical photon simulation

The workflow enables fast optical photon propagation on GPUs while retaining Geant4’s CPU-based handling of all other particles.


⚙️ Prerequisites

  • CUDA Toolkit 13 Update 2 (Tested)
  • NVIDIA GPU with OptiX support (9) (Tested)
  • Geant4 (with GDML support enabled)
  • Opticks
  • ROOT (for output handling and visualization)

Installation Using Rice Opticks container

More information about Rice Opticks container can be found at https://github.com/nuRiceLab/riceopticks-container

# Large image — point the cache somewhere with room. HPC home dirs usually
# do not have it.
export APPTAINER_CACHEDIR=/scratch/$USER/.apptainer
export APPTAINER_TMPDIR=/scratch/$USER/.apptainer/tmp

apptainer pull riceopticks-v1.0r.sif oras://ghcr.io/nuricelab/riceopticks:v1.0r

apptainer shell --nv --bind /cvmfs riceopticks_v1.0r.sif
source /opt/opticks-dev-env.sh
git clone https://github.com/nuRiceLab/OpticalSims
cd OpticalSims
source configure.sh 
make -j2 

🛠️Manual Installation

1. Clone Repositories

git clone https://github.com/nuRiceLab/OpticalSims
cd OpticalSims

2. Compile

mkdir build && cd build && cmake -DWith_Opticks=true -DWITH_GEANT4_VIS=true ..
make -j2

3. Run in Interactive Mode

For Opticks environment variables , source following:

source OptickEnv  

Then execute:

./gdml_det i GDML/dune10kt_v5_refactored_1x2x6_nowires_NoField.gdml macros/g04.mac

dune10kt_v5_refactored_1x2x6_nowires.gdml

3. Run in Batch Mode

./gdml_det GDML/dune10kt_v5_refactored_1x2x6_nowires_NoField.gdml macros/g04.mac

Citation

@misc{parmaksiz2026acceleratingopticalphotonsimulation, title={Accelerating Optical Photon Simulation in DUNE with Opticks}, author={Ilker Parmaksiz and Aaron Higuera and Laura Paulucci and Viktor Pec and Estanislao Forino}, year={2026}, eprint={2608.27306}, archivePrefix={arXiv}, primaryClass={hep-ex}, url={https://arxiv.org/abs/2608.27306}, }

About

Optical simulations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages