Geant4 concepts and functionalities

Slides:



Advertisements
Similar presentations
Maria Grazia Pia, INFN Genova and CERN1 An OO model for intra-nuclear transport Maria Grazia Pia L. Bellagamba, A. Brunengo, E. Di Salvo for the Geant4.
Advertisements

The Geant4 Kernel: Status and Recent Developments John Apostolakis, Gabriele Cosmo – CERN / PH Makoto Asai – SLAC On behalf the Geant4 collaboration April.
Use of G EANT 4 in CMS AIHENP’99 Crete, April 1999 Véronique Lefébure CERN EP/CMC.
LCD group seminar Peter Speckmayer 4. August /3/20091GEANT4 seminar, Peter Speckmayer.
Maria Grazia Pia, INFN Genova Overview of the Object Oriented Simulation Toolkit Maria Grazia Pia INFN Genova, Italy on behalf.
Maria Grazia Pia, INFN Genova 1 Part V The lesson learned Summary and conclusions.
Other GEANT4 capabilities Event biasing Parameterisation (fast simulation) Persistency Parallelisation and integration in a distributed computing environment.
Introduction to Geant4 Part I – General Introduction Makoto Asai (SLAC) Takashi Sasaki (KEK) March 22 nd, NIRS.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11 th, 2002 Getting Started.
14 User Documents and Examples I SLAC Geant4 Tutorial 3 November 2009 Dennis Wright Geant4 V9.2.p02.
Makoto Asai (SLAC) Geant4 Users SLAC Feb. 18 th, 2002 Getting Started.
Highlights of latest developments ESA/ESTEC Makoto Asai (SLAC)
14 Overview of Geant4 Examples 2 nd Finnish Geant4 Workshop 6-7 June 2005 Dennis Wright (SLAC)
GEANT4 Introduction, History Geant4 User’s Workshop February 2002.
14 User Documents and Examples II SLAC Geant4 Tutorial 17 May 2007 Dennis Wright Geant4 V8.3.
Software Installation, release 4.0 Geant4 Users’ Workshop Tutorial SLAC February 18-22, 2002 Takashi Sasaki, Gabriele Cosmo,
1 M.G. Pia et al. The application of GEANT4 simulation code for brachytherapy treatment Maria Grazia Pia INFN Genova, Italy and CERN/IT
Maria Grazia Pia, INFN Genova Low Energy Electromagnetic Physics Maria Grazia Pia INFN Genova
Maria Grazia Pia, INFN Genova - EPS-HEP 2001 Architecture of collaborating frameworks Architecture of collaborating frameworks Simulation, Visualisation,
Maria Grazia Pia, INFN Genova and CERN1 Geant4 Hadron Kinetic Model for intra-nuclear transport Maria Grazia Pia CERN/IT and INFN, Sezione di Genova L.Bellagamba.
Software Installation The full set of lecture notes of this Geant4 Course is available at
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Japan.
14 Overview of Geant4 Examples Geant4 Tutorial 8-10 March 2004 Dennis Wright (SLAC)
Particles and Processes The full set of lecture notes of this Geant4 Course is available at
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
Geant4 Collaboration 1 Electromagnetic Physics Authors: P. Gumplinger, M. Maire, P. Nieminen, M.G. Pia, L. Urban Budker Inst. of Physics IHEP Protvino.
User Documents and Examples I Sébastien Incerti Slides thanks to Dennis Wrigth, SLAC.
Geant4 Electromagnetic Physics Introduction V.Ivanchenko, M.Maire, M.Verderi  Process interface  Physics categories  Electromagnetic physics  PhysicsList.
IEEE Nuclear Science Symposium and Medical Imaging Conference Short Course The Geant4 Simulation Toolkit Sunanda Banerjee (Saha Inst. Nucl. Phys., Kolkata,
User Documents and Examples II Geant4 Tutorial at Marshall Space Flight Center 18 April 2012 Dennis Wright (SLAC) Geant4 V9.5.
Maria Grazia Pia Detector Response Acknowledgements: A. Lechner, J. Apostolakis, M. Asai, G. Cosmo, A. Howard.
Atlas Simulation Activities What is Geant 4 Atlas Strategy.
1 Status and Plans for Geant4 Physics Linear Collider Simulation Workshop III 2-5 June 2004 Dennis Wright (SLAC)
Detector Simulation Presentation # 3 Nafisa Tasneem CHEP,KNU  How to do HEP experiment  What is detector simulation?
17-19 Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan Oct, 2007Geant4 Japan 2007 Geant4 Collaboration.
Precision Validation of Geant4 Electromagnetic Physics Geant4 DNA Project Meeting 26 July 2004, CERN Michela.
Maria Grazia Pia INFN Genova Salamanca, July 2002
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Documentation Gunter Folger / CERN Geant4 School, Annecy 2008.
Geant4 Training 2006 Short Course Katsuya Amako (KEK) Gabriele Cosmo (CERN) Susanna Guatelli (INFN Genova) Aatos Heikkinen (Helsinki Institute of Physics)
V.Ivanchenko Salamanca1 Geant4: Hadronic Processes 1  Cross sections  Secondary generators  Nuclear interactions at rest  CHIPS model.
V.Ivanchenko Salamanca1 Geant4: Electromagnetic Processes 1  Introduction  Interfaces  PhysicsList  Optical process.
Makoto Asai (SLAC) Getting Started MGP: added class diagram of basic user application.
Maria Grazia Pia, INFN Genova Maria Grazia Pia INFN Genova Salamanca, July 2002
Maria Grazia Pia, INFN Genova and CERN1 Geant4 highlights of relevance for medical physics applications Maria Grazia Pia INFN Genova and CERN.
1 Giuseppe G. Daquino 26 th January 2005 SoFTware Development for Experiments Group Physics Department, CERN Background radiation studies using Geant4.
Geant4 Simulation for KM3 Georgios Stavropoulos NESTOR Institute WP2 meeting, Paris December 2008.
A Short Course on Geant4 Simulation Toolkit Introduction
Gunter Folger / CERN MC-PAD, DESY/Hamburg Jan 2010
Interaction with the Geant4 kernel
Particles and Processes
Interaction with the Geant4 kernel
User Documents and Examples I
Particles and Processes
Basics of a user application
Makoto Asai (SLAC) Geant4 Users CERN Nov. 11th, 2002
Particles and Processes
Software Installation
Other GEANT4 capabilities
Short Course Siena, 5-6 October 2006
The Hadrontherapy Geant4 advanced example
A Short Course on Geant4 Simulation Toolkit Introduction
Geant4 in HARP V.Ivanchenko For the HARP Collaboration
Particles and Processes
Software Installation, release 4.0
Kernel Author: Makoto Asai.
Introduction to physics and processes
Use of GEANT4 in CMS The OSCAR Project
Particles and Processes
Presentation transcript:

Geant4 concepts and functionalities Part III Geant4 concepts and functionalities

The Geant4 kit Code Documentation Examples ~1M lines of code, ~2000 classes (continuously growing) publicly available from the web Documentation 6 manuals Examples distributed with the code navigation between documentation and examples code

Basic concepts Run, Event Track, Step, Trajectory Process and Physics These lectures provide an overview of Geant4 basic concepts and functionality. Please refer to Geant4 User Documentation if you want to learn more, and contact your Geant4 Technical Board Representative, if you need further information. Geant4 home page http://wwwinfo.cern.ch/asd/geant4/geant4.html Run, Event Track, Step, Trajectory Process and Physics Sensitive detector and Hit

Run and Event Run Conceptually, a run is a collection of events which share the same detector condition The Run Manager can handle multiple events possibility to handle the pile-up Multiple runs in the same job with different geometries, materials etc. Event At the beginning of processing an event, primary particles are pushed into a stack When the stack becomes empty, the processing of an event is done Powerful stacking mechanism three levels by default: can handle trigger studies, loopers etc. It has following objects at the end of its processing: List of primary vertices and particles Trajectory collection (optional) Hit collections Digi collections (optional)

Interface to event generators Through an ASCII file for the generators that support /HEPEVT/ currently used event generators are mostly in Fortran no mixture with Fortran in Geant4 Interface to Pythia7 Abstract interface agreed between Geant4 and Pythia7 authors

Track, Step and Trajectory A track is a snapshot of a particle A step is a “” information to a track A step has two points and “” information of a particle (energy loss on the step, time-of-flight spent by the step, etc.) A track is deleted when it goes out of the world volume it disappears (e.g. decay) it goes down below cut-off the user decides to kill it A track is made out of three layers of classes G4Track Position, volume, track length, global ToF ID of mother track G4DynamicParticle Momentum, energy, local time, polarization Decay channel G4ParticleDefinition Mass, lifetime, charge, other physical quantities Decay table A Trajectory is a record of a track. It stores information of all steps done by the track

Tracking Decoupled from physics: all processes handled through the same abstract interface 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 The design choices allow to optimise the performance fully exploit the validity limits of physics processes The design allows to handle full and fast simulation Stepping algorithm based on Geant3 experience

Geometry Requirements to satisfy: detailed description of the experimental set-up efficient navigation performance exchange with CAD CAD exchange interface through ISO STEP (Standard for the Exchange of Product Model Data) Fundamental concepts pure geometrical shape (solid) non-positioned element (logical volume) positioned element (physical volume) single element (touchable, new concept)

Geometry representations 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)

