# Geant4 8.3 Release Notes

Geant4 8.3 Release Notes

May 4th, 2007

The code and binary libraries for the supported systems are available through our Source Code Web page.

Please refer to the Geant4 User Documentation for further information about using Geant4.

## Contents

1. Supported and Tested Platforms
2. CLHEP and AIDA
3. Items for migration of the user code
4. Expected effects on physics and performance
5. Known Run-Time Problems
6. Compilation Warnings
7. Known Run-Time Warnings
8. Geant4 Software License
9. Detailed list of changes and fixes

## 1. Supported and Tested Platforms

Official platforms:

- SUN Solaris 5.8, C++ CC-5.5.
- Linux, gcc 3.2.3 or gcc 3.4.5.
  This configuration was tested on 32 bits architectures (Intel) and 64 bits architectures (AMD) with the Scientific Linux CERN 3 (SLC3) distribution (based on RedHat Linux Enterprise 3) and Scientific Linux CERN 4 (SLC4) distribution (based on RedHat Linux Enterprise 4). Versions of Geant4 have also been compiled successfully on other Linux distributions, like Debian, Suse or other RedHat systems.
- Windows/XP and CygWin Tools with: Visual C++ 7.1 .NET

More verified configurations:

- SUN Solaris 5.8, C++ CC-5.4 Patch 111715-02
- Linux, gcc-4.1.2
- Linux, Intel-icc 9.1
- MacOS 10.4, gcc-4.0.1
- Windows/XP and CygWin Tools with: Visual C++ 8.0 (Visual Studio 2005)

Platforms configured but not tested and not supported:

- AIX 4.3.2, xlC 6.0
- DEC V4.0, cxx C++ V6.1-027
- HP 10.20, aCC C++ B3910B A.01.23
- SGI V6.5.5, CC 7.2.1

## 2. CLHEP and AIDA

Geant4 8.3 requires the installation of CLHEP.
Tests have been performed with CLHEP-2.0.3.1
The software has been verified also with CLHEP-1.9.3.1.

Geant4 8.3 examples with histogramming cowork with analysis tools compliant to AIDA 3.2.1 interfaces.
AIDA headers can be downloaded from: http://aida.freehep.org

## 3. Items for migration of the user code

No particular migrations are required in order to upgrade from release 8.2 to release 8.3. Note that a full re-installation of libraries (or a full recompilation) and a recompilation of user applications is anyhow required.

## 4. Expected effects on physics and performance

Standard Electromagnetic physics

- No visible effects in CPU performance.
- Calorimeter response: stable within 1% for visible energy and resolution.
- Energy deposition in thin layers: stable for step size down to `1 um`.

Hadronic physics

- 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.
- New cross section data sets added:
  Barashenkov parameterised cross sections are now available for elastic and inelastic nucleon-nucleus and elastic and inelastic pion-nucleus scattering.
- Cross sections for user-defined elements:
  cross sections are now calculated based on user-defined isotope abundances, if they are provided. Natural abundances are used otherwise.
- Improved muon capture model:
  `G4QCaptureAtRest` model provides more accurate final state electron spectrum for muon capture and more accurate secondary hadron sprectra for hadron capture.
- Error reporting:
  when a segmentation fault occurs in a hadronic process, the information about the process and model name where the fault has occurred will be printed out.

Physics Lists

- FTFP and FTFC use a significantly revised FTF model. Comparisons to thin target experiment at ~10 `GeV` show much better agreement with data; the model is still under validation at higher energies. Prelimirary tests display slightly longer showers than the previous version of FTFP/FTFC.
- QGS type physics lists (QGSP, QGSC, QGSP_BERT, etc) now include a simple quasi-elastic model for a small fraction of high energy inelastic interactions. The cross-section parameterisations for inelastic interactions include the quasi-elastic cross-section, while QGS only models deep inelastic interactions.
  - For comparison or backward compatibility, the new QGSP_NQE, QGSP_EMV_NEQ, and QGSP_BERT_NQE ignore this new quasi-elastic, and are therefore the equivalent of QGSP, QGSP_EMV, and QGSP_BERT available in release 8.2 and before.
  - Also, the obsolete QGSP_LEAD/QGSP_LEAD_HP do not include quasi-elastic.
