Installing Geant4 VMC - Special Installations

  • Root Configuration for geant4_vmc versions (2.x - 2.8)

    The older geant4_vmc versions (2.x - 2.8) require Root to be configured with g4root package; for this you have to specify the following configure options:
    –enable-g4root
    –with-g4-incdir=$G4INSTALL/include
    –with-g4-libdir=$G4INSTALL/lib/Linux-g++
    –with-clhep-incdir=$CLHEP_BASE_DIR/include \

  • <li> <h3>Geant4 configuration (version >= 9.5) <br>
             with manual installation (with GNUmake) </h3>
    

    If you install Geant4 with the GNUmakefile build system and your own environment setting, you need to have set the following environment variables. This way of installation requires an experience in Geant4 and so it is not recommended for novice users.
    G4LIB_BUILD_SHARED set to 1 (required) G4LIB_USE_G3TOG4 set to 1 (required) G4VIS_BUILD_OPENGLX_DRIVER set to 1 (recommended) G4VIS_USE_OPENGLX set to 1 (recommended)

    The path to Geant4 installation is then defined with the environment variables. G4INSTALL … path to Geant4 installation G4SYSTEM … Geant4 system flavor
    CLHEP_BASE_DIR … path to CLHEP

    If Geant4 is installed in a different path than the path to the source tree, the following additional variables have to be set: G4LIB … path to Geant4 libraries (optional) G4INCLUDE … path to Geant4 include files (option)

  • Geant4 configuration (version <= 9.4)

    Installation of Geant4 + Geant4 VMC requires the CLHEP shared library.

  • Note that Geant4 VMC requires some Geant4 installation options which are not set by default during the Geant4 installation procedure:

    • Geant4 shared libraries;
    • All Geant4 header files in the include directory
    • Build Geant4 with the use of the G3toG4 tool
    • It is also recommended to build Geant4 X11 OpenGL visualization driver which is used in the VMC examples.

    To get these options when using Configure program, you should reply y to the following questions. The Configure program will then generate automatically a script for an environment setup which should be sourced each time when using Geant4.
    Do you want to install all Geant4 headers in one directory? [n] y (required) Do you want to build shared libraries? [y] y (required) Enable building of visualization drivers? [y] y (recommended) Enable building of the X11 OpenGL visualization driver? [n] y (recommended) Enable build of the g3tog4 utility module? [n] y (required)

    If you install Geant4 with your own environment setting, you need to have set the following environment variables. This way of installation requires an experience in Geant4 and so it is not recommended for novice users.
    G4LIB_BUILD_SHARED set to 1 (required) G4LIB_USE_G3TOG4 set to 1 (required) G4VIS_BUILD_OPENGLX_DRIVER set to 1 (recommended) G4VIS_USE_OPENGLX set to 1 (recommended)