Geant4 6.2 Release Notes

June 25th, 2004

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. AIDA and CLHEP
3. Compiler Specific Problems
4. Known Run-Time Problems
5. Compilation Warnings
6. Known Run-Time Warnings
7. Major items for migration of user code
8. Detailed list of changes and fixes

## 1. Supported and Tested Platforms

Official platforms:

- SUN Solaris 5.8, C++ CC-5.4 Patch 111715-02.
- Linux, gcc 3.2.3.
  This configuration was tested with the RedHat 7.3 distribution, versions of Geant4 have also been compiled successfully on other Linux distributions, like Debian, Suse or more recent RedHat systems. The default RedHat compiler gcc-2.96 distributed in RedHat 7.X is NOT supported. It has been verified that it produces incorrect binaries, therefore is not reliable. See also note below.
- Windows/XP and CygWin Tools with: Visual C++ 7.1 .NET

More verified configurations:

- SUN Solaris 5.8, C++ CC-5.5.
- Linux, gcc 3.3.3.
- Linux, Intel-icc 8.0.
- MacOS 10.3, gcc-3.3

More verified configurations, which we plan to stop supporting in releases or patches after November 2004:

- Linux, gcc 2.95.2.
- Windows/2000 and CygWin Tools, Visual C++ 6.0 Service Pack 5

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. AIDA and CLHEP

Geant4 6.2 requires the installation of CLHEP.
Tests have been performed with CLHEP-1.8.1.0

Geant4 6.2 examples with histogramming cowork with AIDA 3.2.1 implementations. These include:

- PI and included components
- JAS (Java Analysis Studio)
- Open Scientist

AIDA headers can be downloaded from: http://aida.freehep.org

## 3. Compiler Specific Problems

