GEANT4

Instructions about migration to release 7.0


Change name of methods for ParticleChange classes


In 6.2 release, some method names in ParticleChange classes have been changed.
New methods of ParticleChange classes are introduced as replacements of old methods
These are
      ProposeXXXX  as a replacement for SetXXXXChange
      GetXXXX      as a replacement for GetXXXXChange
The list of replacements of methods is shown below.

The reason leading to this change is the following:

The old interface with Get/SetXXXChange methods is still kept in release 6.2 but will be removed in release 7.0.

How to modify your code

Please use following scripts to migrate your application for the 7.0 release:
  1. Check existence of old methods in your code by using CheckMethodNameForParticleChange.sh
  2. If a old name exists in your files, rename it by using ChangeMethodNameForParticleChange.sh
For example:
$cd geant4/myapplication
$CheckMethodNameForParticleChange.sh
src/MyProcessA.cc:2:fParticleChange.SetTrueStepLength(truePathLength);
src/MyProcessB.cc:24::fParticleChange.SetMomentumChange(newDirection.x(),
$ChangeMethodNameForParticleChange.sh src/MyProcessA.cc
$ChangeMethodNameForParticleChange.sh src/MyProcessB.cc

List of renamed methods

Note 1: Both return type and arguments are not changed for new and old methods

Note 2: In old shceme, Set/GetMomentumDirectionChange and Set/GetMomentumChange were identical. Both methods are merged into Set/GetMomentumDirection.


8 July 2004, Hisaya Kurashige