This repository is meant for testing a variety of the Geant4 functionality related to optical processes, mainly Cherenkov photon generation and propagation.
It strongly recommended to use the "out of source" build pattern. For example, in the folder optical1 one first creates a folder named "build", then runs CMake and finally the build itself using make, from the build folder itself. This can look as follows:
cd optical1
mkdir build
cmake -B build
cd build/
make
# you can use the -j option to make it work quicked, e.g.
make -j8
To get graphics working when running under WSL2, it may be necessary to apply this setting:
export LIBGL_ALWAYS_INDIRECT=
- Create the G4UIExecutive and the runManager
- Initialize the runManager with the DetectorConstruction
- Create the physicsList which includes optical physics
- Call ActionInitialization
This is created in the "Build" method of ActionInitialization. Various particle generation parameters are stored here, as well as a reference to the ParticleGun.
Generates the "Run" object, and calls "EndOfRun" in the end.