MCPcopy Create free account
hub / github.com/Geant4/geant4 / Initialize

Method Initialize

source/processes/parameterisation/src/G4FastStep.cc:53–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51#include "G4UnitsTable.hh"
52
53void G4FastStep::Initialize(const G4FastTrack& fastTrack)
54{
55 // keeps the fastTrack reference
56 fFastTrack = &fastTrack;
57
58 // currentTrack will be used to Initialize the other data members
59 const G4Track& currentTrack = *(fFastTrack->GetPrimaryTrack());
60
61 // use base class's method at first
62 G4VParticleChange::Initialize(currentTrack);
63
64 // set Energy/Momentum etc. equal to those of the parent particle
65 const G4DynamicParticle* pParticle = currentTrack.GetDynamicParticle();
66 theEnergyChange = pParticle->GetKineticEnergy();
67 theMomentumChange = pParticle->GetMomentumDirection();
68 thePolarizationChange = pParticle->GetPolarization();
69 theProperTimeChange = pParticle->GetProperTime();
70
71 // set Position/Time etc. equal to those of the parent track
72 thePositionChange = currentTrack.GetPosition();
73 theTimeChange = currentTrack.GetGlobalTime();
74
75 // switch off stepping hit invokation by default:
76 theSteppingControlFlag = AvoidHitInvocation;
77
78 // event biasing weigth:
79 theWeightChange = currentTrack.GetWeight();
80}
81
82//----------------------------------------
83// -- Set the StopAndKilled signal

Callers 15

PostStepDoItMethod · 0.45
PostStepDoItMethod · 0.45
ConstructProcessMethod · 0.45
ConstructProcessMethod · 0.45
ConstructProcessMethod · 0.45
ConstructProcessMethod · 0.45
PostStepDoItMethod · 0.45
DecayItMethod · 0.45
PostStepDoItMethod · 0.45
DecayItMethod · 0.45
PostStepDoItMethod · 0.45

Calls 10

InitializeFunction · 0.85
G4ExceptionFunction · 0.85
GetPrimaryTrackMethod · 0.80
GetMomentumDirectionMethod · 0.80
GetKineticEnergyMethod · 0.45
GetPolarizationMethod · 0.45
GetProperTimeMethod · 0.45
GetPositionMethod · 0.45
GetGlobalTimeMethod · 0.45
GetWeightMethod · 0.45

Tested by 2

PostStepDoItMethod · 0.36
PostStepDoItMethod · 0.36