Maria Grazia Pia, INFN Genova Overview of the Object Oriented Simulation Toolkit Maria Grazia Pia INFN Genova, Italy [email protected]on behalf of the Geant4 Collaboration Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg Budker Inst. of Physics IHEP Protvino MEPHI Moscow Pittsburg
35
Embed
Maria Grazia Pia, INFN Genova Overview of the Object Oriented Simulation Toolkit Maria Grazia Pia INFN Genova, Italy [email protected] on behalf.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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
Maria Grazia Pia, INFN Genova
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
The Geant approach
Maria Grazia Pia, INFN Genova
Geant4 is a simulation Toolkit designed for a variety of applications
It has been developed and is maintained by an international collaboration of > 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
Maria Grazia Pia, INFN Genova
Geant4 Collaboration
Atlas, BaBar, CMS, HARP, LHCB CERN, JNL,KEK, SLAC, TRIUMF Barcelona Univ., ESA, Frankfurt
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 SupportFor others: free code and user support on best effort basis
Budker Inst. of PhysicsIHEP ProtvinoMEPHI Moscow Pittsburg University
New organization for the production phase, MoU based Distribution, development and User Support
Maria Grazia Pia, INFN Genova
Software Engineering
plays a fundamental role in Geant4
User Requirements• formally collected• systematically updated• PSS-05 standard
Software Process• spiral iterative approach• regular assessments and improvements• monitored following the ISO 15504 model
Quality Assurance• commercial tools• code inspections• automatic checks of coding guidelines• testing procedures at unit and integration level• dedicated testing team
Object Oriented methods• OOAD• use of CASE tools
• essential for distributed parallel development• contribute to the transparency of physics
Use of Standards • de jure and de facto
Domain decomposition
has led to a hierarchical structure of
sub-domains linked
by a uni-directional
flow of
dependencies
Geant4 architecture
Maria Grazia Pia, INFN Genova
Standards
UnitsUnits• 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
Geant4 adopts standards, ISO and de facto
OpenGL e VRML for graphics
CVS for code management
C++ as programming language
STEPengineering and CAD systems
ODMG RD45
Have you heard of
the “incident” with
NASA’s Mars
Climate Orbiter
($125 million)?
Maria Grazia Pia, INFN Genova
Data libraries
Systematic collection and evaluation of experimental data from many sources worldwide
The use of evaluated data is important for the validation of physics results of the experiments
Maria Grazia Pia, INFN Genova
What 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
Maria Grazia Pia, INFN Genova
The 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
Maria Grazia Pia, INFN Genova
Geometry
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
Role: detailed detector description and efficient navigation
External tool for g3tog4 geometry conversion
Maria Grazia Pia, INFN Genova
Things 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
Maria Grazia Pia, INFN Genova
Borexino at Gran Sasso Lab.
BaBar at SLAC Chandra (NASA)XMM-Newton (ESA)
ATLAS at LHC, CERNGLAST (NASA)
CMS at LHC, CERN
A selection of geometry applications
Maria Grazia Pia, INFN Genova
PhysicsPhysics
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.”
Maria Grazia Pia, INFN Genova
Features of Geant4 Physics OOD allows to implement or modify any
physics process without changing other parts of the software
open to extension and evolutionopen to extension and evolution
Tracking Tracking is independent from the physics processes
The generation of the final statefinal 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 electromagneticelectromagnetic and hadronic hadronic physics processes
a variety of complementary and alternative physics modelsphysics models for most processes
Use of public evaluated evaluated databasesdatabases
No tracking cuts, only production production thresholdsthresholds
thresholds for producing secondaries are expressed in rangerange, 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
Maria Grazia Pia, INFN Genova
Processes
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
Processes describe how particles interact with material or with a volume itself
Ionisation energy loss produced by charged particles in thin layers of absorbers
Maria Grazia Pia, INFN Genova
Muon processes
Validity range
1 keV up to 10 PeV scale1 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 ray production e+e- Pair production
Maria Grazia Pia, INFN Genova
Processes 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 Geant4Processes in Geant4 in-flight absorption Rayleigh scattering medium-boundary interactions
(reflection, refraction) Track of a photon entering a light concentrator CTF-Borexino
Maria Grazia Pia, INFN Genova
Hadronic 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
Maria Grazia Pia, INFN Genova
Hadronic 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
Maria Grazia Pia, INFN Genova
Hadronic physicsParameterised and data-driven models (2)
Other models are completely new, such as stopping particles (- , K- ) neutron transport isotope production
NeutronsCourtesy of CMS
nuclear deexcitation
absorption
Stopping
MeV
Energy
All databases existing worldwide used in neutron transport
Brond, CENDL, EFF, ENDFB, JEF, JENDL, MENDL etc.
Maria Grazia Pia, INFN Genova
Hadronic 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
Maria Grazia Pia, INFN Genova
A sample from theory-driven models
Maria Grazia Pia, INFN Genova
Other 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,
batch+macros, 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++
Maria Grazia Pia, INFN Genova
Sector Shielding
Analysis Tool
CAD tool
front-end
Delayed
radioactivity
General purpose
source particle module
INTEGRAL and other science missions
Instrument design purposesDose calculations
Particle source and spectrum
Geological surveys
Modules for space applications
Low-energy e.m. extensions
Maria Grazia Pia, INFN Genova
Fast 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
Maria Grazia Pia, INFN Genova
Performance
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 >3 using exactly the same cuts a factor >10 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)
Maria Grazia Pia, INFN Genova
Documentation
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