Download Geant4
Storyboard
The base program and the data are downloaded from the web page:
>http://geant4.cern.ch/support/download.shtml
At the top are the tablets of the code itself in both the tar (linux) and zip (windows) formats.
>GNU or Linux tar format, compressed using gzip (33.3Mb, 34884065 bytes)
>After downloading, gunzip, then unpack using GNU tar.
>Download ZIP format (46.8Mb, 49050019 bytes)
>After downloading, unpack using e.g. WinZip.
Apart from this it is advisable to download the data that the simulator uses and which are under the heading data.
>G4NDL4.5, Neutron data files with thermal cross-sections - version 4.5 (402.2MB)
>G4EMLOW7.3, data files for low energy electromagnetic processes - version 7.3 (71.4MB)
>G4PhotonEvaporation5.2, data files for photon evaporation - version 5.2 (9.6MB)
>G4RadioactiveDecay5.2, data files for radioactive decay hadronic processes - version 5.2 (1.0MB)
>G4SAIDDATA1.1, data files from evaluated cross-sections in SAID data-base - version 1.1 (25.2kB)
>G4NEUTRONXS1.4, data files for evaluated neutron cross-sections on natural composition of elements - version 1.4 (2.1MB)
>G4ABLA3.1, data files for nuclear shell effects in INCL/ABLA hadronic mode - version 3.1 (104.8kB)
>G4PII1.3, data files for shell ionisation cross-sections - version 1.3 (4.1MB)
>G4ENSDFSTATE2.2, data files for nuclides properties - version 2.2 (283.8kB)
>G4RealSurface2.1, Optional data files for measured optical surface reflectance - version 2.1 (126.0MB)
>G4TENDL1.3.2, Optional data files for incident particles - version 1.3.2 (558.0MB)
ID:(9423, 0)
Installing the C ++ compiler
Storyboard
In the case of linux it is recommended to install the GNU Compiler Collection 4.8.4 or higher what can be done via the command line with
>sudo apt update
>sudo apt upgrade
>sudo apt install build-essential
In the case of Apple you must install Apple Clang (Xcode) 8 or higher what can be done with the command line:
>xcode-select --install
In the case of windows you can work with Visual Studio that can be downloaded (free) from
>https://www.visualstudio.com/
ID:(9424, 0)
Install CMake 3.3 or higher
Storyboard
In the case of linux it is recommended to install CMake from the Software Manager.
> Software Manager
For the case of Apple and Windows you can download the file to install from the website
> https://cmake.org/download/
ID:(9426, 0)
Install Geant4 in Linux
Storyboard
First you have to first create a base directory that could be
>~/workspace/geant4
and then unzip the tar file in that directory.
Then you must create the geant4.10.04-build directory using
>cd ~/workspace/geant4
>mkdir geant4.10.04-build
If the content is listed with the command ls, it is obtained that
>geant4.10.04, geant4.10.04-build
Then proceed to the installation directory
>cd ~/workspace/geant4/geant4.10.04-build
and the cmake command is executed:
>cmake -DCMAKE_INSTALL_PREFIX=~/workspace/geant4 ~/workspace/geant4/geant4.10.04
setting the mode with
>cd ~/workspace/geant4/geant4.10.04-build
>cmake -DGEANT4_INSTALL_DATA=ON .
where the point is key (space + point).
As long as no errors arise, it must be created under the direct share and geant4-10.4.a directory data
>~/workspace/geant4/share/geant4-10.4.0/data
in which all particulars data are copied:
>http://geant4.cern.ch/support/source/G4NDL.4.5.tar.gz
>http://geant4.cern.ch/support/source/G4EMLOW.7.3.tar.gz
>http://geant4.cern.ch/support/source/G4PhotonEvaporation.5.2.tar.gz
>http://geant4.cern.ch/support/source/G4RadioactiveDecay.5.2.tar.gz
>http://geant4.cern.ch/support/source/G4NEUTRONXS.1.4.tar.gz
>http://geant4.cern.ch/support/source/G4PII.1.3.tar.gz
>http://geant4.cern.ch/support/source/G4RealSurface.2.1.tar.gz
>http://geant4.cern.ch/support/source/G4SAIDDATA.1.1.tar.gz
>http://geant4.cern.ch/support/source/G4ABLA.3.1.tar.gz
>http://geant4.cern.ch/support/source/G4ENSDFSTATE.2.2.tar.gz
and it is decompressed. After again running the command cmake for the installation to recognize the data
>cmake -DCMAKE_INSTALL_PREFIX=~/workspace/geant4 ~/workspace/geant4/geant4.10.04
it proceeds to run the installation that in a computer with two cores is
>make -j2
being able to be superior to 2 according to the equipment. Finally the command is executed:
>make install
ID:(9425, 0)
Problems and solutions
Storyboard
In case the problem arises:
>Could NOT find EXPAT (missing: EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
just install the corresponding library:
>sudo apt-get install libexpat1-dev
If graphical routines are needed and you want to work with OpenGL, it can be installed with
>sudo apt-get update
>sudo apt-get install freeglut3
>sudo apt-get install freeglut3-dev
>sudo apt-get install binutils-gold
>sudo apt-get install g ++ cmake
>sudo apt-get install libglew-dev
>sudo apt-get install g ++
>sudo apt-get install table-common-dev
>sudo apt-get install build-essential
>sudo apt-get install libglew1.5-dev libglm-dev
Then he runs
>glxinfo | OpenGL grep
to verify the installation.
ID:(9427, 0)