- QGSC physics list and its variants use CHIPS `G4QCaptureAtRest` to model capture of muons at rest instead of `G4MuonMinusCaptureAtRest`. This model better reproduces the spectrum of secondaries close to the kinematic limit.
- The new physics list QGSP_BERT_TRV is a variant of QGSP_BERT where Bertini cascade model is used only up to energies of 5.4 `GeV` for protons, neutrons, pions and kaons. For comparisons QGSP_BERT uses Bertini cascade model up to 9.9 `GeV`.
- HElastic model for projectile energy above 1 `GeV` is used for all targets with `Z>1`.
- In all lists for electro-magnetic physics, the "skin" for multiple-scattering on boundaries is set to zero, meaning that no computation of the linear distance to the geometrical boundaries is made by the multiple-scattering model.
- In the QBBC physics lists, the Binary Cascade is used up to 4 `GeV`, the FTFP model between to 3.5 to 12 `GeV`, and QGSP above 11.5 `GeV`.

## 5. Known Run-Time Problems and Limitations

For a complete list of outstanding run-time problems and to submit any problem you may find running this version of Geant4, please refer to the Geant4 Problem Reporting System.

## 6. Compilation Warnings

There may be compilation warnings on some platforms. We do not believe that any will lead to incorrect run-time behaviour.

## 7. Known Run-Time Warnings

The following message can be written to error output while tracking. We believe it does not give rise to incorrect behaviour.

        G4PropagateInField: Warning: Particle is looping
        -  tracking in field will be stopped.
           It has performed 1000 steps in Field while a maximum of 1000
           are allowed.

## 8. Geant4 Software License

A Software License applies to the Geant4 code. The details and the list of copyright holders is available at http://cern.ch/geant4/license and also in a text file `LICENSE` distributed with the source code.

## 9. Detailed list of changes and fixes

These are the main new features/fixes included in this release since the last patched public release (for the detailed list of fixes/additions, please refer to the related History files provided in most packages):

### Configuration

- Protected generation of dependencies using internal `make` variable `MAKECMDGOALS` in `binmake.gmk` and `common.gmk`, following suggestion made in problem report #930. This protection resolves the problem of generation of dependencies when issueing the `clean` target.

### Digitization & Hits

- Fixed way of counting outward steps in flux scorers.

### Electromagnetic Processes (High-energy and Standard)

- Muons
  - `G4MuPairProductionModel`: added protection against zero or negative partial cross section inside `SelectRandomAtom()` method. Fixes problem reported when runnning tutorial example A01.
  - Set `linLossLimit` to `1.E-6` in `G4EnergyLossForExtrapolator`.
- Polarisation
  - `G4PolarizedGammaConversionModel`: fixed non-initialised variable.
- Standard
  - `G4UrbanMscModel`:
    - Fix in the single scattering code for heavy particles, now the code can be used with skin=1 e+/e- and for heavy particles as well.
    - Added protections against NaN values in two places: sampling of `theta` when `tau=0` in lateral displacement, and in method `ComputeTrueStepLength()` for the case of zero true length.
    - Stepping algorithm changed for `skin=0`, now there are 3 stepping modes:
      1. Stepping similar to that performed in release 7.1;
      2. `skin=0` - designed for high energy simulations with or without magnetic field;
      3. `skin=1` - designed for 'precision' simulations without magnetic field.
    - If `skin>1`, perform small steps with single scattering before and after boundary the boundary. The step is reduced before boundary for `geomlimit` less than `geombig` only.
    - Use `tPathLength` inside `ComputeStep()` instead of `geombig`.
  - `G4MultipleScattering, G4hMultipleScattering`:
    - Use `skin` parameter from the base class (default `skin=0`).
  - `G4eBremsstrahlungModel`:
    - Added reinitialisation of LPM flag between runs.
    - Corrected `LPMconstant` by factor 2 (according to SLAC recent publication).
  - `G4BetheHeitlerModel`: for any initial energy select atom of the material on which conversion occur (needed for polarisation module).
  - `G4UniversalFluctuation`: `GLANDZ` part of the fluctuation model has been completely rewritten, there is no longer distinct loss regime.
  - `G4hIonisation`: removed dependence on K+ and K- particles.
