... | ... | @@ -93,10 +93,12 @@ add these lines in your .bash_profile to get the environment set automatically w |
|
|
|
|
|
Make sure you not have previous geant4 definition in environment variables and path. qt tools mast be in you path and you need define **PKG_CONFIG_PATH**
|
|
|
variable to allow cmake find qt correctly.
|
|
|
|
|
|
```
|
|
|
export PKG_CONFIG_PATH=/usr/local/opt/qt/lib/pkgconfig
|
|
|
export PATH="/usr/local/opt/qt/bin:$PATH
|
|
|
```
|
|
|
|
|
|
Now you dir download geant4 via git or tarball and follow standard
|
|
|
cmake installation procedure. In this repository you can found script
|
|
|
`build-geant4-1063-macos.sh`
|
... | ... | @@ -106,13 +108,14 @@ with i use for installation. Tested on MacOS (10.15.7) Catalina with Xcode and C |
|
|
See e.g. https://chao-tic.github.io/blog/2018/12/25/tls for information about TLS modelles in C++
|
|
|
|
|
|
Before compiling the examples you need setup the environment for geant4.
|
|
|
|
|
|
```
|
|
|
if [ -x /usr/local/geant4/10.6.3/bin/geant4.sh ]; then
|
|
|
. /usr/local/geant4/10.6.3/bin/geant4.sh
|
|
|
# Need this if other Geant4 installed in /usr/local
|
|
|
export CMAKE_PREFIX_PATH=/usr/local/bin/geant/10.6.3/lib/Geant4-10.6.3
|
|
|
fi
|
|
|
'''
|
|
|
```
|
|
|
|
|
|
## Testing of installation
|
|
|
|
... | ... | @@ -158,6 +161,7 @@ You should see something like the output below. Watch for eventual configuratio |
|
|
-- Generating done
|
|
|
-- Build files have been written to: /Users/semenjuk/tmp/B1-build
|
|
|
```
|
|
|
|
|
|
Now you can build the application with `make -j4` where -j4 is the number of parallel make processes.
|
|
|
|
|
|
```
|
... | ... | @@ -177,17 +181,20 @@ The compilation finished successfully |
|
|
```
|
|
|
|
|
|
Now you can run the example executable:
|
|
|
|
|
|
```
|
|
|
./exampleB1
|
|
|
```
|
|
|
|
|
|
This will open an interactive QT GUI window.
|
|
|
|
|
|
To generate N events type in the Session window:
|
|
|
```
|
|
|
/run/beamOn N
|
|
|
```
|
|
|
|
|
|
To quit application type:
|
|
|
|
|
|
```
|
|
|
exit
|
|
|
```
|
... | ... | |