Home - andreagp/Geant4-tutorial GitHub Wiki

Welcome to the Geant4-tutorial wiki using CMake, Git and Github!

Before starting:

http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/InstallationGuide/html/postinstall.html

A quick check is to print the environment path in a terminal using: echo $G4ENSDFSTATEDATA, you should be able to see the relative path of that folder and with ls $G4ENSDFSTATEDATA you should be able to see a list of what's inside that folder, such as a README file, etc... if the output is empty, the environment is not configured correctly.

I personally configure Geant4 in .bashrc file so I don't need to remember to configure it every time. Also, I can easily switch between version easily:

In your home directory, open .bashrc file and add (where PATH_TO_GEANT4_INSTALL is your absolute PATH for geant4-install of the version you want to use):

source PATH_TO_GEANT4_INSTALL/bin/geant4.sh

export G4DIR=PATH_TO_GEANT4_INSTALL/lib/Geant4-10.4.0/

In my case, PATH_TO_GEANT4_INSTALL is: /usr/local/geant4/geant4.10.04-install/ I use $G4DIR as a shortcut for the absolute path of Geant4. Both commands need to be consistent with the SAME version. After you save and close .bashrc, open a new terminal and do the quick check above.