Geant4

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

 /cvmfs/eic.opensciencegrid.org/x8664_sl7/opt/fun4all/core/geant4.10.02.p02

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

${G4_SHARE}/examples/

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
./exampleRE05

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.

Details

The compilation options for GEANT were:

 ccmake -i -DGEANT4_USE_XM=ON -DGEANT4_USE_SYSTEM_CLHEP=ON -DGEANT4_USE_RAYTRACER_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_G3TOG4=ON -DGEANT4_INSTALL_DATA=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/cvmfs/sphenix.sdcc.bnl.gov/gcc-8.3/opt/sphenix/core/geant4.10.06.p01 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DGEANT4_BUILD_CXXSTD=17 -DCLHEP_DIR=/cvmfs/sphenix.sdcc.bnl.gov/gcc-8.3/opt/sphenix/core/clhep-2.4.1.3 ../