| Geant4 User's Guide For Application Developers Examples

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.

- ### Analysis

  - A01 - hit-scoring and histogramming using the AIDA interface
  - AnaEx01 - histogram and tuple manipulations using an AIDA compliant system

- ### 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

  TestEm by theme
  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

- ### Event Biasing

- ### 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

- ### 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

- ### Geant3 to Geant4

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

- ### Geometry Definition Markup Language

  - illustrating import and export of a detector geometry with GDML

- ### Geometry

  - OLAP - debugging tool for overlapping geometries

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

- ### 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 - ionization chamber test

- ### Optical Photons

  - LXe - optical photons in a liquid xenon scintillator

- ### Parallel Computing

  - ExDiane - example of a medical application run in a distributed environment using the DIANE framework
  - ParGeant4 - set of examples derived from 'novice' using parallelism at event level with the TopC application

- ### Persistency

  - PersEx01 - storing calorimeter hits using reflection mechanism with Root

- ### Polarisation

  - Pol01 - example of QED processes including polarization

- ### Radioactive Decay

  - exrdm - decays of radioactive isotopes as well as induced radioactivity resulted from nuclear interactions

- ### 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

- ### Visualization

  - Examples of customisation for visualization

About the authors