- Linux Red Hat 7.X, gcc-2.96.
  - The default compiler distributed by Red Hat since release 7.0 is NOT supported and not considered reliable for running a Geant4-based application. In more than one test case, binaries produced by gcc-2.96 have shown incorrect behavior, either due to wrong order of initialisation of static data in memory or to bugs in the system `iostream` classes, problems which apparently have all been solved in more recent versions of the compiler (3.X series).
    For information, gcc-2.96 is a compiler that has never been officially released, nor supported by the GNU team itself and is not considered reliable by the authors (for more information, see also http://gcc.gnu.org/gcc-2.96.html).

## 4. 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.

## 5. Compilation Warnings

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

## 6. 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.

## 7. Major items for migration of user code

There're not known migrations necessary if upgrading from release 6.1, other than recompilation and/or reinstallation of libraries and user applications.

Future migration for `G4VParticleChange` class

For the future releases, an interface change to the class `G4VParticleChange` is foreseen. The required changes are already implemented in this release while still keeping valid the old interface.
The following methods will be removed in the future:

          void  SetTrueStepLength(G4double truePathLength);
          void  SetLocalEnergyDeposit(G4double anEnergyPart);
          G4TrackStatus GetStatusChange() const;
          void  SetStatusChange(G4TrackStatus status);
          void  SetSteppingControl(G4SteppingControl StepControlFlag);
          void  SetParentWeight(G4double);

They will have to be replaced by the following methods, respectively:

          void ProposeTrueStepLength(G4double truePathLength);
          void ProposeLocalEnergyDeposit(G4double anEnergyPart);
          G4TrackStatus GetTrackStatus() const;
          void ProposeTrackStatus(G4TrackStatus status);
          void ProposeSteppingControl(G4SteppingControl StepControlFlag);
          void ProposeParentWeight(G4double);

Future migration for `G4GeneralParticleSource` class

A 'tree-structured' command format is implemented in this release for `G4GeneralParticleSource`. The old UI commands have been kept for backward compatibility but will be removed in the future.
For more information, please consult: http://reat.space.qinetiq.com/gps.

## 8. 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

- `Configure` script:
  - Added support for global DLL libraries on Windows systems.
  - Added new data-set for elastic-scattering data.
- `source/GNUmakefile`:
  - Revised order of module installation according to dependencies.
  - New `dll` target for building of DLLs global libraries on Windows systems.
- `Linux-g++.gmk`:
  - Made -O2 optimisation the default.
  - Included (deactivated by default) Pentium4 chip specific options for using chips-specific floating-point arithmetics based on the SSE unit.
- `WIN32-VC7.gmk`:
  - Added setup for WIN32-VC7 for building of DLLs.
- `Darwin-g++.gmk`:
  - Corrected options to build shared libraries (.dyn); use twolevel_namespace and GLOBLIBS for shared-libs build on MacOS. Shared-libs build are possible only global libraries.
  - Corrected options to retrieve Motif.
- `architecture.gmk`:
  - Added check for definition of LDFLAGS. Fixes bug report #603.
  - Revisited Inventor default. Removed HEPVis dependencies (Inventor visualization driver no longer needs these).
- `binmake.gmk`:
  - Activated shared-libs mechanism for Windows platforms; forced creation of static library for examples/applications for the usage with DLLs.
  - Fixed problem for WIN32 such that also LDLIBS (including EXTRALIBS) will be mangled to replace -L by its WIN32 corresponding libpath.
  - Added include paths to new hadronic models.
  - Restored global library for 'interfaces' module which was missing from the linking list.
- `common.gmk`, `globlib.gmk`:
  - Fixed clean/clean_libs target.

### Digitization & Hits

- `G4SDManager`, `G4SDStructure`: added optional argument warning to `FindSensitiveDetector(pathName, warning)`, defaulted to `true`, to eventually exclude warning issued by `G4SDManager` when sensitive detector is not found.

### Event

- Design iteration of the `G4GeneralParticleSource` class:
  - New classes have been added.
    See http://reat.space.qinetiq.com/gps for more details of the changes.
  - New formula for converting integral spectrum to differential one.
- `G4EventManager`:
  - Added access methods to `G4TrackingManager` and `G4StackManager`.
  - Fixed incorrect behaviour of event abortion requested by `BeginOfEventAction()`.

### Electromagnetic Processes (Low-energy)

- First iteration towards new models for photoelectric angular distribution: design iteration and re-implementation of non-polarized Sauter-Gavrila distribution (K-shell approximation).
- New model for PIXE.
- Bug fix for Barkas effect.
- Bug fix in energy loss concerning positrons handled by Penelope.

### Electromagnetic Processes (Standard)

- `G4VEnergyLoss` and related classes:
  - Corrected error in retrieving `dE/dx` from tables (it affected proton around `1 MeV`).
  - Fixed a problem in retrieving physics tables from files.
  - Fixed a problem of energy below `lowestKinEnergy` (simulation of energy loss of low energy particles in low density gases).
  - Improved sampling in integral method for cross sections with peaks.
  - Added new methods to define simulation options to `G4EmProcessOptions`.
  - Revised printout format in `G4VEnergyLossProcess`.
- Energy-loss fluctuations:
  - Reduced area of applicability of the model for simulation of fluctuations at very small steps to provide less step dependent results in solid absorbers.
  - Smoothed out sampling of Gaussian fluctuations, when sigma is much bigger than energy loss.
  The purpose of both changes is to provide results that are less dependent on step size. For example, for steps down to 0.1 microns (in solid materials) the energy deposition distribution in a thin absorber is not dependent on the step limit.
- Ionization for muons, hadrons, ions:
  - Set the integral method to be the default (it already was for electrons). The step remains limited to 20% of the current range, as in Geant4 5.2.
- Multiple Scattering:
  - Changes in `G4MscModel`: `t->z` and `z->t` transformations (true length to geometrical length and back) have been rewritten. The purpose is to reduce the step-size dependence of results, which was mainly connected with simulation of multiple scattering of low energy particles. It will affect the resolution of sampling calorimeters.
  - Change in the angular distribution for `e+/e-`: correction to the Highland formula for the central part of the distribution.
- Multiple Scattering for ions:
  - Use dynamic charge for simulation of multiple scattering angle.
  - Fix to avoid crash in case of use of `G4hLowEnergyIonisation` for ions together with multiple-scattering.
- Muon Pair Production:
  - Minor fix in differential cross section: use total energy instead of kinetic energy.
  - Fixed minor energy non-conservation (electron mass).
  - Fixed problem of calculation of maximum energy transfer to an atom of compound materials.
- PAI ionisation:
  - Introduced new model `G4PAIPhotonModel`, PAI model that splits the cross-section into electron and photon parts.
  - Removed limitations on cut values in both PAI models.
  - Use precise integrator for initialisation of PAI models.

### General Processes, Parameterisation, Cuts, Decay, Optical

- Cuts:
  - Enabled the user to retrieve from a file tables with materials and couples which are in a different order to that in memory.
    Modified `G4ProductionCutsTable::RetrieveCutsTable()` to enable this.
  - `G4ProductionCuts`: moved usage of statics in inline functions to non-inline for porting to DLLs on Windows.
- Decay:
  - Use new interface methods of `G4VParticleChange`.
- Management:
  - Fixed bug in `G4ProcessManager::RemoveProcess()` for the case when the process to be removed is inactive.
- Optical:
  - Fixes in `G4OpBoundaryProcess` for default class member assignments in `DoIt()` method.
  - Added protection against NULL pointers in `G4OpRayleigh` process. Do not overwrite Rayleigh scattering length for 'Water' material if it has been specified by the user through a call to `AddProperty("RAYLEIGH"...)`.

### Geometry

- Divisions
  - Added support for reflection of divided volumes: added concrete istance of division-factory `G4PVDivisionFactory` for the creation of volume divisions on demand.
- Management
  - Imported `G4ReflectedSolid` class from `solids/Boolean`.
  - Added abstract factory `G4VPVDivisionFactory` defining interfaces for the creation of volumes divisions.
- Navigation
  - Added more verbosity on solids response for navigators (optimised/not optimised) if "check_mode" state is combined with verbose level-1.
  - Added check to `G4Navigator` to count the number of steps with zero length and issue an exception aborting the event for tracks that get stuck in a loop. A corrective action is attempted after 10 consecutive zero steps; the exception is thrown after 25 consecutive zero steps.
- Solids
  - Boolean solids:
    - Moved `G4ReflectedSolid` class to `management` module.
    - Moved `G4ReflectionFactory` class to `volumes` module.
    - Moved unit test for reflection to `volumes` module.
  - Specific solids:
    - First implementation of a framework for twisted surfaces:
      includes a new specific twisted shape: `G4TwistedTubs`.
      New classes: `G4VSurface`, `G4TwistedSurface`, `G4HyperbolicSurface`, `G4FlatSurface`, `G4TwistedTubs`.
- Volumes
  - `G4LogicalBorderSurface`, `G4LogicalSkinSurface`: added `CleanSurfaceTable()` static methods for the clearing of the surface tables in case of dynamic geometries.
  - Imported `G4ReflectionFactory` from module `solids/Boolean`.
  - Enhanced `G4ReflectionFactory` to support reflection of divided volumes: added `Divide(...)` set of methods.
  - Adopt DLLIMPORT/EXPORT technique to handle extern simbols for allowing support of DLLs on Windows.

### Global

- `G4Allocator`: added utility methods for explicitely deallocate storage and print total allocated pages size: `ResetStorage()`, `GetAllocatedSize()`.
- HEPNumerics: fixed bug in `G4DataInterpolation::PolynomInterpolation()` for indexing in a for-loop.
- Added support for building DLLs on Windows: added macros for importing symbols and migrated `G4ios` and `G4strstreambuf`.

### Graphical Representations

- Implemented constructor and destructor for `G4AttDefStore`, to properly delete objects in the static map, allocated through explicit calls to `GetInstance()`. Made `G4AttDefStore` a singleton.

### Materials

- `G4SandiaTable`: added new methods for sorting algorithm in PAI model.
- Added new utility method `ConstPropertyExists(const char * key)` returning `true`/`false` according to the existance of the 'key' in the table `G4MaterialPropertiesTable`.

### Hadronic Processes

- New packages and models:
  - Ablation: model for evaporation (used in conjunction with the abrasion code).
  - Abrasion: package for ion reactions.
  - EM dissociation.
  - Coherent_elastic: new model for high energy elastic scattering, requiring a new provided data set for elasting scattering data.
- cross_sections:
  - Removed discontinuities in pion scattering data.
  - Fix in high energy p-H cross-sections (G3 legacy bug).
- management:
  - Optionally killing of primaries, steerable from use code.
  - Bug fix for cross-section biasing.
  - Added protection to hadronic processes against illegal track status.
- util:
  - Added a fuzzy initializer class.
  - Added a Besselfunction class.
  - Fixed two rare bugs seen by LHCb in `G4HadFinalState` that lead to an exception.
- models/binary_cascade:
  - Some performance optimizations.
  - Corrected rotation in inverse kinematics for light ion reaction code.
  - Added some protections fixing problems reported in bug-reports #574 and #593.
  - Bug fix related to bug report #607.
- models/cascade:
  - Fixed memory leak.
- models/chiral_invariant_phase_space:
  - Fixed `ppK+` "antistrange below mass shell" problem in `G4QEnvironment`.
  - Minor bug fixes in `G4QEnvironment` in (Sigma-)2n final state.
  - Fixed rare problem of decay in `Del+Del+` with `pi0` when `pi-` was found.
  - Minor bug fix in final multibaryon spit (`3n->n+n+n`).
- models/de_excitation/fermi-break-up:
  - Bug fix in the splitting probabilities.
  - Adding destruction of configurations.
- models/de_excitation/photon-evaporation:
  - Slight optimisation of E1 probabilities.
- models/high_energy:
  - Re-added class-descriptions.
- models/im_r_matrix:
  - Some optimizations in `G4Scatterer`.
- models/management:
  - Protections for rounding issues.
  - Enabling user overload of some methods.
- models/neutron_hp:
  - Some code clean-up.
  - Now suitable for DLL usage.
- models/pre_equilibrium:
  - Dixed updating of charged/neutral excited particles.
- models/util:
  - Optimized initialization for `G4Fancy3DNucleus`.
  - Fix in decay routines for decays involving broad resonances in the final state.

### Particles

- Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs. Modified granular `GNUmakefile`s and rearranged usage of extern symbols in classes in `management` module.

### Run, Intercoms and Interfaces

- Intercoms:
  - Introduced static methods in `G4UIcommand` class for conversion between a string and a value. Some implementation of derived classes are modified accordingly. Introduced utility methods `ConvertToStringWithBestUnit()` and `ConvertToStringWithDefaultUnit()` for command classes taking a unit parameter.
- Interfaces:
  - `G4[UI]Win32`: implemented changes to allow usage of standard C main (and avoid WinMain). Moved usage of inline methods to non-inline for DLLs support on Windows.
- Run:
  - `G4RunManagerKernel`: added access methods to `G4TrackingManager` and `G4StackManager`.
  - Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs. Modified `GNUmakefile` and rearranged usage of extern symbols in `G4Run`.

### Track and Tracking

- Track
  - G4VParticleChange: added new methods `ProposeXXX()` (and corresponding `GetXXX()` methods) as replacement for old `SetXXXChange()` and `GetXXXChange()`, now obsolete.
  - `G4ParticleChangeForLoss`: fixed minor energy non-conservation problem in case of more than 1 processes changing the energy. Fixed initialization of `ParentWeight`.
  - Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs. Modified `GNUmakefile` and rearranged usage of extern symbols in `G4Track`.
- Tracking
  - Adopt DLLIMPORT/EXPORT technique to handle extern simbols for DLLs. Modified `GNUmakefile` and rearranged usage of extern symbols in classes.

### Visualization

- HepRep
  - Renamed zlib prefix from `z_` to `heprep_z_`. Added symbol `z_errmsg` to list for renaming to avoid conflicts with other programs who contain a copy of zlib.
  - Added attributes for Region and root-Region to both HepRep drivers.
  - Added ability to separately write geometry files.
  - Bug fix: copied new interfaces for HepRep, which uses fewer pointers.
  - Added initial viewpoint settings and a command to set the coordinate system.
- OpenGL
  - Added `G4OpenGL.hh` wrapper file and adapted code to encapsulate inclusion of `GL/gl.h` and `GL/glu.h` that may be platform dependent. Cleared WIN32 ifdefs no longer necessary.
- OpenInventor
  - Added copy of the few necessary HEPVis code. HEPVis module dependency is now no more needed.
  - Ported code to run on Windows systems.
  - Split Viewer to have `G4OpenInventorXtViewer` and `G4OpenInventorWinViewer`.
  - Split `G4OpenInventor` to have `G4OpenInventorXt` and `G4OpenInventorWin`: Xt and Win to follow the conventions found in the OpenInventor environment.
- RayTracer
  - Adopt DLLIMPORT/EXPORT technique to handle extern simbols for allowing support of DLLs on Windows.
- VRML
  - Fixed typo in printout in `G4VRML[1/2]FileSceneHandler`.

### Data sets

- New data set for elastic-scattering data at high-energies (above 1-GeV) for the coherent_elastic hadronic model.

### Electromagnetic physics-lists

- New module with samples of physics list for standard electromagnetic physics.

### Environments

- MOMO: new version of MOMO.jar archive including a bug-fix to GPE.

### G3toG4 Tool

- Removed hardwired `gSeparator` constant (a character which is used during generation of volume names) to '_'. Now `gSeparator` is made non constant and so can be changed in case a user wants to use '_' in his code.
- `G4gsrotm`: commented warning about left-handled coordinates for rotation axes.

### Examples

- Updated reference outputs.
- advanced
  - Implemented migration to AIDA 3.2.1
  - composite_calorimeter
    - Changed use of the ntuple. Mechanism simplified and the ntuple is always correctly filled.
  - cosmicray_charging
    - New example illustrating an application aimed at simulating the electrostatic charging of isolated test masses in the LISA mission by galactic cosmic ray protons and helium nuclei.
  - hadrontherapy
    - New example illustrating an application simulating an hadron therapy beam line for medical physics.
  - medical_linac
    - New example simulating energy deposit in a Phantom filled with water for a typical linac used for intensity modulated radiation therapy. The experimental set-up is very similar to one used in clinical practice.
  - purging_magnet
    - New example illustrating an application that simulates electrons traveling through a 3D magnetic field; used in a medical environment for simulating a strong purging magnet in a treatment head.
  - radioprotection
    - New example illustrating an application to evaluate the dose in astronauts, in vehicle concepts and Moon surface habitat configurations, in a defined interplanetary space radiation environment.
- extended
  - Implemented migration to AIDA 3.2.1
  - analysis
    - A01
      - Updated mac files for HepRep2 driver to set zoom factor and coordinate system and write separate geometry.
  - electromagnetic
    - TestEm1:
      - PhysicsLists: removed Particles and General.
      - EmPhysicsList: set G4eBremsstrahlungCMS as default.
    - TestEm2
      - Updated PhysicsList: use concept of builders per package.
      - Added acceptance control.
      - Added histogram name and type UI commands (AIDA, ROOT, JAS, and other output types are available).
    - TestEm3
      - Introduction of the class HistoManager.
      - Possibility to have multi-runs histogram files.
      - PhysicsLists: removed Particles and General.
      - New macro `dedx.max` to quickly check `dE/dx` calculation.
      - Added acceptance check activated by UI command.
    - TestEm5
      - Modified HistoManager and its messenger in order to allow for multi-run jobs.
      - PhysicsLists: added HadronElastic, BinaryCascade, IonBinaryCascade. Removed Particles, General.
      - New macro `dedx.mac`.
      - Modified histo 7: projected position at exit.
    - TestEm7
      - PhysicsLists: removed Particles and General.
    - TestEm8
      - Updated test of PAI model.
    - TestEm9
      - Removed Clean of `G4RegionStore`, instead delete regions one by one.
      - Added acceptance printout.
      - Added `histclean` target to `GNUmakefile`.
    - MuonProcesses
      - New example intended to check implementation of the processes of muon interactions: ionization, direct (e+,e-) production, bremsstrahlung, mu-nuclear interaction. It allows to compute differential cross sections (as function of the energy transfered to secondaries), total cross sections and to compare with analytic calculations.
    - PhotonProcesses
      - New test devoted to the photon processes: gamma conversion, coherent and incoherent scattering, photoelectric effect. It allows to compute absorption coefficients and to plot
  - optical
    - New example LXe demonstrating the use of optical processes in a multi-purpose detector setup.
  - parallel
    - New example ExDiane showing parallelisation of the 'brachytherapy' example using the DIANE framework (see http://cern.ch/diane).
    - Bug fix in ParRunManager for ParN02 and ParN04 TOP-C examples.
- novice
  - N02
    - Removed UI vis commands from run-action.
    - Code cleanup in physics-list.
    - Corrected definition of XenonGas in detector-contruction.
  - N03
    - Use G4UI_USE_WIN32 to have a default Windows GUI coworking with the OpenGL Windows driver on Windows.
    - New macro `exN03Vis9.mac`, demo of the OpenGL Windows driver. Update to the `gui.mac` menu items.
    - Code cleanup in physics-list.
  - N06
    - Change e+ energy in primary-generator to 500 keV.
    - Removed UI vis commands from run-action.