- Utils
  - `G4VEnergyLossProcess`:
    - Use `G4SafetyHelper` instead of `G4Navigator` for determining distance to boundary, and added protection agains zero step length.
  - `G4VMultipleScattering`:
    - Added protection against zero step or energy.
    - Added `SetSkin()` and `Skin()` methods.
  - `G4EmModelManager`: added `maxCutInRange` variable for sub-cutoff option.
  - `G4EmCalculator`: added method `ComputeEnergyCutFromRangeCut()`.
  - `G4EnergyLossMessenger`: send message `/run/physicsModified` after all commands requiring reinitialisation.
  - `G4LossTableManager, G4EmProcessOptions, G4EnergyLossMessenger`: added commands for `MscLateralDisplacement`, `MscSkin` and `linearLossLimit`.
  - `G4LossTableBuilder`: use more precise algorithm to build inverse range table using `G4LPhysicsFreeVector`.
  - `G4EmCorrections`: taking mass of ion from `G4IonTable` to avoid division by zero.

### Event

- Prevent from unnecessary creation of `G4String` objects in `G4Event`, which were default for random number status. Use new flag in `G4EventManager`.

### General Processes: Cuts, Scoring

- Cuts
  - Added method `ConvertRangeToEnergy()` to `G4ProductionCutsTable`.
- Scoring
  - Fix to set step status for ghost pre-step point.

### Geometry

- Magnetic field
  - Corrected integration constants in `G4MagHelicalStepper`.
  - Added implementation of `G4RKG3_Stepper`, stepper derived from Geant3.
  - `G4MagIntegratorDriver`: added protections against zero initial or internal step `h=0`; revised (re)calculation of `h`, and protect more against very small steps.
- Management
  - Added accessors to stores for retrivial of volumes/solid by name.
  - Modified signature of `G4VPhysicalVolume::CheckOverlaps()` to introduce ability of handling tolerances for overlaps.
  - Do not reset `RegionRootFlag` in `RemoveRootLogicalVolume()` if volume is the world, since the volume itself may be already removed from the store if `G4LogicalVolumeStore::Clean()` is called.
- Navigation
  - In G4Navigator, forcing call to `CheckOverlaps()` on the current volume before event abortion for cases of stuck tracks.
  - `G4PropagatorInField`: implemented `ClearPropagatorState()` to clear track-dependent state (safety, zero-steps, loop flag. etc...). Call to this method becomes mandatory in `G4Transportation` for each new track to overcome side effects of safety inconsistency in presence of geometry overlaps.
  - Fixed case of out of range access in `G4GeomTestSegment` responsible for crashes observed when recursive-grid test for overlaps was run. Addressing problem report #784.
- Solids (Specific)
  - Introduced new shape `G4ExtrudedSolid`, a solid representing the extrusion of an arbitrary polygon with fixed outline and multiple Z sections.
  - G4TessellatedSolid:
    - Made relevant solid's methods virtual, to be used as base class.
    - Added implementation for `GetSurfaceArea()` and `GetPointOnSurface()` methods.
    - Added protection in `SurfaceNormal()` method in case of facet not found.
    - Check and return `kOutside` in `Inside()` if point out of solid's extent.
    - Bug fix in `G4TriangularFacet::Intersect()` to allow for correct update of `Distance` in condition. Cleared unecessary declaration of `IsInside()` methods in both `G4TriangularFacet` and `G4QuadrangularFacet`.
    - Fix in `G4PolyconeSide::DistanceAway()` for correct estimation of distance for the case of `Phi` sections. Addresses problem report #598.
    - Fix in `GetPointOnSurface()` for `G4Polycone` to consider also points laying on rings when consecutive `Z`-sections are coincident. Added method `GetPointOnRing()`.
- Volumes
  - Extensions to the `CheckOverlaps()` algorithm:
    - Added possibility to define a tolerance for reporting overlaps; added new argument to signature, by default tolerance is set to zero.
    - Optimised implementation for detecting daughter volumes which are totally overlapping and checked in sequence.
    - Added check on current volume to optimise and correctly handle the case of explicit call of the method when geometry is constructed.
    - Made warning message more clear.

