Loading...
Searching...
No Matches
How to build and run TestEm1 example

Below we give the explicit instructions (described in general at How to build and run an example page) for the example extended/electromagnetic/TestEm1.

Let's suppose that the TestEm1 directory is available in $HOME and Geant4 installation in /usr/local and we work within the bash shell on a 64-bit machine.

Compile and link TestEm1 to generate an executable

% cd $HOME
% mkdir TestEm1_build
% cd TestEm1_build
% cmake -DGeant4_DIR=/usr/local/lib64/Geant4-11.0.0/ ../TestEm1
% make -j 2 TestEm1

Execute TestEm1 in 'batch' mode from macro files

% cd $HOME/TestEm1_build    # or cd $HOME/TestEm1 if example was built with GNUmake
% ./TestEm1 annihil.mac
% ./TestEm1 brem.mac
% ./TestEm1 TestEm1.in >& myTestEm1.out   # redirecting output in a file

Execute TestEm1 in 'interactive mode' with visualization

% cd $HOME/TestEm1_build    # or cd $HOME/TestEm1 if example was built with GNUmake
% ./TestEm1
PreInit> /run/initialize 
Idle>    /run/beamOn 1
...
Idle>    exit

Applications | User Support | Publications | Collaboration