Title: Overview of the Object Oriented Simulation Toolkit Maria Grazia Pia INFN Genova, Italy Maria'Grazia'
1Overview of the Object Oriented Simulation
ToolkitMaria Grazia PiaINFN Genova, Italy
Maria.Grazia.Pia_at_cern.chon behalf of the Geant4
Collaboration
2The role of simulation
- The scope of Geant4 encompasses the simulation of
the passage of particles through matter - there are other kinds of simulation components,
such as physics event generators,
detector/electronics response generators, etc. - often the simulation of a complex experiment
consists of several of these components
interfaced to one another
Simulation plays a fundamental role in various
domains and phases of an experimental physics
project
- design of the experimental set-up
- evaluation and definition of the potential
physics output of the project - evaluation of potential risks to the project
- assessment of the performance of the experiment
- development, test and optimisation of
reconstruction and physics analysis software - contribution to the calculation and validation of
physics results
3The zoo
NMTC HERMES FLUKA EA-MC DPM SCALE GEM MF3D
EGS4, EGS5, EGSnrc MCNP, MCNPX, A3MCNP, MCNP-DSP,
MCNP4B Penelope Geant3, Geant4 Tripoli-3,
Tripoli-3 A, Tripoli-4 Peregrine MVP,
MVP-BURN MARS
MCU MORSE TRAX MONK MCBEND VMC LAHET RTST-2000
...and I probably forgot some more
Many codes not publicly distributed A lot of
business around MC
Monte Carlo codes presented at the MC200
Conference, Lisbon, October 2000
4Integrated suites vs specialised codes
Specialised packages cover a specific simulation
domain
Integrated packages cover all/many simulation
domains
- Pro
- the specific issue is treated in great detail
- sometimes the package is based on a wealth of
specific experimental data - simple code, usually relatively easy to install
and use - Contra
- a typical experiment covers many domains, not
just one - domains are often inter-connected
- Pro
- the same environment provides all the
functionality - Contra
- it is more difficult to ensure detailed coverage
of all the components at the same high quality
level - monolithic take all or nothing
- limited or no options for alternative models
- usually complex to install and use
- difficult maintenance and evolution
5The Toolkit approach
- A toolkit is a set of compatible components
- each component is specialised for a specific
functionality - each component can be refined independently to a
great detail - components can be integrated at any degree of
complexity - components can work together to handle
inter-connected domains - it is easy to provide (and use) alternative
components - the simulation application can be customised by
the user according to his/her needs - maintenance and evolution - both of the
components and of the user application - is
greatly facilitated - ...but what is the price to pay?
- the user is invested of a greater responsibility
- he/she must critically evaluate and decide what
he/she needs and wants to use
6The Geant approach
- Geant provides a general infrastructure for
- the description of geometry and materials
- particle transport and interaction with matter
- the description of detector response
- visualisation of geometries, tracks and hits
- The user develops the specific code for
- the primary event generator
- the geometrical description of the set-up
- the digitisation of the detector response
7- Geant4 is a simulation Toolkit designed for a
variety of applications - It has been developed and is maintained by an
international collaboration of gt 100 scientists - RD44 Collaboration
- Geant4 Collaboration
- The code is publicly distributed from the WWW,
together with ample documentation - 1st production release end 1998
- 2 new releases/year since then
- It provides a complete set of tools for all the
typical domains of simulation - geometry and materials
- tracking
- detector response
- run, event and track management
- PDG-compliant particle management
- visualisation
- user interface
- persistency
- physics processes
- It is also complemented by specific modules for
space science applications
8Geant4 Collaboration
- New organization for the production phase, MoU
based - Distribution, development and User Support
- Atlas, BaBar, CMS, HARP, LHCB
- CERN, JNL,KEK, SLAC, TRIUMF
- Barcelona Univ., ESA, Frankfurt Univ.,Helsinki
Univ. IGD, IN2P3, Karolinska Inst., Lebedev, TERA - COMMON (Serpukov, Novosibirsk, Pittsburg etc.)
- Collaboration Board
- manages resources and responsibilities
- Technical Steering Board
- manages scientific and technical matters
- Working Groups
- do maintenance, development, QA, etc.
Members of National Institutes, Laboratories and
Experiments participating in Geant4 Collaboration
acquire the right to the Production Service and
User Support For others free code and user
support on best effort basis
Budker Inst. of Physics IHEP Protvino MEPHI
Moscow Pittsburg University
9Software Engineering
Geant4 architecture
plays a fundamental role in Geant4
- formally collected
- systematically updated
- PSS-05 standard
User Requirements
Domain decomposition has led to a hierarchical
structure of sub-domains linked by a
uni-directional flow of dependencies
Software Process
- spiral iterative approach
- regular assessments and improvements
- monitored following the ISO 15504 model
Object Oriented methods
- essential for distributed parallel development
- contribute to the transparency of physics
- commercial tools
- code inspections
- automatic checks of coding guidelines
- testing procedures at unit and integration level
- dedicated testing team
Quality Assurance
10Standards
Geant4 adopts standards, ISO and de facto
- OpenGL e VRML for graphics
- CVS for code management
- C as programming language
- STEP
- engineering and CAD systems
- ODMG
- RD45
Have you heard of the incident with NASAs Mars
Climate Orbiter (125 million)?
- Units
- Geant4 is independent from the system of units
- all numerical quantities expressed with their
units explicitly - user not constrained to use any specific system
of units
11Data libraries
- Systematic collection and evaluation of
experimental data from many sources worldwide - Databases
- ENDF/B, JENDL, FENDL, CENDL, ENSDF,JEF, BROND,
EFF, MENDL, IRDF, SAID, EPDL, EEDL, EADL, SANDIA,
ICRU etc. - Collaborating distribution centres
- NEA, LLNL, BNL, KEK, IAEA, IHEP, TRIUMF, FNAL,
Helsinki, Durham, Japan etc. - The use of evaluated data is important for the
validation of physics results of the experiments
12What is needed to run Geant4
- Platforms
- DEC, HP, IMB-AIX, SUN, (SGI) native compilers,
g - Linux g
- Windows-NT Visual C
- Commercial software
- ObjectStore STL (optional)
- Free software
- CVS
- gmake, g
- CLHEP
- Graphics
- OpenGL, X11, OpenInventor, DAWN, VRML...
- OPACS, GAG, MOMO...
- Persistence
- it is possible to run in transient mode
- in persistent mode use a HepDB interface, ODMG
standard
13The kernel
- Run and event
- the RunManager can handle multiple events
- possibility to handle the pile-up
- multiple runs in the same job
- with different geometries, materials etc.
- powerful stacking mechanism
- three levels by default handle trigger studies,
loopers etc.
- Tracking
- decoupled from physics all processes handled
through the same abstract interface - tracking is independent from particle type
- it is possible to add new physics processes
without affecting the tracking
- Geant4 has only production thresholds, no
tracking cuts - all particles are tracked down to zero range
- energy, TOF ... cuts can be defined by the user
14Geometry
Role detailed detector description and efficient
navigation
- Multiple representations
- CSG (Constructed Solid Geometries)
- simple solids
- STEP extensions
- polyhedra,, spheres, cylinders, cones, toroids,
etc. - BREPS (Boundary REPresented Solids)
- volumes defined by boundary surfaces
- include solids defined by NURBS (Non-Uniform
Rational B-Splines)
- CAD exchange
- interface through ISO STEP (Standard for the
Exchange of Product Model Data) - Fields
- of variable non-uniformity and differentiability
- use of various integrators, beyond Runge-Kutta
- time of flight correction along particle transport
External tool for g3tog4 geometry conversion
15Things one can do with Geant4 geometry
One can do operations with solids
These figures were visualised with Geant4 Ray
Tracing tool
...and one can describe complex geometries, like
Atlas silicon detectors
16A selection of geometry applications
BaBar at SLAC
XMM-Newton (ESA)
ATLAS at LHC, CERN
GLAST (NASA)
CMS at LHC, CERN
Borexino at Gran Sasso Lab.
17Physics
- From the Minutes of LCB (LHCC Computing Board)
meeting on 21 October, 1997
It was noted that experiments have requirements
for independent, alternative physics models. In
Geant4 these models, differently from the concept
of packages, allow the user to understand how the
results are produced, and hence improve the
physics validation. Geant4 is developed with a
modular architecture and is the ideal framework
where existing components are integrated and new
models continue to be developed.
18Features of Geant4 Physics
- OOD allows to implement or modify any physics
process without changing other parts of the
software - open to extension and evolution
- Tracking is independent from the physics
processes - The generation of the final state is independent
from the access and use of cross sections - Transparent access via virtual functions to
- cross sections (formulae, data sets etc.)
- models underlying physics processes
- An abundant set of electromagnetic and hadronic
physics processes - a variety of complementary and alternative
physics models for most processes - Use of public evaluated databases
- No tracking cuts, only production thresholds
- thresholds for producing secondaries are
expressed in range, universal for all media - converted into energy for each particle and
material
The transparency of the physics implementation
contributes to the validation of experimental
physics results
19Processes
Processes describe how particles interact with
material or with a volume itself
- Three basic types
- At rest process
- (e.g. decay at rest)
- Continuous process
- (e.g. ionization)
- Discrete process
- (e.g. decay in flight)
- Transportation is a process
- interacting with volume boundary
- The process which requires the shortest
interaction length limits the step
20Electromagnetic physics
- multiple scattering
- Bremsstrahlung
- ionisation
- annihilation
- photoelectric effect
- Compton scattering
- Rayleigh effect
- g conversion
- ee- pair production
- synchrotron radiation
- transition radiation
- Cherenkov
- refraction
- reflection
- absorption
- scintillation
- fluorescence
- Auger (in progress)
- It handles
- electrons and positrons
- g, X-ray and optical photons
- muons
- charged hadrons
- ions
energy loss
- Comparable to Geant3 already in the 1st a release
(1997) - High energy extensions
- fundamental for LHC experiments, cosmic ray
experiments etc. - Low energy extensions
- fundamental for space and medical applications,
neutrino experiments, antimatter spectroscopy
etc. - Alternative models for the same physics process
21Photo Absorption Ionisation Model
Ionisation energy loss produced by charged
particles in thin layers of absorbers
3 GeV/c p in 1.5 cm ArCH4
5 GeV/c p in 20.5 mm Si
- Ionisation energy loss distribution produced by
pions, PAI model
22Muon processes
- Validity range
- 1 keV up to 10 PeV scale
- ? simulation of ultra-high energy and cosmic ray
physics - High energy extensions based on theoretical
models - Bremsstrahlung
- Ionisation and d ray production
- ee- Pair production
23Processes for optical photons
- Optical photon ? its wavelength is much greater
than the typical atomic spacing - Production of optical photons in HEP detectors is
mainly due to Cherenkov effect and scintillation - Processes in Geant4
- in-flight absorption
- Rayleigh scattering
- medium-boundary interactions (reflection,
refraction)
Track of a photon entering a light concentrator
CTF-Borexino
24Hadronic physics
- Relevant features
- theory-driven, parameterisation-driven,
data-driven models - complementary and alternative models
- Cross section data sets
- transparent and interchangeable
- Final state calculation
- models by particle, energy, material
25Hadronic physicsParameterised and data-driven
models (1)
- Based on experimental data
- Some models originally from GHEISHA
- completely reengineered into OO design
- refined physics parameterisations
- New parameterisations
- pp, elastic differential cross section
- nN, total cross section
- pN, total cross section
- np, elastic differential cross section
- ?N, total cross section
- ?N, coherent elastic scattering
p elastic scattering on Hydrogen
26Hadronic physicsParameterised and data-driven
models (2)
- Other models are completely new, such as
- stopping particles (?- , K- )
- neutron transport
- isotope production
- All databases existing worldwide used in neutron
transport - Brond, CENDL, EFF, ENDFB, JEF, JENDL, MENDL etc.
27Hadronic physicsTheoretical models
- They fall into different parts
- the evaporation phase
- the low energy range, pre-equilibrium, O(100
MeV), - the intermediate energy range, O(100 MeV) to O(5
GeV), intra-nuclear transport - the high energy range, hadronic generator
régime - Geant4 provides complementary theoretical models
to cover all the various parts - Geant4 provides alternative models within the
same part - All this is made possible by the powerful Object
Oriented design of Geant4 hadronic physics - Easy evolution new models can be easily added,
existing models can be extended
28A sample from theory-driven models
29Other components
- Materials
- elements, isotopes, compounds, chemical formulae
- Particles
- all PDG data
- and more, for specific Geant4 use, like ions
- Hits Digi
- to describe detector response
- Persistency
- possibility to run in transient or persistent
mode - no dependence on any specific persistency model
- persistency handled through abstract interfaces
to ODBMS
- Visualisation
- Various drivers
- OpenGL, OpenInventor, X11, Postscript, DAWN,
OPACS, VRML - User Interfaces
- Command-line, Tcl/Tk, Tcl/Java, batchmacros,
OPACS, GAG, MOMO - automatic code generation for geometry and
materials - Interface to Event Generators
- through ASCII file for generators supporting
/HEPEVT/ - abstract interface to Lund
30Modules for space applications
General purpose source particle module
Delayed radioactivity
INTEGRAL and other science missions
Low-energy e.m. extensions
Particle source and spectrum
Geological surveys
Sector Shielding Analysis Tool
CAD tool front-end
Instrument design purposes
Dose calculations
31Fast simulation
- Geant4 allows to perform full simulation and
fast simulation in the same environment - Geant4 parameterisation produces a direct
detector response, from the knowledge of particle
and volume properties - hits, digis, reconstructed-like objects (tracks,
clusters etc.) - Great flexibility
- activate fast /full simulation by detector
- example full simulation for inner detectors,
fast simulation per calorimeters - activate fast /full simulation by geometry
region - example fast simulation in central areas and
full simulation near cracks - activate fast /full simulation by particle type
- example in e.m. calorimeter e/?
parameterisation and full simulation of hadrons - parallel geometries in fast/full simulation
- example inner and outer tracking detectors
distinct in full simulation, but handled together
in fast simulation
32Performance
- Various Geant4 - Geant3.21 comparisons
- realistic detector configurations
- results and plots in
- Geant4 Web Gallery (from Geant4 homepage)
- RD44 Status Report, 1995
- Benchmark in liquid Argon/Pb calorimeter
- at comparable physics performance Geant4 is
faster than (fully optimised) Geant3.21 by - a factor gt3 using exactly the same cuts
- a factor gt10 optimising Geant4 cuts, while
keeping the same physics performance - at comparable speed Geant4 physics performance is
greatly superior to Geant3.21 - Benchmark in thin silicon layer
- at comparable physics performance Geant4 is 25
faster than Geant3.21 (single volume, single
material)
33Documentation
http//cern.ch/geant4/geant4.html
- User Documentation
- Introduction to Geant4
- Installation Guide
- Application Developer Guide
- Toolkit Developer Guide
- Software Reference Manual
- Physics Reference Manual
- Examples
- a set of Novice, Extended and Advanced examples
illustrating the main functionalities of Geant4
in realistic set-ups
- The Gallery
- a web collection of performance and physics
evaluations - http//cern.ch/geant4/reports/gallery/
- Publication and Results web page
- http//cern.ch/geant4/reports/reports.html
- Low Energy e.m. Physics
- httpwww.ge.infn.it/geant4/lowE
Seminars and Training courses available
34Conclusions
Geant4 has successfully coped with a variety of
challenges
- The software challenge
- first successful attempt to redesign a major
package of HEP software adopting an Object
Oriented environment and a rigorous approach to
advanced software engineering - The functionality challenge
- a variety of requirements from many application
domains (HEP, space, medical etc.) - The physics challenge
- transparency
- extended coverage of physics processes across a
wide energy range, with alternative models
- The performance challenge
- mandatory for large scale HEP experiments and for
other complex applications - The distributed software development
- OOAD has provided the framework for distributed
parallel development - The management challenge
- a well defined, and continuously improving,
software process has allowed to achieve the goals - The user support challenge
- the user community is distributed worldwide,
operating in a variety of domains
35Geant4 review
- Next week at CERN
- External review to evaluate Geant4 activity in
1999-2000 - Chairman U. Mortensen (ESA)
- Part 1
- Presentation of the activity of Geant4
Collaboration in 1999-2000 - (functionalities, user support etc.)
- Part 2
- Results of applications from user groups (mainly
comparisons with data) - Feedback on user support
- Not a channel to present user requirements
- User requirements should be conveyed through the
normal User Support path (TSB Representatives) - TSB Representatives attending this Round Table
- V. Ivanchenko (Novosibirsk, Common), P. Nieminen
(ESA), M.G. Pia (INFN), P. Truscott (DERA)