### Global

- Added `G4TwoVector` type, typef of CLHEP's `Hep2Vector` class.
- Changed date for release 8.3.

### Graphical Representations

- `G4VisAttributes`:
  - Bug fix in `SetForceLineSegmentsPerCircle()`; now correctly implementing the reset.
  - Minor refinement: introduced `IsForceLineSegmentsPerCircle()` method.
- `G4Colour`: replaced static data members by static functions that create and copy out the relevant colours.

### Hadronic Processes

- Added model name for hadronic whiteboard error reporting.
- Cross sections
  - Extend user-chosen isotope abundance capability to several classes: `G4UPiNuclearCrossSection`, `G4UInelasticCrossSection`, `G4UElasticCrossSection`, `G4GlauberGribovCrossSection`, `G4NucleonNuclearCrossSection`.
  - `G4PiNuclearCrossSection`: removed special treatment ('tuning') for Copper (Z=29),i.e. the `Cu` cross section is no longer lowered by 4%.
  - New classes added:
    - `G4BGGNucleonElasticXS`: provided proton and neutron elastic and cross section class (`G4BGGNucleonElasticXS`) which uses the Barashenkov parameterization below 100 GeV and Glauber-Gribov model above.
    - also provided proton and neutron inelastic cross sections (`G4BGGNucleonInelasticXS`), pion elastic cross sections (`G4BGGPionElasticXS`), and pion inelastic cross sections (`G4BGGPionInelasticXS`) which combine the Barashenkov parameterization below 100 GeV and Glauber-Gribov model above.
    - `G4NucleonNuclearCrossSection` which contains Barashenkov cross sections for nucleon-nucleus scattering
  - Added protection against division by zero in method `G4CrossSectionDataStore::SelectRandomIsotope()`.
  - Added handling of user-defined isotope abundances for elements and proper cross section and abundance weighted choice of isotopes in reactions. New virtual methods for `IsApplicable()` and `GetCrossSections()` added to classes `G4VCrossSectionDataSet` and `G4CrossSectionDataStore`.
  - `G4HadronCrossSections::GetParticleCode()`: following report from CMS, replaced code which tested by particle name with more performant code that tests by PDG ID. Also, use switch-case instead of else-if.
- Management
  - `G4HadronicProcess`:
    - Removed unused `AlwaysKillLeadingHadron()` method.
    - Fixed bug which was killing primaries in elastic scattering.
    - Fix weighting error in leading particle killer.
    - Added handling of user-defined isotopes: re-implemented methods `GetMeanFreePath()` and `ChooseAandZ()` to use new methods in `G4CrossSectionDataStore`.
    - No longer use dispatch pointer to call data store methods.
    - Remove data members `currentZ`, `currentN` and methods `GetCurrentZ()`, `GetCurrentN()`. They are no longer needed.
- Binary Cascade
  - Added protection against integrating zero `timeStep` in `G4RKPropagation`. This used to cause in some cases division by zero in integration.
- Cascade
  - Added protection in `G4ElementaryParticleCollider` against negative value to `sqrt()`.
- Chiral Invariant Phase Space (CHIPS)
  - Fix for NaN, protected coulomb barrier against divide by zero, now defaults to zero. Fix for NaN in `G4QNucleus` when using `pow()` and in `G4QEnvironment`.
  - Completed implementation of G4QuasiFreeRatios which enables quasi-elastic scattering.
  - To avoid early particle definition the CHIPS world is now created at run time in the processes `G4QElastic`, `G4QCollision`, and `G4QCaptureAtRest`.
  - `G4QElastic`:
    - Fix for mis-use of units.
    - Treat particles with `E=0` as alive for tracking purposes.
  - CHIPS model for muon capture now available. It is handled by `G4QCaptureAtRest`.
  - Bug fix for muon-nuclear interactions.
  - Bug fix for binomial distribution with `p=1,q=0` in `G4QNucleus`.
