Presentation is loading. Please wait.

Presentation is loading. Please wait.

Geant4 concepts and functionalities

Similar presentations


Presentation on theme: "Geant4 concepts and functionalities"— Presentation transcript:

1 Geant4 concepts and functionalities
Part III Geant4 concepts and functionalities

2 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

3 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 Run, Event Track, Step, Trajectory Process and Physics Sensitive detector and Hit

4 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)

5 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

6 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

7 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

8 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)

9 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)

10 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

11 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

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

13 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

14 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

15 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

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

17 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

18 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

19 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

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

21 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)

22 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

23 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

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

25 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

26 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!

27 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

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

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

30 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

31 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

32 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

33 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

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

35 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

36 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

37 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

38 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

39 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

40 How Geant4 runs: initialization

41 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

42 How Geant4 runs: event loop

43 How Geant4 runs: event processing

44 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

45 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

46 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

47 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 Publication and Results web page


Download ppt "Geant4 concepts and functionalities"

Similar presentations


Ads by Google