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:
- Old names are misleading. Those methods are only meant to propose
new track properties (such as energy, momentum) for the final state of the
current step as results of DoIt of processes.
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:
- Check existence of old methods in your code by using
CheckMethodNameForParticleChange.sh
- 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.
- G4VParticleChange
- void SetTrueStepLength(G4double) --> void ProposeTrueStepLength(G4double)
- void SetLocalEnergyDeposit(G4double) --> void ProposeLocalEnergyDeposit(G4double)
- G4TrackStatus GetStatusChange() --> GetTrackStatus()
- void SetStatusChange(G4TrackStatus) --> void ProposeTrackStatus(G4TrackStatus)
- void SetSteppingControl(G4SteppingControl) --> void ProposeSteppingControl(G4SteppingControl)
- void SetParentWeight(G4double) --> void
ProposeParentWeight(G4double)G4ParticleChange
- const G4ThreeVector* GetMomentumDirectionChange() -->
GetMomentumDirection()
- const G4ThreeVector* GetMomentumChange() --> GetMomentumDirection()
- void SetMomentumDirectionChange(G4double, G4double, G4double) --> ProposeMomentumDirection(G4double, G4double, G4double)
- void SetMomentumChange(G4double, G4double, G4double) --> ProposeMomentumDirection(G4double, G4double, G4double)
- void SetMomentumDirectionChange(const G4ThreeVector&) --> ProposeMomentumDirection(const G4ThreeVector&)
- void SetMomentumChange(const G4ThreeVector&) --> ProposeMomentumDirection(const G4ThreeVector&)
- const G4ThreeVector* GetPolarizationChange() --> GetPolarization()void
- SetPolarizationChange(G4double, G4double, G4double) -->
ProposePolarization(G4double, G4double, G4double)
- void SetPolarizationChange(const G4ThreeVector&) --> ProposePolarization(const G4ThreeVector&)
- G4double GetEnergyChange() --> GetEnergy()
- void SetEnergyChange(G4double) --> ProposeEnergy()
- G4double GetProperTimeChange() --> GetPropoerTime()
- void SetProperTimeChange(G4double) --> ProposeProperTime(G4double)
- const G4ThreeVector* GetPositionChange() --> GetPosition()
- void SetPositionChange(G4double, G4double, G4double) --> ProposePosition(G4double, G4double, G4double)
- void SetPositionChange(const G4ThreeVector&) --> ProposePosition()
- G4double GetTimeChange() --> GetGlobalTime()
- void SetTimeChange(G4double) --> ProposeGlobalTime(G4double)
- G4double GetMassChange() --> GetMass()
- void SetMassChange(G4double) --> ProposeMass(G4double)
- G4double GetChargeChange() --> GetCharge()
- void SetChargeChange(G4double) --> SetCharge(G4double)
- G4double GetWeightChange() --> GetWeight()
- void SetWeightChange(G4double) --> ProposeWeight(G4double)
- G4ParticleChangeForDecay
- G4double GetTimeChange() --> GetGlobalTime()
- void SetTimeChange(G4double) --> ProposeGlobalTime(G4double)
- G4ParticleChangeForMSC
- const G4ThreeVector* GetPositionChange() --> GetPosition()
- void SetPositionChange(const G4ThreeVector&) --> ProposePosition()
- void SetMomentumChange(G4double, G4double, G4double) --> ProposeMomentumDirection(G4double, G4double, G4double)
- void SetMomentumChange(const G4ThreeVector&) --> ProposeMomentumDirection(const G4ThreeVector&)
- G4ParticleChangeForTransport
- G4Material* GetMaterialChange() --> GetMaterialInTouchable()
- void SetMaterialChange(G4Material*) --> SetMaterialInTouchable(G4Material*)
- const G4MaterialCutsCouple* GetMaterialCutsCoupleChange() --> GetMaterialCutsCoupleInTouchable()
- void
SetMaterialCutsCoupleChange(const G4MaterialCutsCouple*) -->
SetMaterialCutsCoupleInTouchable(const G4MaterialCutsCouple*)
8 July 2004, Hisaya Kurashige