Geant4 Guide
Geant4 is under /sw/geant4. For example, folder /sw/geant4/10.02p01_gcc48-MT
is version 10.02p01 build with gcc4.8 with multi-threading support.
/sw/geant4/10.02p01_gcc48
is the same version of geant4 without
multi-threading.
Build an example
You can find examples in the gean4 source tree.
If you are using 10.02p01, the examples can be found in /sw/geant4/10.02p01_gcc48/share/Geant4-10.2.1/examples/.
To build the example basic/B4:
Load the environment variables:
$ source /sw/geant4/10.02p01_gcc48/bin/geant4.sh
Create the build directory for the example. It can be created anywhere you have write permission:
$ mkdir B4-build
The name of the directory is arbitrary.
Invoke cmake to create the Makefile:
$ cd B4-build $ cmake /sw/geant4/10.02p01_gcc48/share/Geant4-10.2.1/examples/basic/B4
Build the example:
$ make
The compiled programs are under directory B4a, B4b, B4c, and B4d.
You can also read the document at https://geant4.web.cern.ch/support for more help.