Moving from Geant4 v6.2.2 to v8.0
Useful links
- Geant4 v8 release notes
- Geant4 v8 download page
CLHEP
- G4 v8 uses CLHEP 1.9.2.2 (or higher?)
- CLHEP 1.9 Release Notes
- CLHEP 1.9 download page
- Note: Starting with this version CLHEP has gone to namespaces and is providing a separate library for each subsection of code. However, in this version they have overridden the namespaces (with using statements) and still provide a single CLHEP librrary. It appears (so far - fingers crossed) that we are ok just downloading and using.
- The using statements is provided for the most used CLHEP classes by G4, we are using other classes that are not included.. as far as I have understood so far ..
New features (relevant to GLAST)
- "Non static" particle definition: this will require some changes in the PhysicsList and RunManager
- Improvements to the Multiple Scattering:
Multiple Scattering electromagnetic process
In the electromagnetic standard package major changes have been introduced concerning the Multiple Scattering process. To improve the behaviour of low energy particles (electrons in particular, but affecting also hadrons), the Multiple Scattering now limits the step size for the particles. This restriction is undertaken using several criteria, and is applied systematically, in all volumes and materials. In addition a model of the correlation between lateral displacement and final direction has been implemented (see the Physics Reference Manual for further information).
As a result, most physical observables become more stable when varying production cuts (i.e. less "cut dependent"). There is a corresponding cost, a CPU-time penalty, when utilising the same value of the production thresholds. This penalty can be significant, depending on the user's setup and the cut values. For many use cases the increased stability will allow the choice of higher production thresholds, recovering computing performance while maintaining physics performance.
To enable the user to investigate its benefits, a mechanism is provided to deactivate this step limitation. The new method MscStepLimitation(bool) of G4MultipleScattering disables these new step limitations. In addition, in order to help the transition, the old version is available for this release 'frozen' in the class G4MultipleScattering71. Several examples (in extended/electromagnetic) provide sample physics lists which use this older version.
Windows build issues
- No issues encountered with building Geant4 (at least not yet!)
- Download of CLHEP 1.9.2.2 easy but...
- CLHEP uses namespaces, can get backward compatibility by defining ENABLE_BACKWARDS_COMPATIBILITY in the compiler
- The uses of namespaces causes some problems for the forward declarations that appear in some of our classes
- They have also templated some classes
- CLHEP uses namespaces, can get backward compatibility by defining ENABLE_BACKWARDS_COMPATIBILITY in the compiler
Linux build issues
- Same problems due to the fact of the new "templated" classes and multiple definition of same physical constants in various packages..
- I've written few slides on the tests I'm doing. G4_8.0_update.pdf
1 Comment
Tracy Usher
Thursday morning update: I've taken the path of updating GLAST code to use the CLHEP namespace. This started with the "how hard can this be" and now I know! CLHEP is used extensively in GLAST... am currently at the point where G4Generator builds which at least shows that there are no major interface changes in G4 v8.0. Still need to test. And to push through the rest of GLAST code to upgrade to new CLHEP.