- Elastic scattering
  - Speed up coherent hadron-nucleus scattering (`G4ElasticHadrNucleusHE`) by using iterator search on bin instead of computing `log()`.
  - `G4HadronElastic`:
    - Use the most probable isotope for given Z to call the high energy part of the model (CPU/memory more efficient).
    - HElastic model for projectile energy above 1 `GeV` is used for all targets with `Z>1`.
  - `G4UHadronElasticProcess`: fixed bug in number of neutrons in CHIPS interface.
  - `G4HadronElastic`, `G4ChargeExchange`: more accurately compute Z and A.
  - `G4UHadronElasticProcess` and `G4ChargeExchangeProcess`:
    - Fixed bug of undefined isotope vector
    - Migrated to interface for isotope-dependent cross sections; do not use QElastic total cross sections in `G4ChargeExchangeProcess`.
- High Energy
  - Added `G4QuasiElasticChannel` to simulate quasi-elastic scattering. Relies on CHIPS class `G4QuasiFreeRatios`.
  - Modified `G4TheoFSGenerator` to use `G4QuasiElasticChannel` and add quasi-elastic scattering for string models, and use these in competition to the string model.
- Low Energy
  - `G4LEAntiProtonInelastic`: for low energy (< 0.1 MeV) anti-protons, the model was simply returning the particle change which had not yet been initialized, thus leading to an infinite loop. Now model returns particle change initialized from the original kinematics. Addresses problem report #888.
  - All Low Energy models: added model name to constructor for use in traceback and debugging.
  - `G4LElastic`: added protection against `sqrt()` of negative value.
- Parton String
  - Several modifications made to `G4VLongitudinalStringFragmentation` for use in FTF model. This was taken from the original QGS code.
  - Revised FTF model now available. Single diffraction was added and hadronization was improved. Management and qgsm modules also affected.
  - `G4ExcitedStringDecay::EnergyAndMomentumCorrector()`, no longer causes exception when not converging. Added more info when failing and return correct status. Added protection in `G4ExcitedStringDecay` against division by 0.
- Pre-Compound
  - Added protection against division by zero in `G4PreCompoundTransitions`.
- Utils
  - `G4HadronicWhiteboard`: added methods to set process and model names.
  - `G4ReactionDynamics`: added pi0 to anti-particle test.

### Particles

- Added protection against negative argument to `sqrt()` in `G4DecayProducts::Boost()`.

### Physics lists

- Added quasi-elastic in QGSP physics list; this required changes to:
  - QGSP{proton,Neutron,PiK} Builder, adding `QuasiElasticChannel` on conditional flag.
  - `HadronPhysicsQGSP` passes flag (default=`false`) to Builders.
  - QGSP uses flag to include quasi-elastic.
- New list QGSP_NQSE, a copy of QGSP without quasi-elastic.
- For QGSC, QGSC_EMV, and QGSC_EFLOW enable use of `G4QCaptureAtRest()` also for muons. Changes made in `G4QStoppingPhysics` as well.
- Modifications for Quasi-elastic. Added to all QGS physics lists execpt the two obsolete QGSC_LEAD/QGSC_LEAD_HP. This also required adapting of `HadronsPhysicsXYZ` and {QGSP;QGSC;QGSC_EFLOW}{Neutron,Proton,PiK} Builders.
- Removed unnecessary `HadronPhysics...{EMV,EMX}` classes.
- Adopting recent upgrades in QGS and FTF for the QBBC physics list.
- Set `skin` to zero in `G4EmStandardPhysics7` (i.e. no use of `ComputeStep()` in multiple-scattering).
- `G4HadronHElasticPhysics` uses new cross section classes `G4BGGNucleonElasticXS` and `G4BGGPionElasticXS`.
- `G4HadronElasticPhysics`: set limits on low energy and QElastic to zero.
- Fixed special cuts for LBE physics list.
- Added set min/max Energy and Inelastic Energy to NeutronHP builder.
- `G4EmStandardPhysics`:
  - Use `G4hMultipleScattering` for muons and removed extra printouts.
  - Use default multiple-scattering setup in `G4EmStandardPhysics72`.
  - Use `skin=0` (no use of `ComputeStep()` in multiple-scattering) in `G4EmStandardPhysics` and `G4EmStandardPhysics71`.