New geometry features New algorithm to position a volume efficient memory usage New navigation methods hierarchy of volumes (Geant3) flat geometry (CAD) smart voxels (Geant4) very efficient search in the volume database Boolean operations between solids External tool for g3tog4 geometry conversion

Fields miss distance Step Chord real trajectory To propagate a particle inside a field (magnetic, electric, or mixture of them, etc.), we integrate the equation of motion of the particle in the field Several Runge-Kutta methods are available for the integration Once a method is chosen to calculate the track's motion in a field, the curved path is broken into linear chord segments The chords are used to interrogate the Navigator, whether the track has crossed a volume boundary One can set the accuracy of the volume intersection, by setting a parameter (the “miss distance”) One step can consist of more than one chord miss distance Step Chord real trajectory

DAVID New tool for geometry debugging DAVID allows to indentify intersecting volumes

Materials and particles Geant4 provides tools to describe any elements isotopes compounds chemical formulae Particles Particles descriptions are compliant with PDG The whole set of PDG data is contained in Geant4 and more, for specific Geant4 use, like ions

Processes 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 A process which requires the shortest interaction length limits the step

Cuts In Geant4 the user defines cut-offs by length (instead of energy, as it is usually done) A cut-off represents the accuracy of the stopping position It makes poor sense to use the energy cut-off: Range of 10 keV  in Si ~ a few cm Range of 10 keV electron in Si ~ a few m

