From Documentation
Jump to: navigation, search
This page is will be deleted pending it's creation on the CC wiki.
GEANT4
Description: Suite of programs for the simulation of the passage of particles through matter
SHARCNET Package information: see GEANT4 software page in web portal
Full list of SHARCNET supported software


Introduction

Geant4 is a toolkit for the simulation of the passage of particles through matter. Its areas of application include high energy, nuclear and accelerator physics, as well as studies in medical and space science.

Usage on graham and cedar

Geant4 is installed as a module on cedar and graham.

To see which versions are available, execute:

module avail geant4

To then use a particular version, execute for example:

module load geant4/10.02.p03

After you load the module, you can see where the software is installed by executing:

echo $EBROOTGEANT4

To see the useful examples included with the version we have loaded, execute:

ls $EBROOTGEANT4/share/Geant4-10.2.3/examples

Consider the AnaEx01 example as follows:

mkdir -p ~/samples/geant4/test-100202
cd ~/samples/geant4/test-100202
module load geant4/10.02.p03
cp -r $EBROOTGEANT4/share/Geant4-10.2.3/examples/extended/analysis/AnaEx01 .
source $EBROOTGEANT4/share/Geant4-10.2.3/geant4make/geant4make.sh
cd AnaEx01
mkdir build
cd build
cmake ..
make

This creates the executable AnaEx01 in the current (build) folder. You can run it by:

./AnaEx01

You run this executable and enter "help" for the available actions.

Once the binary runs interactively as desired you can submit it as a job. (see Running jobs page).

Usage on older SHARCNET systems

SHARCNET provides a build of geant4 on sharcnet CentOS clusters .

Geant4 comes with many examples useful for testing purposes:

[roberpj@vdi-centos6:/opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis] ls 
AnaEx01  AnaEx02  AnaEx03  B1Con  CMakeLists.txt  History  README  shared

Interactive

Consider the AnaEx01 example as follows:

mkdir -p ~/samples/geant4/test-100202
cd ~/samples/geant4/test-100202
module unload intel
module load ldwrapper gcc/4.9.3 geant4/10.02.02
cp -r /opt/sharcnet/geant4/10.02.02/share/Geant4-10.2.2/examples/extended/analysis/AnaEx01 .
source geant4make.sh
cd AnaEx01
gmake clean_setup
gmake setup
gmake

where ...

[roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] which AnaEx01 
~/geant4_workdir/bin/Linux-g++/AnaEx01

To run the binary do:

[roberpj@vdi-centos6:~/samples/geant4/test-100202/AnaEx01] AnaEx01
Idle> help
Command directory path : /
Sub-directories : 
1) /control/   UI control commands.
2) /units/   Available units.
3) /process/   Process Table control commands.
4) /analysis/   ...Title not available...
5) /particle/   Particle control commands.
6) /geometry/   Geometry control commands.
7) /tracking/   TrackingManager and SteppingManager control commands.
8) /event/   EventManager control commands.
9) /cuts/   Commands for G4VUserPhysicsList.
10) /run/   Run control commands.
11) /random/   Random number status control commands.
12) /material/   Commands for materials
13) /N03/   UI commands of this example
14) /physics_lists/   commands related to the physics simulation engine.
15) /gun/   Particle Gun control commands.
16) /heptst/   Controls for the hadronic energy/momentum test
17) /physics_engine/   ...Title not available...
18) /vis/   Visualization commands.
Commands : 
Type the number ( 0:end, -n:n level back ) :

Cluster

Once the binary runs interactively as desired submit it to the serial queue:

sqsub -q serial -r 5m -o file.%J ~/geant4_workdir/bin/Linux-g++/AnaEx01

Graphical

None at this time.

Notes

None at this time.

References

o Geant4 Homepage
http://geant4.web.cern.ch/geant4/

o Online User Documentation
http://geant4.web.cern.ch/geant4/support/userdocuments.shtml