... | ... | @@ -2,7 +2,7 @@ |
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
In this tutorial we will use Geant4 version 11.0.1, compiled with the support of multithreading, GDML and Qt5 based GUI. The installation of Geant4 version 10.7.1 also tested.
|
|
|
In this tutorial we will use Geant4 version 11.1.1, compiled with the support of multithreading, GDML and Qt5 based GUI. The installation of Geant4 version 10.7.1 also tested.
|
|
|
|
|
|
On MacOS we recommend to install external libraries via [Homebrew](https://brew.sh)
|
|
|
|
... | ... | @@ -12,7 +12,7 @@ script. |
|
|
## macOS Requirements
|
|
|
|
|
|
* A 64-bit Intel or M1 CPU
|
|
|
* macOS High Sierra (10.13) (or higher)
|
|
|
* macOS Big Sur (11.7.6) (or higher)
|
|
|
* Command Line Tools (CLT) for Xcode
|
|
|
* A Bourne-compatible shell for installation (e.g. bash or zsh)
|
|
|
|
... | ... | @@ -74,8 +74,11 @@ See e.g. https://chao-tic.github.io/blog/2018/12/25/tls for information about TL |
|
|
## ROOT Installation ##
|
|
|
|
|
|
The ROOT installation is required for some exercises in this tutorial.
|
|
|
The root installation with brew requeired full XCode installetion.
|
|
|
|
|
|
The command: `brew install root` will install _root_ 6.26/02.
|
|
|
The command: `brew install root` will install _root_ 6.26/06.
|
|
|
|
|
|
I has only xcode cli installed so i download root 6.28.02 directly from http://root.cern.ch
|
|
|
|
|
|
Homebrew installs ROOT in _relocatable_ mode.
|
|
|
To use ROOT, you must set its environment sourcing the *thisroot.sh* script from
|
... | ... | @@ -89,7 +92,7 @@ Visit http://root.cern.ch for more information about ROOT. |
|
|
|
|
|
In order to use Geant4 you need to define the environment variables pointing to the Geant4 datasets locations. This can be done by sourcing the *geant4.sh* script. For our installation this command is:
|
|
|
|
|
|
`source /usr/local/geant4/11.0.1/bin/geant4.sh`
|
|
|
`source /usr/local/geant4/11.1.1/bin/geant4.sh`
|
|
|
|
|
|
In the git repository you can find the bash script *setup_env.sh* with setup both for ROOT and Geant4.
|
|
|
|
... | ... | @@ -104,8 +107,8 @@ if [ -x /usr/local/bin/thisroot.sh ]; then |
|
|
fi
|
|
|
|
|
|
# Geant4
|
|
|
if [ -x /usr/local/geant4/11.0.1/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.0.1/bin/geant4.sh
|
|
|
if [ -x /usr/local/geant4/11.1.1/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.1.1/bin/geant4.sh
|
|
|
fi
|
|
|
|
|
|
>>>>>
|
... | ... | @@ -126,10 +129,10 @@ add these lines in your .bash_profile to get the environment set automatically w |
|
|
**N.B.** Before compiling the examples you need setup the environment for geant4:
|
|
|
|
|
|
```
|
|
|
if [ -x /usr/local/geant4/11.0.1/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.0.1/bin/geant4.sh
|
|
|
if [ -x /usr/local/geant4/11.1.1/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/11.1.1/bin/geant4.sh
|
|
|
# Need this if other Geant4 installed in /usr/local
|
|
|
export CMAKE_PREFIX_PATH=/usr/local/geant4/11.0.1/lib/Geant4-11.0.1
|
|
|
export CMAKE_PREFIX_PATH=/usr/local/geant4/11.1.1/lib/Geant4-11.1.1
|
|
|
fi
|
|
|
```
|
|
|
|
... | ... | @@ -143,7 +146,7 @@ E.g. basic B1 example: |
|
|
$ cd ~/tmp
|
|
|
$ mkdir B1-build
|
|
|
$ cd B1-build
|
|
|
$ cmake /usr/local/geant4/11.0.1/share/Geant4-11.0.1/examples/basic/B1/
|
|
|
$ cmake /usr/local/geant4/11.1.1/share/Geant4-11.1.1/examples/basic/B1/
|
|
|
```
|
|
|
|
|
|
You should see something like the output below. Watch for eventual configuration errors.
|
... | ... | |