Physics 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.”

The approach to physics Ample variety of independent, alternative physics models available in Geant4 No more black boxes of packages The users are directly exposed to the physics they use in their simulation This approach is fundamental for the validation of the experiments’ physics results

Physics: general features Abstract interface to physics processes tracking independent from processes Distinction between processes and models often multiple models for the same process Data encapsulation and polymorfism Transparent access to cross sections, from files, interpolation from tables, analytical formulae etc. Distinction between the calculation of cross sections and their use Calculation of the final state independent from tracking Uniform treatment of electromagnetic and hadronic physics Open system Users can easily create and use their own models

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

Electromagnetic physics Comparable to Geant3 and EGS already in the -release Substantial further extensions Multiple alternatives for various processes High energy extensions models for  up to PeV fundamental for LHC experiments, cosmic ray experiments etc. Low energy extensions e, down to 250 eV (EGS, ITS etc. to 1 keV, Geant3 to 10 keV)) low energy hadrons and ions models based on Ziegler and ICRU data and parameterisations models for antiprotons fundamental for space and medical applications, neutrino experiments, antimatter spectroscopy etc.

E.M. processes in Geant4 multiple scattering energy loss Bremsstrahlung ionisation annihilation photoelectric effect Compton scattering pair production synchrotron radiation transition radiation Cherenkov Rayleigh effect rifraction reflection absorption scintillation fluorescence Auger (in progress)

