Installing and running examples

  1. To install:
    The examples are provided within geant4_vmc package; to build all available examples:
    cd geant4_vmc/examples
    make
  2. Setting environment:
    First, make sure that you have included all libraries paths in your shared library path.
    For all MCs:
    /your_path/root/lib
    /your_path/geant4_vmc/lib/tgt_platform
    For G3 only:
    path to Pythia6 library
    /your_path/geant3/lib/tgt_platform
    For G4 only:
    /your_path/CLHEP/lib
    /your_path/geant4/lib/platform-compiler
    /your_path/geant4_vmc/lib/tgt_platform
    optionally paths to external graphics libraries
    • Since version 2.13, if you have installed Geant4 manually (with GNUmake) you need to replace the macro geant4_vmc/examples/macro/g4libs.C with g4libs_old.C. This will use the liblist program instead of geant4-config script for building the list of Geant4 libraries to be loaded.
    • If you have installed Geant4 manually (with GNUmake) with global libraries, you need to switch the comment in g4libs.C (or g4libs_old.C) as follows:
      void g4libs() {
         // g4libs_granular();
         g4libs_global();
      }
  3. To run:
    cd geant4_vmc/examples/E01 or E02 or E03 or E06
    root.exe 
    root[0] .x run_g3.C or .x run_g4.C