How to build and run this geant4 sample code.
$ cd geant4-example_compton**
$ mkdir build
$ cd build
$ cmake -DGeant4_DIR=/Home/Geant4/einstall/lib64/Geant4-9.6.4 ../source
- The path of -DGeant4_DIR (/Home/Geant4/...) should be changed according to your geant4 installation location.
- If cmake doesn't suceed because of some errors, please remove invisible files such as ~*.cc or ~*.hh in source/src or source/include, which might cause the cmake errors.
$ make
$ ./exampleB3
In Qt window, you can check beam condition by running the macro file by put /control/execute run.mac in Session.
$ ./exampleB3 run.mac
or
$ ./exampleB3 run.mac > /dev/null 2>&1
Please build (make) again whenever changing source files or header files, otherwise, those changes happened after the last make (build), would not be reflected to the simulation.