... | @@ -6,10 +6,10 @@ In this tutorial we will use Geant4 version 11.2.0, compiled with the support of |
... | @@ -6,10 +6,10 @@ In this tutorial we will use Geant4 version 11.2.0, compiled with the support of |
|
|
|
|
|
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.
|
|
|
|
|
|
Below we provide detailed instructions for the installation on Ubuntu 20.04.
|
|
Below we provide detailed instructions for the installation on Ubuntu 22.04.
|
|
The installation for other Debian and Ubuntu like Linux'es will be similar but the names of libraries can be slightly different. On Linux you can use GNU *c++*, *clang* or Intel *icc* compilers, we describe only the GNU *g++* installation.
|
|
The installation for other Debian and Ubuntu like Linux'es will be similar but the names of libraries can be slightly different. On Linux you can use GNU *c++*, *clang* or Intel *icc* compilers, we describe only the GNU *g++* installation.
|
|
|
|
|
|
--> The installation was tested on VirtualBox VM running *Ubuntu 20.04* and Windows 10 WLS2 *Ubuntu 20.04* application.
|
|
The installation was tested Windows 11 WLS2 *Ubuntu* application.
|
|
|
|
|
|
## Ubuntu 22.04 Requirements
|
|
## Ubuntu 22.04 Requirements
|
|
|
|
|
... | @@ -24,12 +24,14 @@ Generally we follow the installation rules for ROOT described here: |
... | @@ -24,12 +24,14 @@ Generally we follow the installation rules for ROOT described here: |
|
https://root.cern/install/dependencies/
|
|
https://root.cern/install/dependencies/
|
|
|
|
|
|
Some dependancies like kerberos and mysql were dropped because we do not use these features in the tutorial.
|
|
Some dependancies like kerberos and mysql were dropped because we do not use these features in the tutorial.
|
|
The libraries which we need for Geant4 compilation need to be installed first. For this, the `ubuntu20_deps.sh` script is provided on the Ubuntu 20.04 server. This script must be executed only once.
|
|
The libraries which we need for Geant4 compilation need to be installed first. For this, the `ubuntu22_deps.sh` script is provided for the Ubuntu 22.04 machine.
|
|
|
|
|
|
See below the code snippet: TODO
|
|
This script must be executed only once.
|
|
|
|
|
|
|
|
See below the code snippet:
|
|
|
|
|
|
```
|
|
```
|
|
apt install -y qt5-default
|
|
apt install -y qtbase5-dev qtbase5-dev-tools qt5-qmake
|
|
apt install -y libxerces-c-dev
|
|
apt install -y libxerces-c-dev
|
|
|
|
|
|
apt install -y gfortran
|
|
apt install -y gfortran
|
... | @@ -50,21 +52,21 @@ apt install -y libfreetype6-dev |
... | @@ -50,21 +52,21 @@ apt install -y libfreetype6-dev |
|
sudo apt update
|
|
sudo apt update
|
|
sudo apt upgrade
|
|
sudo apt upgrade
|
|
```
|
|
```
|
|
On Ubuntu 22.04 qt-defaults package not exist use the `ubuntu22_deps.sh` script to install dependancies.
|
|
On Ubuntu 20.04 all qt dependancies can be installed via qt-defaults package, use the `ubuntu20_deps.sh` script to install dependancies.
|
|
|
|
|
|
## ROOT Installation TODO
|
|
## ROOT Installation TODO
|
|
|
|
|
|
The ROOT installation is required for some exercises in this tutorial.
|
|
The ROOT installation is required for some exercises in this tutorial.
|
|
|
|
|
|
The tar files with precompiled ROOT binaries for Ubuntu-20.04 can be downloaded from
|
|
The tar files with precompiled ROOT binaries for Ubuntu-22.04 can be downloaded from
|
|
https://root.cern/download/:
|
|
https://root.cern/download/:
|
|
|
|
|
|
`curl -SLO https://root.cern/download/root_v6.28.02.Linux-ubuntu20-x86_64-gcc9.4.tar.gz`
|
|
`curl -SLO https://root.cern/download/root_v6.30.04.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz`
|
|
|
|
|
|
We will install both ROOT and Geant4 into /usr/local directory:
|
|
We will install both ROOT and Geant4 into /usr/local directory:
|
|
|
|
|
|
```
|
|
```
|
|
sudo tar zxf root_v6.28.02.Linux-ubuntu20-x86_64-gcc9.4.tar.gz -C /usr/local/
|
|
sudo tar zxf root_v6.30.04.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz -C /usr/local/
|
|
sudo chown -R `id -un`:`id -gn` /usr/local/root
|
|
sudo chown -R `id -un`:`id -gn` /usr/local/root
|
|
chmod +x /usr/local/root/bin/thisroot.*
|
|
chmod +x /usr/local/root/bin/thisroot.*
|
|
```
|
|
```
|
... | @@ -114,13 +116,6 @@ In the Terminal window type the commands: |
... | @@ -114,13 +116,6 @@ 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.2.0
|
|
git checkout v11.2.0
|
|
```
|
|
|
|
For Geant4 version 11.2.0 you can also apply pathch 3477.path
|
|
|
|
which you can found in installg4/install/Ubuntu-20.04/ directory.
|
|
|
|
This path suppress warning abou Qt5 slot/signals.
|
|
|
|
|
|
|
|
`patch -p1 < 3477.patch`
|
|
|
|
|
|
|
|
This will create a clone of the Geant4 11.2.0 release on your local disk.
|
|
This will create a clone of the Geant4 11.2.0 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.
|
... | @@ -139,15 +134,15 @@ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.2.0 \ |
... | @@ -139,15 +134,15 @@ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/11.2.0 \ |
|
-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
|
|
```
|
|
```
|
|
The multithreading enabled by default and FREETYPE was optional commpnent
|
|
The multithreading enabled by default and FREETYPE was optional component
|
|
|
|
|
|
```
|
|
```
|
|
cmake --build . --target install -- -j4
|
|
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.0` directory.
|
|
|
|
|
|
The installation script `build-geant4-ubuntu20.sh` will do all these steps.
|
|
The installation script `build-geant4-ubuntu.sh` will do all these steps.
|
|
|
|
|
|
## Environment
|
|
## Environment
|
|
|
|
|
... | | ... | |