- Added new physics list QGSP_BERT_TRV, based on QGSP_BERT, but changing to Bertini Cascade occurs at 5.0-5.4 `GeV` for proton, neutron, pion and kaon.
- Increased version number to 5.2.

### Run

- Prevent from unnecessary creation of `G4String` objects in `G4Event`, which were default for random number status.
- Added new `G4RunManager` flag and corresponding UI command.

### Visualization

- Management
  - Added command `/vis/abortReviewKeptEvents` and improved guidance of command `/vis/reviewKeptEvents`.
  - Introduced command `/vis/geometry/set/forceLineSegmentsPerCircle`.
  - Fixed bug concerning call to `/vis/open` in `/vis/reviewKeptEvents` loop.
  - `G4VSceneHandler`:
    - Introduced utility `LoadAtts()` for `G4AttValues` and `G4AttDefs`.
    - Improved other utilities (changed signature of `GetLineWidth()`).
  - Reduced WARNING noise and other minor improvements.
- Modeling
  - Bug fix: corrected treatment of `ForcedLineSegmentsPerCircle` when clipping.
- OpenGL
  - Implemented bitmap markers (for `MarkerSizeType == screen`).
  - Bug fix: added missing break in X colormap lookup routine.
  - Adapted to change of signature of `GetLineWidth()`.
  - Fixed Windows problem with `DBL_MAX` and compilation warnings.
  - `G4OpenGLXViewer`: Small bug fix in `print()`; context was switched but not switched back.
- OpenInventor
  - Moved `LoadAtts()` to vis management module.
- RayTracer
  - Bug fix: use of window size hints.
- ASCIITree
  - Bug fix: format of total mass.

### Examples

- Updated reference outputs.
- extended
  - electromagnetic/TestEm2
    - Uncommented hadron ionisation in Livermore builder.
  - electromagnetic/TestEm3
    - Fixed compilation problem on SUN.
    - Added command `/testem/run/limitEdep` allowing to compute restricted mean values to supress big statistical fluctuations.
    - Updated command `/testem/run/acceptance`.
    - Parameter `skin=1` is set as default PhysList.
    - Added macro `emtutor.mac`.
    - Added physics-lists names: penelope, livermore.
    - Restored random seed storage.
    - By default do not store random seed and do not activate VisManager in batch.
    - Added `G4standard_exp` PhysList. Added material Lucite.
    - Return Z-position computation.
  - electromagnetic/TestEm5
    - Use all default values in default PhysList.
    - Use hadronic builders from physics_lists library.
  - electromagnetic/TestEm7
    - Parameter `skin=1` is set as default PhysList.
    - Added physics-lists names: penelope, livermore.
    - Fixed usage of elastic builders in PhysicsList.
  - electromagnetic/TestEm9
    - Compute truncated mean values to reduce statistical fluctuations and fixed output of statistics.
    - Added physics-lists names: penelope, livermore.
    - Uncommented hadron ionisation in Livermore builder.
  - electromagnetic/TestEm12
    - Uncommented hadron ionisation in Livermore builder.
    - `HistoManager`: by default, get `csdaRange` from `G4EmCalculator`.
  - electromagnetic/TestEm13, TestEm14
    - `vis.mac`: suppressed command drawTracks.
  - electromagnetic/TestEm15
    - SteppingAction: added protection if no lateral displacement.
  - electromagnetic/TestEm18
    - New example allowing for studying the energy lost by a charged particle in a single layer, due to ionization and bremsstrahlung. Results are compared to 'reference' values.
  - field/field03
    - Fixed bug in `F03FieldSetup` for the activation of local fields.
  - hadronic/Hadr01
    - PhysicsList update according to QBBC and quasi-elastic modifications.
    - Fix in QGSP_BIC_HP physics list. Addressing problem report #937.
  - medical/fanoCavity
    - New example for computing the dose deposited in an ionization chamber by a monoenergetic photon beam.
  - radioactivedecay/exrdm
    - Fixed usage of physics-lists.
  - runAndEvent
    - RE01: Removed large-N reference output.