... | @@ -2,7 +2,10 @@ |
... | @@ -2,7 +2,10 @@ |
|
|
|
|
|
[[_TOC_]]
|
|
[[_TOC_]]
|
|
|
|
|
|
In this tutorial we will use Geant4 version 11.3.1, compiled with the support of multithreading, GDML and Qt5 based Gui.
|
|
In this tutorial we will use Geant4 version 11.3.2, compiled with the support of multithreading, GDML and Qt5 based Gui.
|
|
|
|
|
|
|
|
The repository scripts was upadted for Geant4 version 11.3.2,
|
|
|
|
but if you have version 11.3.1 it will work also.
|
|
|
|
|
|
On Linux systems we use a compiled version of Geant4 and a binary distribution for ROOT installations.
|
|
On Linux systems we use a compiled version of Geant4 and a binary distribution for ROOT installations.
|
|
|
|
|
... | @@ -103,7 +106,7 @@ Do not forget to install your favorite editor, e.g _Emacs_ : |
... | @@ -103,7 +106,7 @@ Do not forget to install your favorite editor, e.g _Emacs_ : |
|
<!--
|
|
<!--
|
|
You can install the precompiled version of Geant4 provided for this tutorial. You can download the tar file with precompiled Geant4 `geant4_v11.1.1.Linux-ubuntu20-x86_64-gcc9.4.tar.gz` from `llrnbox.in2p3.fr` server. The script `install-geant4-ubuntu.sh` can be used for downloading and installation of Geant4.
|
|
You can install the precompiled version of Geant4 provided for this tutorial. You can download the tar file with precompiled Geant4 `geant4_v11.1.1.Linux-ubuntu20-x86_64-gcc9.4.tar.gz` from `llrnbox.in2p3.fr` server. The script `install-geant4-ubuntu.sh` can be used for downloading and installation of Geant4.
|
|
|
|
|
|
The link to tar.gz file with Geant4 11.3.1 binaries for Ubuntu 24.04
|
|
The link to tar.gz file with Geant4 11.3.2 binaries for Ubuntu 24.04
|
|
|
|
|
|
https://llrnbox.in2p3.fr/index.php/s/jNJcK7jHTmX3g97
|
|
https://llrnbox.in2p3.fr/index.php/s/jNJcK7jHTmX3g97
|
|
|
|
|
... | @@ -111,7 +114,7 @@ The md5 sum file: |
... | @@ -111,7 +114,7 @@ The md5 sum file: |
|
|
|
|
|
https://llrnbox.in2p3.fr/index.php/s/Y5yD3CZxYgGZxGA
|
|
https://llrnbox.in2p3.fr/index.php/s/Y5yD3CZxYgGZxGA
|
|
|
|
|
|
N.B. You need to install Geant4 into `/usr/local/geant4/11.3.1`.
|
|
N.B. You need to install Geant4 into `/usr/local/geant4/11.3.2`.
|
|
|
|
|
|
If you install the precompiled version you can skip **Build Geant4** section and go directly to **Environment**.
|
|
If you install the precompiled version you can skip **Build Geant4** section and go directly to **Environment**.
|
|
-->
|
|
-->
|
... | @@ -126,13 +129,13 @@ In the Terminal window type the commands: |
... | @@ -126,13 +129,13 @@ In the Terminal window type the commands: |
|
```
|
|
```
|
|
git clone https://gitlab.cern.ch/geant4/geant4.git
|
|
git clone https://gitlab.cern.ch/geant4/geant4.git
|
|
cd geant4/
|
|
cd geant4/
|
|
git checkout v11.3.1
|
|
git checkout v11.3.2
|
|
This will create a clone of the Geant4 11.3.1 release on your local disk.
|
|
This will create a clone of the Geant4 11.3.2 release on your local disk.
|
|
|
|
|
|
The ROOT and Geant4 are installed with the current user as owner.
|
|
The ROOT and Geant4 are installed with the current user as owner.
|
|
You need to create a target directory owned by my current user:
|
|
You need to create a target directory owned by my current user:
|
|
|
|
|
|
`sudo mkdir -p /usr/local/geant4/11.3.1`
|
|
`sudo mkdir -p /usr/local/geant4/11.3.2`
|
|
|
|
|
|
`sudo chown -R `id -un`:`id -gn` /usr/local/geant4`
|
|
`sudo chown -R `id -un`:`id -gn` /usr/local/geant4`
|
|
```
|
|
```
|
... | @@ -142,7 +145,7 @@ Make build configuration files with cmake: |
... | @@ -142,7 +145,7 @@ Make build configuration files with cmake: |
|
```
|
|
```
|
|
mkdir geant4-build
|
|
mkdir geant4-build
|
|
cd geant4-build
|
|
cd geant4-build
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.3.1 \
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.3.2 \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo [ -DGEANT4_BUILD_MULTITHREADED=ON ] \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo [ -DGEANT4_BUILD_MULTITHREADED=ON ] \
|
|
-DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_QT=ON \
|
|
-DGEANT4_INSTALL_DATA=ON -DGEANT4_USE_GDML=ON -DGEANT4_USE_QT=ON \
|
|
-DGEANT4_USE_OPENGL_X11=ON [-DGEANT4_USE_FREETYPE=ON] ../geant4
|
|
-DGEANT4_USE_OPENGL_X11=ON [-DGEANT4_USE_FREETYPE=ON] ../geant4
|
... | @@ -156,7 +159,7 @@ Now you can comile binaries and install Geant4: |
... | @@ -156,7 +159,7 @@ Now you can comile binaries and install Geant4: |
|
cmake --build . --target install -- -j8
|
|
cmake --build . --target install -- -j8
|
|
```
|
|
```
|
|
|
|
|
|
Geant4 is now installed in the `/usr/local/geant4/11.3.1` directory.
|
|
Geant4 is now installed in the `/usr/local/geant4/11.3.2` directory.
|
|
|
|
|
|
The installation script `build-geant4-ubuntu.sh` will do all these steps.
|
|
The installation script `build-geant4-ubuntu.sh` will do all these steps.
|
|
|
|
|
... | @@ -174,8 +177,8 @@ if [ -x /usr/local/root/bin/thisroot.sh ]; then |
... | @@ -174,8 +177,8 @@ if [ -x /usr/local/root/bin/thisroot.sh ]; then |
|
fi
|
|
fi
|
|
|
|
|
|
# Geant4
|
|
# Geant4
|
|
if [ -x /usr/local/geant4/11.3.1/bin/geant4.sh ]; then
|
|
if [ -x /usr/local/geant4/11.3.2/bin/geant4.sh ]; then
|
|
. /usr/local/geant4/11.3.1/bin/geant4.sh
|
|
. /usr/local/geant4/11.3.2/bin/geant4.sh
|
|
fi
|
|
fi
|
|
```
|
|
```
|
|
|
|
|
... | @@ -231,7 +234,7 @@ E.g. basic B1 example. |
... | @@ -231,7 +234,7 @@ E.g. basic B1 example. |
|
$ cd ~/tmp
|
|
$ cd ~/tmp
|
|
$ mkdir B1-build
|
|
$ mkdir B1-build
|
|
$ cd B1-build
|
|
$ cd B1-build
|
|
$ cmake /usr/local/geant4/11.3.1/share/Geant4/examples/basic/B1
|
|
$ cmake /usr/local/geant4/11.3.2/share/Geant4/examples/basic/B1
|
|
```
|
|
```
|
|
|
|
|
|
You should see something like the output below. Watch for eventual configuration errors.
|
|
You should see something like the output below. Watch for eventual configuration errors.
|
... | @@ -268,7 +271,7 @@ You should see something like the output below. Watch for eventual configuratio |
... | @@ -268,7 +271,7 @@ You should see something like the output below. Watch for eventual configuratio |
|
-- Looking for shmat - found
|
|
-- Looking for shmat - found
|
|
-- Looking for IceConnectionNumber in ICE
|
|
-- Looking for IceConnectionNumber in ICE
|
|
-- Looking for IceConnectionNumber in ICE - found
|
|
-- Looking for IceConnectionNumber in ICE - found
|
|
-- Found Geant4: /usr/local/geant4/11.3.1/lib/cmake/Geant4/Geant4Config.cmake (found version "11.3.1")
|
|
-- Found Geant4: /usr/local/geant4/11.3.2/lib/cmake/Geant4/Geant4Config.cmake (found version "11.3.2")
|
|
-- Configuring done (10.5s)
|
|
-- Configuring done (10.5s)
|
|
-- Generating done (0.0s)
|
|
-- Generating done (0.0s)
|
|
-- Build files have been written to: /home/semenjuk/tmp/B1-build
|
|
-- Build files have been written to: /home/semenjuk/tmp/B1-build
|
... | | ... | |