9.2.  Extended Examples

9.2.1.  Extended Example Summary

Geant4 extended examples serve three purposes:

  • testing and validation of processes and tracking,

  • demonstration of Geant4 tools, and

  • extending the functionality of Geant4.

The code for these examples is maintained as part of the categories to which they belong. Links to descriptions of the examples are listed below.

9.2.1.1.  Analysis

  • A01 - hit-scoring and histogramming using the AIDA interface

  • AnaEx01 - histogram and tuple manipulations using an AIDA compliant system

  • N03Con - modified novice example N03 showing how to use a Convergence Tester

9.2.1.2.  Electromagnetic

  • TestEm0 - how to print cross-sections and stopping power used in input by the standard EM package

  • TestEm1 - how to count processes, activate/inactivate them and survey the range of charged particles. How to define a maximum step size

  • TestEm2 - shower development in an homogeneous material : longitudinal and lateral profiles

  • TestEm3 - shower development in a sampling calorimeter : collect energy deposited, survey energy flow and print stopping power

  • TestEm4 - 9 MeV point like photon source: plot spectrum of energy deposited in a single media

  • TestEm5 - how to study transmission, absorption and reflection of particles through a single, thin or thick, layer.

  • TestEm6 - physics list for rare, high energy, electromagnetic processes: gamma conversion and e+ annihilation into pair of muons

  • TestEm7 - how to produce a Bragg curve in water phantom. How to compute dose in tallies

  • TestEm8 - test of photo-absorption-ionisation model in thin absorbers, and transition radiation

  • TestEm9 - shower development in a crystal calorimeter; cut-per-region

  • TestEm10 - XTR transition radiation model, investigation of ionisation in thin absorbers

  • TestEm11 - how to plot a depth dose profile in a rectangular box

  • TestEm12 - how to plot a depth dose profile in spherical geometry : point like source

  • TestEm13 - how to compute cross sections of EM processes from rate of transmission coefficient

  • TestEm14 - how to compute cross sections of EM processes from direct evaluation of the mean-free path. How to plot final state

  • TestEm15 - compute and plot final state of Multiple Scattering as an isolated process

  • TestEm16 - simulation of synchrotron radiation

  • TestEm17 - check the cross sections of high energy muon processes

  • TestEm18 - energy lost by a charged particle in a single layer, due to ionization and bremsstrahlung

Check basic quantities
Total cross sections, mean free paths ... Em0, Em13, Em14
Stopping power, particle range ... Em0, Em1, Em5, Em11, Em12
Final state : energy spectra, angular distributions Em14
Energy loss fluctuations Em18
Multiple Coulomb scattering
as an isolated mechanism Em15
as a result of particle transport Em5
More global verifications
Single layer: transmission, absorption, reflexion Em5
Bragg curve, tallies Em7
Depth dose distribution Em11, Em12
Shower shapes, Moliere radius Em2
Sampling calorimeters, energy flow Em3
Crystal calorimeters Em9
Other specialized programs
High energy muon physics Em17
Other rare, high energy processes Em6
Synchrotron radiation Em16
Transition radiation Em8
Photo-absorption-ionization model Em10

Table 9.4.  TestEm by theme


9.2.1.3.  Event Biasing

9.2.1.4.  Event Generator

  • HepMCEx01 - simplified collider detector using HepMC interface and stacking

  • HepMCEx02 - connecting primary particles in Geant4 with various event generators using the HepMC interface

  • MCTruth - demonstrating a mechanism for Monte Carlo truth handling using HepMC as the event record

  • exgps - illustrating the usage of the G4GeneralParticleSource utility

9.2.1.5.  Fields

  • BlineTracer - tracing and visualizing magnetic field lines

  • field01 - tracking using magnetic field and field-dependent processes

  • field02 - tracking using electric field and field-dependent processes

  • field03 - tracking in a magnetic field where field associated with selected logical volumes varies

  • field04 - definition of overlapping fields either magnetic, electric or both

9.2.1.6.  Geant3 to Geant4

  • General ReadMe - converting simple geometries in Geant3.21 to their Geant4 equivalents

9.2.1.7.  Geometry Definition Markup Language

  • General ReadMe - illustrating import and export of a detector geometry with GDML

9.2.1.8.  Geometry

9.2.1.9.  Error Propagation

9.2.1.10.  Hadronic

  • Hadr01 - example based on the application IION developed for simulation of proton or ion beam interaction with a water target. Different aspects of beam target interaction are included.

9.2.1.11.  Medical Applications

  • DICOM - geometry set-up using the Geant4 interface to the DICOM image format

  • GammaTherapy - gamma radiation field formation in water phantom by electron beam hitting different targets

  • fanoCavity - dose deposition in an ionization chamber by a monoenergetic photon beam

  • fanoCavity2 - dose deposition in an ionization chamber by an extended one-dimensional monoenergetic electron source

9.2.1.12.  Optical Photons

9.2.1.13.  Parallel Computing

  • General ReadMe

  • ExDiane - example of a medical application run in a distributed environment using the DIANE framework

  • MPI - interface and examples of applications parallelized with different MPI compliant libraries, such as LAM/MPI, MPICH2, OpenMPI, etc.

  • ParGeant4 - set of examples derived from 'novice' using parallelism at event level with the TopC application

9.2.1.14.  Persistency

  • General ReadMe

  • P01 - storing calorimeter hits using reflection mechanism with Root

  • P02 - storing detector description using reflection mechanism with Root

9.2.1.15.  Polarisation

  • Pol01 - interaction of polarized beam (e.g. circularly polarized photons) with polarized target

9.2.1.16.  Radioactive Decay

  • General ReadMe - decays of radioactive isotopes as well as induced radioactivity resulted from nuclear interactions

9.2.1.17.  Run & Event

  • RE01 - information between primary particles and hits and usage of user-information classes

  • RE02 - simplified fixed target application for demonstration of primitive scorers

  • RE03 - use of UI-command based scoring; showing how to create parallel world(s) for defining scoring mesh(es)

9.2.1.18.  Visualization

  • Examples of customisation for visualization