... | ... | @@ -4,7 +4,7 @@ |
|
|
|
|
|
In this tutorial we will use Geant4 version 10.7.1, compiled with the support of multithreading, GDML and Qt5 based GUI.
|
|
|
|
|
|
On MacOS we recommend to install Geant4 via [Homebrew](https://brew.sh)
|
|
|
On MacOS we recommend to install external libraries via [Homebrew](https://brew.sh)
|
|
|
|
|
|
All pre-installation steps are summarized in the `install-by-brew.sh`
|
|
|
script.
|
... | ... | @@ -53,18 +53,18 @@ This will install all dependencies: expat , qt5 , xerces-c and cmake which need |
|
|
|
|
|
## Compiling Geant4 10.7.1
|
|
|
|
|
|
Make sure you not have previous geant4 definition in environment variables and path. qt5 tools mast be in you path and you need define **PKG_CONFIG_PATH** variable to allow cmake find qt5 correctly.
|
|
|
Make sure you have no previous geant4 definition in environment variables and path. qt5 tools must be in your path and you need to define **PKG_CONFIG_PATH** variable to allow cmake to find qt5 correctly.
|
|
|
|
|
|
```
|
|
|
export PKG_CONFIG_PATH=/usr/local/opt/qt@5/lib/pkgconfig
|
|
|
export PATH="/usr/local/opt/qt@5/bin:$PATH
|
|
|
```
|
|
|
|
|
|
Now you dir download geant4 via git or tarball and follow standard
|
|
|
cmake installation procedure. In this repository https://llrgit.in2p3.fr/semenjuk/installg4.git you can found script `build-geant4-1071-macos.sh` with i use for installation.
|
|
|
Now you can download geant4 via git or tarball and follow the standard
|
|
|
cmake installation procedure. In this repository https://llrgit.in2p3.fr/semenjuk/installg4.git you can find script `build-geant4-1071-macos.sh` which I use for installation.
|
|
|
Tested on MacOS (11.2.3) Big Sur with Xcode 12.4 installed.
|
|
|
|
|
|
*Note. The default TLS model in Geant4 set to __initial-exec__ make provide some instability and slow-less of QtGui, i has better results with -DGEANT4_BUILD_TLS_MODEL=auto.*
|
|
|
*Note. The default TLS model in Geant4 set to __initial-exec__ can cause some instability and slow-down of QtGui, I have better results with -DGEANT4_BUILD_TLS_MODEL=auto.*
|
|
|
|
|
|
See e.g. https://chao-tic.github.io/blog/2018/12/25/tls for information about TLS modelles in C++
|
|
|
|
... | ... | @@ -86,7 +86,7 @@ Visit http://root.cern.ch for more information about ROOT. |
|
|
|
|
|
## Environment
|
|
|
|
|
|
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 the Homebrew installation this command is:
|
|
|
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/10.7.1/bin/geant4.sh`
|
|
|
|
... | ... | |