Hadronic physics Completely different approach w.r.t. the past transparent native no longer interface to external packages clear separation between data and their use in algorithms Cross section data sets transparent and interchangeable Final state calculation models by particle, energy, material

Completeness of Geant4 hadronic physics Ample variety of models the most complete hadronic simulation kit on the market alternative and complementary models it is possible to mix-and-match, with fine granularity data-driven, parameterised and theoretical models Consequences for the users no more confined to the black box of one package the user has control on the physics used in the simulation, which contributes to the validation of physics results

Hadronic physics Parameterised and data-driven models 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 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.

Hadronic physics Theoretical 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

Theoretical models Two String Models Traditional Cascade Model, Kinetic Model, Quantum Molecular Dynamics Model some are still in progress Precompound Model Evaporation, Fission, Fermi break-up, Multifragmentation, Photon Evaporation Possibility to interface to Pythia7 for hard scattering Lepton-hadron interactions nucleus interactions, photo-fission, -meson conversion ...and more: area under active development!

Event biasing Geant4 provides facilities for event biasing The effect consists in producing a small number of secondaries, which are artificially recognized as a huge number of particles by their statistical weights Event biasing can be used, for instance, for the transportation of slow neutrons or in the radioactive decay simulation

Components for space applications ESA participates in the Geant4 Collaboration Various simulation packages previously used by ESA (and its contractors), including Geant3 Comparative evaluation of the main existing simulation packages: Geant3, ESABASE, Shieldose, HETC, LHI, MORSE, MCNP, ITS, MICAP, CEPX-ONELD, EGS Specific requirements for space applications environment cosmic rays Van Allen belts fluxes of energetic particles (solar flares) simulation studies (mission critical!) for degradation of electronic components single event logic-flips in electronic equipment backgrounds risks for astronauts etc....

ESA projects in Geant4 Low energy extensions of electromagnetic physics Source Particle Module Radioactivity Decay Module Sector Shielding Analysis Tool CAD Tool Front-End

Detector response Hits Digis Hits are user-defined Examples of hits: position and time of the step momentum and energy of the track energy deposition of the step Each geometrical volume can be associated to a sensitive detector A sensitive detector creates hits using the information given in the Step object Hit objects are collected in an Event object at the end of that event Digis They describe detector response (e.g. ADC/TDC count, trigger signal) While Hits are generated at tracking time automatically, the digitization function must be explicitly invoked by the user’s code

Read-out geometry Read-out geometry is a virtual and artificial geometry, which can be defined in parallel to the real detector geometry A read-out geometry is associated to a sensitive detector

Visualisation and UI Visualisation User Interfaces Various drivers OpenGL, OpenInventor, X11, Postscript, DAWN, OPACS, VRML... Functionality for detector, trajectories, steps, hits etc. selections for, cut-views etc. User Interfaces Command-line, Tcl/Tk, Tcl/Java, batch+macros, OPACS, GAG, MOMO The Graphic Geometry Editor (GGE) automatic code generation for geometry and material description The Graphic Physics Editor same as above for physics processes

