|
|
|
|
|
Introduction to Geant4
Lectures by Andrea dell'Acqua (CERN)
From the Ann Arbor Workshop on Geant4 26 February to 2 March, 2001.
|
|
Exercise N01
The standard Geant4 distribution comes with a set of exercises (both for the novice and the advanced user). The simplest exercise (ExN01 in the novice category) is quite useful for testing the Geant4 installation and to see a Geant4 program (although quite trivial) at work. ExN01 begins in Lecture 2, Installation of Geant4, on slide number 12.
Steps ExN01
- A plate calorimeter, three geantinos (geometrical probes) are shot into the experiment. Setup at slightly different angles.
- A dump of the event is produced.
- Set all variables needed for running (don't forget LD_LIBRARY PATH)
- Copy the example code below:
cp -r $G4INSTALL/examples/novice/N01 .
cd N01
export G4WORKDIR='pwd'
gmake- to run:
bin/Linux-g++/exampleN01
Definitions
- G4SYSTEM is the variable one must set to tell gmake which system and compiler you are running.
- Shared libraries are intended to be linked with executing processes at run-time rather than during the link phase of executable development.
Helpful Links
- Source code (in order to install the Geant4 libraries on your system)
- For the latest version of Geant4 that is maintained and publicly available on the AFS directory: /afs/cern.ch/atlas/project/geant4/current
- To see how GNUmake works in Geant4 view slide numbers 13 and 14.
Checklist
- Did you install the CLHEP library and code?
- Did you try to build an example? If not, start on slide number 8.
- Did you decide to use a shared library? Try slide number 10
for how to do this.
Back to the Geant4 Lectures
![]()
For information: wlap@umich.edu http://www.umich.edu/~wlap Last modified: syscmd(date)