10.4.  Extended Examples

10.4.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.

10.4.1.1.  Analysis

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

  • AnaEx01 - histogram and tuple manipulations using Geant4 internal g4tools system

  • AnaEx02 - histogram and tuple manipulations using ROOT

  • AnaEx03 - histogram and tuple manipulations using the AIDA interface

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

10.4.1.2.  Common

  • ReadMe - a set of common classes which can be reused in other examples demonstrating just a particular feature. This module is going to be enhanced in future.

10.4.1.3.  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 10.6.  TestEm by theme


10.4.1.4.  Error Propagation

10.4.1.5.  Event Biasing

10.4.1.6.  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

  • particleGun - demonstrating three different ways of usage of G4ParticleGun, shooting primary particles in different cases

  • pythia - illustrating the usage of Pythia as Monte Carlo event generator, interfaced with Geant4, and showing how to implement an external decayer (example decayer6)

10.4.1.7.  Exotic Physics

  • Monopole - illustrating how to measure energy deposition in classical magnetic monopole

  • Phonon - demonstrates simulation of phonon propagation in cryogenic crystals

10.4.1.8.  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

  • field05 - demonstration of "spin-frozen" condition, how to cancel the muon g-2 precession by applying an electric field

  • field06 - exercising the new (in 9.5) capability of tracking massive particles in a gravity field

10.4.1.9.  Geant3 to Geant4

  • General ReadMe - converting simple geometries in Geant3.21 to their Geant4 equivalents (example clGeometry)

10.4.1.10.  Geometry

10.4.1.11.  Hadronic

  • Hadr00 - example demonstrating the usage of G4PhysListFactory to build physics lists and usage of G4HadronicProcessStore to access the cross sections

  • 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

  • Hadr02 - example application providing simulation of ion beam interaction with different targets. Hadronic aspects of beam target interaction are demonstrated including longitudinal profile of energy deposition, spectra of secondary particles, isotope production spectra.

  • Hadr03 - example demonstrating how to compute total cross section from the direct evaluation of the mean free path, how to identify nuclear reactions and how to plot energy spectrum of secondary particles

10.4.1.12.  Medical Applications

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

  • electronScattering - benchmark on electron scattering

  • electronScattering2 - benchmark on electron scattering (second way to implement the same benchmark as the above)

  • 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

10.4.1.13.  Optical Photons

  • General ReadMe

  • LXe - optical photons in a liquid xenon scintillator

  • WLS - application simulating the propagation of photons inside a Wave Length Shifting (WLS) fiber

10.4.1.14.  Parallel Computing

  • General ReadMe

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

  • ParGeant4 - set of examples (ParN02 and ParN04) derived from novice using parallelism at event level with the TopC application

10.4.1.15.  Parameterisations

  • Gflash - Demonstrates the use of the GFLASH parameterisation library. It uses the GFLASH equations(hep-ex/0001020, Grindhammer & Peters) to parametrise electromagnetic showers in matter

10.4.1.16.  Persistency

  • General ReadMe

  • GDML - examples set (G01, G02, G03 and G04) illustrating import and export of a detector geometry with GDML, and how to extend the GDML schema or use the auxiliary information field for defining additional persistent properties

  • P01 - storing calorimeter hits using reflection mechanism with Root

  • P02 - storing detector description using reflection mechanism with Root

  • P03 - illustrating import and export of a detector geometry using ASCII text description and syntax

10.4.1.17.  Polarisation

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

10.4.1.18.  Radioactive Decay

  • rdecay01 - demonstrating basic functionality of the G4RadioactiveDecay process

  • rdecay02 (Exrdm) - decays of radioactive isotopes as well as induced radioactivity resulted from nuclear interactions

10.4.1.19.  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)

  • RE04 - demonstrating how to define a layered mass geometry in parallel world

10.4.1.20.  Visualization

  • General ReadMe - examples (perspective, standalone and userVisAction) of customisation for visualization