... | ... | @@ -2,7 +2,7 @@ |
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
In this tutorial we will use Geant4 version 11.2.0, compiled with the support of multithreading, GDML and Qt5 based Gui.
|
|
|
In this tutorial we will use Geant4 version 11.2.1, compiled with the support of multithreading, GDML and Qt5 based Gui.
|
|
|
|
|
|
On Linux systems we use a compiled version of Geant4 and a binary distribution for ROOT installations.
|
|
|
|
... | ... | @@ -108,13 +108,13 @@ In the Terminal window type the commands: |
|
|
```
|
|
|
git clone https://gitlab.cern.ch/geant4/geant4.git
|
|
|
cd geant4/
|
|
|
git checkout v11.2.0
|
|
|
This will create a clone of the Geant4 11.2.0 release on your local disk.
|
|
|
git checkout v11.2.1
|
|
|
This will create a clone of the Geant4 11.2.1 release on your local disk.
|
|
|
|
|
|
The ROOT and Geant4 are installed with the current user as owner.
|
|
|
You need to create a target directory owned by my current user:
|
|
|
|
|
|
`sudo mkdir -p /usr/local/geant4/11.2.0`
|
|
|
`sudo mkdir -p /usr/local/geant4/11.2.1`
|
|
|
|
|
|
`sudo chown -R `id -un`:`id -gn` /usr/local/geant4`
|
|
|
```
|
... | ... | @@ -124,7 +124,7 @@ Make build configuration files with cmake: |
|
|
```
|
|
|
mkdir geant4-build
|
|
|
cd geant4-build
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.2.0 \
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.2.1 \
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo [ -DGEANT4_BUILD_MULTITHREADED=ON ] \
|
|
|
-DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_QT=ON \
|
|
|
-DGEANT4_USE_OPENGL_X11=ON [-DGEANT4_USE_FREETYPE=ON] ../geant4
|
... | ... | @@ -138,7 +138,7 @@ Now you can comile binaries and install Geant4: |
|
|
cmake --build . --target install -- -j8
|
|
|
```
|
|
|
|
|
|
Geant4 is now installed in the `/usr/local/geant4/11.2.0` directory.
|
|
|
Geant4 is now installed in the `/usr/local/geant4/11.2.1` directory.
|
|
|
|
|
|
The installation script `build-geant4-ubuntu.sh` will do all these steps.
|
|
|
|
... | ... | @@ -156,8 +156,8 @@ if [ -x /usr/local/root/bin/thisroot.sh ]; then |
|
|
fi
|
|
|
|
|
|
# Geant4
|
|
|
if [ -x /usr/local/geant4/11.2.0/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.2.0/bin/geant4.sh
|
|
|
if [ -x /usr/local/geant4/11.2.1/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.2.1/bin/geant4.sh
|
|
|
fi
|
|
|
```
|
|
|
|
... | ... | @@ -214,7 +214,7 @@ E.g. basic B1 example. |
|
|
$ cd ~/tmp
|
|
|
$ mkdir B1-build
|
|
|
$ cd B1-build
|
|
|
$ cmake /usr/local/geant4/11.2.0/share/Geant4/examples/basic/B1
|
|
|
$ cmake /usr/local/geant4/11.2.1/share/Geant4/examples/basic/B1
|
|
|
```
|
|
|
|
|
|
You should see something like the output below. Watch for eventual configuration errors.
|
... | ... | |