Communication The intercoms category is used by almost all other Geant4 categories for exchanging information without having pointers e.g. the user can apply the “abort event” command from the user stepping action without knowing the pointer to G4EventManager (G)UI also accepts commands dynamically G4UImanager receives the application of a command and passes it to a messenger The messenger brings the command to the target destination class object

Persistency The big HEP experiments require a large number of complex events to be stored Possibility to run either in transient or in persistent mode Persistency is handled through abstract interfaces to ODBMS Geant4 does not depend on any specific persistency model Open to any persistency model and to future evolutions The user can implement the concrete persistency model that he/she likes Persistency of Events, Geometry, Hits Trajectories...

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 for 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 electromagnetic 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

User actions Mandatory actions (abstract classes) Optional actions detector construction event generation Optional actions run, event, track, step, stacking actions process-list, particle-list actions Main Geant4 does not provide the main() In his/her main() the user must construct G4RunManager (or its derived class) perform mandatory actions G4VUserDetectorConstruction G4VUserPhysicsList G4VUserPrimaryGeneratorAction One can define VisManager, (G)UI session, optional user action classes and/or a persistency manager

The recipe: Describe your detector Derive your own concrete class from G4VUserDetectorConstruction. In the virtual method Construct() Construct all necessary materials Construct your detector geometry Construct your sensitive detector classes and set them to the detector volumes Optionally you can define visualization attributes of your detector elements

The recipe: Select physics processes Geant4 does not have any default particles or processes even for the particle transportation, you have to define it explicitly Derive your own concrete class from G4VUserPhysicsList and Define all necessary particles Define all necessary processes and assign them to proper particles Define cut-off range

The recipe: Generate primary event Derive your concrete class from G4VUserPrimaryGeneratorAction Pass a G4Event object to one or more primary generator concrete class objects Geant4 provides two generators G4ParticleGun G4HEPEvtInterface PYTHIA interface will be available when the C++ version of PYTHIA is ready

How Geant4 runs: initialization

How Geant4 runs Initialization “Beam-On” = “Run” Construction of materials and geometry Construction of particles, physics processes and calculation of physics tables “Beam-On” = “Run” Close geometry  Optimize geometry Event Loop

How Geant4 runs: event loop

How Geant4 runs: event processing

Required hardware and software Platforms AIX, HP, DEC, Sun, (SGI): native compilers, , g++ Linux: g++ Windows-NT: Visual C++ Commercial software ObjectStore STL (on platforms not yet supporting the Standard) Free software native STL (not supported yet by all platforms) CVS gmake, g++ CLHEP Graphics OpenGL, X11, OpenInventor, DAWN, VRML... OPACS, GAG, MOMO... Persistency it is possible to run in transient mode in persistent mode use a HepDB interface, ODMG standard

Examples: novice level ExampleN01 Demonstrates how Geant4 kernel works ExampleN02 Simplified tracker geometry with magnetic field Electromagnetic processes ExampleN03 Simplified calorimeter geometry Various materials ExampleN04 Simplified collider detector with readout geometry EM + Hadronic processes Pythia interface Event filtering by stack ExampleN05 Simplified BaBar-like calorimeter Shower parameterization ExampleN06 Optical photon processes

Examples: extended level ExampleE01 CLHEP histogramming ExampleE02 Persistency by Objectivity/DB (CERN RD45) STEP geometry interface Advanced level examples To be prepared Expect users’ contributions

Documentation http://wwwinfo.cern.ch/asd/geant4/geant4.html User Documentation Introduction to Geant4 Installation Guide Geant4 User’s Guide - For Application Developers for those wishing to use Geant4 Geant4 User’s Guide - For Toolkit Developers for those wishing to extend Geant4 functionality Software Reference Manual documentation of the public interface of all Geant4 classes Physics Reference Manual extended documentation on Geant4 physics 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://wwwinfo.cern.ch/asd/geant4/reports/gallery/ Publication and Results web page http://wwwinfo.cern.ch/asd/geant4/reports/reports.html