From EIC
Jump to navigation Jump to search

GEANT4 is the standard object-oriented detector simulation framework.

Availability on RCF

Although newer versions exist, it is strongly recommended to use version 4.10.02 patch 2, which is in good agreement with recent sPHENIX test beam results.

This installation can be found at


To prepare your environment for usage, please source the setup file at

 source /afs/rhic/eic/restructured/etc/init-cvmfs-geant.csh

Running an Example

GEANT4 comes with several built in examples in


For example, if you want to build and run examples/extended/runAndEvent/RE05 (generic collider detector), create your own G4 work directory and use cmake:

source /afs/rhic/eic/restructured/etc/init-cvmfs-geant.csh
mkdir geant4
cd geant4 
cp -r ${G4_SHARE}/examples/extended/runAndEvent/RE05 .
mkdir build
cd build

cmake -DGeant4_DIR=${G4_BASE}/lib64 ../RE05
make -j 4 # Using 4 compilation threads

Note: The sourcing of init-cvmfs-geant.csh only has to be done once per login session.

GEANT4 in fun4all

The fun4all tutorials contain some EIC-related examples for using GEANT4 within the framework.


The compilation options for GEANT were: