geant4 new features joseph perl (slac/sccs) g4namu meeting @ aapm minneapolis 22 july 2007
Post on 22-Dec-2015
221 views
TRANSCRIPT
Geant4 New Features
Joseph Perl (SLAC/SCCS)G4NAMU meeting @ AAPM Minneapolis22 July 2007
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 2
Contents
• Why 8.3 right before 9.0?
• What was new in release 8.3 and 9.0
• Current best practices for medical physics applications
• Highlights form recent Geant4 External Review
• Features to come in the next year
• Extra slides:
– What was new in releases 8.0, 8.1, 8.2
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 3
Why 8.3 right before 9.0• Geant4 would not normally have two releases so close to one another
– 8.3 was released 4 May 20007,
– 9.0 was release 29 June 2007
• Release 8.3 was a special case, driven by the need to fix one specific issue
– the Hadronic shower shape
– in time for the LHC experiments.
• These experiments did not want to have an other significant changes from the code they had already extensively tested, release 8.2.
– Because they are a major provider of Geant4 funding,they get what they want.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 4
New in Release 8.3 • Revised Hadronic modeling, resulting in longer shower shapes:
– the FTF model now has improved treatment of diffraction.
– As a result the longitudinal shower component now starts later and ends later, which goes in the direction of the data.
– The addition of quasi-elastic scattering (G4QuasiElasticChannel) to the QGS model is also expected to improve shower shapes by reducing the deep inelastic component.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 5
New in Release 9.0 of interest to Medical Physics
• Kernel / Geometry
– Parallel navigation, first implementation
– Revision of biasing/scoring processes
– Example RE02, Nested Parameterization
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 6
Parallel navigation
• In previous versions, we had several somewhat ad-hoc ways of overlaying a parallel world:
– Ghost volume for shower parameterization assigned to
G4GlobalFastSimulationManager
– Readout geometry assigned to G4VSensitiveDetector
– Importance field geometry for geometry importance biasing assigned to importance
biasing process
– Scoring geometry assigned to scoring process
• Release 9.0 merges all of these into a common parallel world scheme:
– Readout geometry for sensitive detector will be kept for backward compatibility.
– Other current “parallel world schemes” become obsolete.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 7
Parallel navigation
• Occasionally, it is not straightforward to define sensitivity, importance or envelope to be
assigned to volumes in the mass geometry.
– Typically a geometry built machinery by CAD, GDML, DICOM, etc. has this difficulty.
• New parallel navigation functionality allows the user to define more than one world
simultaneously.
– New G4Transportation process sees all worlds simultaneously.
– A step is limited not only by the boundary of the mass geometry but also by the
boundaries of parallel geometries.
– Materials, production thresholds and EM field are used only from the mass geometry.
– In a parallel world, the user can define volumes in arbitrary manner with sensitivity,
regions with shower parameterization, and/or importance field for biasing.
• Volumes in different worlds may overlap.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 8
New exampleN07• Mass geometry
– sandwich of rectangular absorbers and scintillators
• Parallel scoring geometry– Cylindrical layers
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 9
Current Best Practices for simulating DICOM-like 3D voxels with material parameterization
• These are the suggestions from Makoto Asai:– There is no silver bullet. You can try some/all of these options combined.
• Huge number of cells– If 3D parameterized volume with material parameterization is used,
• Huge memory size in case of 3D optimization– Instead use the new Nested Parameterization
– Example in geant4/examples/RunAndEvent/RE02• Capability has been in Geant4 since release 8.1.• Example was added at Release 8.2.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 10
• Material map– Though number of materials may be small, each voxel must at least have a pointer to a material,
hence huge map of these pointers.– Split voxel geometry into reasonable number of regions,
assign a dedicated stack to each region. For example 5*5*5 = 125 regions.– Load material map (from file on disk) only for one region.
If a track reaches to the boundary of the region you are currently simulating, suspend the track.– Simulate all the tracks in one region. Once a region becomes empty, load material map for anoth
er region and simulate all tracks in that region.– Note that some tracks may come back to a region you have already simulated.
• Event biasing– In particular, geometrical importance biasing and secondary particle splitting.– You must validate results of your biasing options with full simulation.
• Shower parameterization– Instead of having a full EM shower, you may want to consider the shower parameterization in par
ticular for the core part of the shower.
• Dedicated navigator– For a regular geometry, consider implementing a dedicated navigator that is specialized for regul
ar pattern of voxels.– Geant4 will eventually provide such a navigator option ready-made (comments in a moment)
• Parallelization– Allocate good number of CPUs…
More hints for large numbers of voxels
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 11
General Hints for Speeding Up Geant4
• We are trying to improve the speed of Geant4– But, since it is a general-purpose toolkit for which we give the user great control,
it is possible for the user to make the simulation unnecessarily slow.• For general applications
– Check methods which are invoked frequently:• UserSteppingAction()
• ProcessHits()
• ComputeTransformation()
• GetField()
• etc.
– In such methods:• avoid string manipulation,
• file access
• cout
• unnecessary object instantiation or deletion
• unnecessary massive polynomial calculations such as sin(), cos(), log(), exp().
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 12
General Hints for Speeding Up Geant4
• For relatively complex geometry or high energy applications– Kill unnecessary secondary particles as soon as possible– Utilize G4Region for regional cut-offs, user limits– For geometry, consider replica rather than parameterized volume as much as possibl
e. Also consider nested parameterization.– Do not keep too many trajectories.
• For relatively simple geometry or low energy applications– Do not store the random number engine status for each event.
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 13
External Review
An external review of Geant4 was held at CERN this Spring
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 14
External Review - Executive Summary
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 15
What New Features can you Expect in Next Year(of interest to Medical Physics Users)
• Interactive commands to set up scorers
– Beta by end of this year
– Will be done by the run/event group
• Penelope Physics
– Makoto is now starting work on an interface from Geant4 to the Penelope Fortran code so that Geant4 users can access Penelope physics straight from the Penelope release
– Will be distributed from the Penelope web site
• Dedicated navigator for voxel geometry
– Paganetti pioneered this a long time ago
– Geant4 has been promising to offer this as a built-in part of the code
– We are very aware that the wait for this has been too long
• Speed improvements
– Fermilab group has recently joined the Geant4 collaboration
– Specific part of their scope-of-work is to speed up the code
• software engineers, rather than physicists, taking a look at the code
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 16
Extra Slides
What was new in releases 8.0, 8.1, 8.2
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 17
Geant4 8.0 - general picture1. New capabilities
– EM (‘standard’) : new MSC model implementation
– New design for particle definitions, no longer ‘static’
– Concrete scoring and filter classes
– Geometry overlap check at construction
2. Improvements and fixes
– to existing hadronic physics modeling & models
– in physics process implementations
3. Migrations, updates
– Support for CLHEP 2.0.X series
– Keeping compatibility with 1.9.X series
– Usage of <sstream> replacing obsolete <strstream>
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 18
Geant4 8.1 - general picture1. Adoption of a new Geant4 Software License
2. New capabilities
– Updated particle definitions to match PDG-2005
– New ‘material scanner’ utility
– New ‘tessellated’ solids for interface with CAD systems
– ß-release of very low-energy processes in water
3. Numerous improvements in EM “standard” physics
– Simulation of back-scattering improved
– Tail of angular distribution now material dependent
– Visible energy in sampling calorimeters less sensitive to production threshold
4. Fixes in hadronic physics and reviewed physics-lists
1. New combined elastic-scattering models
2. Extended use of Binary and Bertini cascade models
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 19
EM Physics• New stepping algorithm for multiple-
scattering process (since 8.0)
– To improve behavior of low energy
particles
– Significantly reduced cut
dependency
– More precise visible energy in
sampling calorimeters
– Limits step size for particles
– Extra CPU cost when using same
value of production thresholds
– Mechanism provided to deactivate
step limitation
• Refinements to multiple scattering process (version 8.1)
– Improved back-scattering
– Improved scattering on very thin layers
– Tail of angular distribution now material dependent
– Even less sensitive to production thresholds in sampling calorimeters
• Reintroduced option to create secondaries below the cut near geometrical boundaries (sub-cutoff)
• Improved simulation of ionization for ions
– Data from NIST databases used
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 20
Physics … more
• Synchrotron radiation (version 8.1)
• New process version released: new methods for angular distributions; enha
nced to work with local fields and set polarization
• Transition radiation (version 8.1)
• New algorithm for XTR angular distribution
• Multiple scattering does not use table
– Needed to ensure repeatability
• Refined PAI (Photon-Absorption-Ionisation) model
• Low energy EM (version 8.1)
• New models for photoelectric angular distribution
• ß-release of low energy processes in water down to eV scale (Geant4-DN
A)
22 July 2007 Geant4 New Features - Joseph Perl (SLAC/SCCS) 21
More …• Data sets
– New data set for high precision neutron processes G4NDL 3.9 (release 8.1)
– New data set for low-energy EM processes G4EMLOW 4.0 (release 8.1)
• Examples
– New extended examples:
• TestEm0 - uses G4EmCalculator to print x-sections and stopping power
• TestEm16 - simulation of synchrotron radiation
• Hadr01 - simulation of proton/ion beam interaction in water
• Parameterization/gflash - usage of gflash for shower parameterization
• Persistency/P01 - object persistency through Reflex
– New advanced examples:
• Microbeam - cellular irradiation beam line at CENBG facility, France
• Raredecay_calorimetry - photonuclear reactions for photon inefficiency
• Radiation_monitor - LHC radiation monitoring detectors
– Many improvements and fixes …