Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Geant4 is probably the most difficult application to install of SLIC's dependencies, because there are a lot of options, it takes a long time, and it requires several different make commands. I will describe a minimal installation procedure with support for built-in UI and visualization drivers. You can always update the libraries later if you decide to change these settings.

Warning

The default Geant4 library settings for WIN32 are granular and static. You may choose other settings, but this could require changes in installation settings "down the line" that I may not mentionDue to limitations of GDML, Geant4 must be compiled with granular libraries. This should be fixed soon.

Info

These procedures are geared towards setting up a minimal Geant4 installation for SLIC. If you want a full Geant4 setup, I recommend running the Configure script. It will walk you through setting up a complete enviroment.

  1. Return to the work dir, create a Geant4 subdir and go into it.
    No Format
    cd $sim_work
    mkdir geant4
    cd geant4
    
  2. Download the Geant4 tarball.
    No Format
    wget http://geant4.cern.ch/geant4/source/source/geant4.7.1.tar.gz
    
  3. Unzip it.
    No Format
    tar -zxvf geant4.7.0.p01.tar.gz
    
  4. Set the following variables in setup.sh. (You should not need to run Configure.)
    No Format
    export G4INSTALL=${sim_work}/geant4/geant4.7.1
    export G4SYSTEM=Linux-g++
    export G4LIB_USE_GRANULAR=1
    
  5. If you want to enable OpenGL-based visualization, set these variables, too.
    No Format
    export G4VIS_BUILD_OPENGLX_DRIVER=1
    export G4VIS_USE_OPENGLX=1
    export OGLHOME=/usr
    
  6. Refer to the Application Guide Section on Enviroment Variables for additional enviroment variables that you might want to set.
  7. Go into the Geant4 base dir.
    No Format
    cd geant4.7.1
    
  8. LCPhys requires that a special flag is set in order to use the latest Kaon model. At the end of config/architecture.gmk, insert the following line exactly as it appears below:
    No Format
    CPPFLAGS += -DG4BERTINI_KAON
    
    Hopefully, this hack will be remedied soon!
  9. Build the libraries, which will be placed at $G4INSTALL/lib/Linux-g++. (This could take up to a few hours depending on your machine.)
    No Format
    cd source
    make
    
  10. Install the includes into $G4INSTALL/include .
    No Format
    make includes
    
  11. Build the physics list libraries. These will go into the default location at $G4INSTALL/lib/plists/Linux-g++.
    No Format
    cd ../physics_lists/hadronic
    make
    

...