Geant (GEometry ANd Tracking) 4.9.6p01 Linux cluster installation

From their website. "Geant4 is a toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science."

It is typically used with CLHEP. The link here ignores the Javascript download page. WTF CERN, why?! Just provide the content as a plain HTML link. Note that geant requires to be made with cmake as well. For this particular install, the geant expat will be used instead of the system version. The is not the default option. This is an excellent list of build options available.


mkdir -p /usr/local/src/GEANT
cd /usr/local/src/GEANT
wget http://cmsrep.cern.ch/specrpms/cms/SOURCES/slc5_amd64_gcc480/external/geant4/9.6.p01/geant4.9.6.p01.tar.gz
module load gcc
module load clhep/2.1.3.1
module load cmake
mkdir -p /usr/local/geant/4.9.6.p01
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant/4.9.6.p01 ../geant4.9.6.p01 -DGEANT4_USE_SYSTEM_EXPAT=off ../geant4.9.6.p01
make
make install
cd /usr/local/Modules/modulefiles/clhep
ln -s .base 4.9.6.p01

Create .desc and .version module files in the above directory as usual.

The .base module file has the following form:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
module-whatis "$desc (v$ver)"
prepend-path --delim " " CPPFLAGS -I/usr/local/$name/$ver/include/Geant4/
prepend-path --delim " " LDFLAGS -L/usr/local/$name/$ver/lib64/
prepend-path PATH /usr/local/$name/$ver/bin/geant4
setenv G4INSTALL /usr/local/$name/$ver
setenv G4SYSTEM Linux-g++