Maria Grazia Pia, INFN Genova
Overview of the
Object Oriented Simulation ToolkitMaria Grazia PiaINFN Genova, Italy
[email protected] behalf of the Geant4 Collaboration
Budker Inst. of PhysicsIHEP ProtvinoMEPHI Moscow Pittsburg University
Budker Inst. of PhysicsIHEP ProtvinoMEPHI Moscow Pittsburg University
Maria Grazia Pia, INFN Genova
The role of simulation
designdesign of the experimental set-up evaluation and definition of the
potential physics outputphysics output of the project
evaluation of potential risksrisks to the project
assessment of the performanceperformance of the experiment
development, test and optimisation of reconstructionreconstruction and physics analysis softwareanalysis software
contribution to the calculation and validation of physics results physics results
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
Maria Grazia Pia, INFN Genova
EGS4, EGS5, EGSnrcMCNP, MCNPX, A3MCNP, MCNP-DSP, MCNP4BPenelopeGeant3, Geant4Tripoli-3, Tripoli-3 A, Tripoli-4 PeregrineMVP, MVP-BURNMARS
MCUMORSETRAXMONKMCBENDVMC++LAHETRTS&T-2000
NMTCHERMES FLUKAEA-MCDPMSCALEGEMMF3D
...and I probably forgot some more
Many codes not publicly distributed
A lot of business around MC
The zoo
Monte Carlo codes presented at the MC200 Conference, Lisbon, October 2000Monte Carlo codes presented at the MC200 Conference, Lisbon, October 2000
Maria Grazia Pia, INFN Genova
Integrated suites vs specialised codes
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
functionalityContra:• 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
Specialised packages cover a specific simulation domain
Integrated packages cover all/many simulation domains
Maria Grazia Pia, INFN Genova
The 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
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
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 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
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
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
Maria Grazia Pia, INFN Genova
multiple scattering Bremsstrahlung ionisation annihilation photoelectric effect Compton scattering Rayleigh effect conversion e+e- pair production synchrotron radiation transition radiation Cherenkov refraction reflection absorption scintillation fluorescence Auger (in progress)
Electromagnetic physics
Comparable to Geant3 already in the 1st release (1997)
High energy extensionsHigh energy extensions fundamental for LHC experiments, cosmic ray experiments etc.
Low energy extensionsLow energy extensions fundamental for space and medical applications, neutrino
experiments, antimatter spectroscopy etc.
Alternative models for the same physics processAlternative models for the same physics process
energy lossIt handles
electrons and positrons , X-ray and optical photons muons charged hadrons ions
Maria Grazia Pia, INFN Genova
Ionisation energy loss distribution produced by pions, PAI modelPAI model
3 GeV/c in 1.5 cm Ar+CH4 5 GeV/c in 20.5 m Si
PPhoto hoto AAbsorption bsorption IIonisation onisation ModelModel
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
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 http:www.ge.infn.it/geant4/lowE
http://cern.ch/geant4/geant4.html
Seminars and Training courses available
Maria Grazia Pia, INFN Genova
Conclusions
The software challengeThe 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 challengeThe functionality challenge a variety of requirements from many
application domains (HEP, space, medical etc.)
The physics challengeThe physics challenge transparency extended coverage of physics
processes across a wide energy range, with alternative models
The performance challengeThe performance challenge mandatory for large scale HEP
experiments and for other complex applications
The distributed software The distributed software developmentdevelopment
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 challengeThe user support challenge the user community is distributed
worldwide, operating in a variety of domains
Geant4 has successfully coped with a variety of challenges
Maria Grazia Pia, INFN Genova
Geant4 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)
Top Related