64{
66
68
71
74 G4double kinEnergyEnd = kinEnergyStart;
75
76
78 kinEnergyEnd = theELossForExtrapolator->EnergyBeforeStep( kinEnergyStart,
79 step_length,
80 aMaterial,
81 aParticleDef );
82 G4double kinEnergyHalfStep = (kinEnergyStart + kinEnergyEnd) * 0.5;
83
84#ifdef G4VERBOSE
86 G4cout <<
" G4ErrorEnergyLoss FWD end " << kinEnergyEnd
87 <<
" halfstep " << kinEnergyHalfStep <<
G4endl;
88#endif
89
90
91 kinEnergyEnd = theELossForExtrapolator->EnergyBeforeStep( kinEnergyHalfStep,
92 step_length,
93 aMaterial,
94 aParticleDef );
95 kinEnergyEnd = kinEnergyStart - (kinEnergyHalfStep - kinEnergyEnd );
96
97
98 } else {
99 kinEnergyEnd = theELossForExtrapolator->EnergyAfterStep( kinEnergyStart,
100 step_length,
101 aMaterial,
102 aParticleDef );
103 G4double kinEnergyHalfStep = (kinEnergyStart + kinEnergyEnd) * 0.5;
104#ifdef G4VERBOSE
106 G4cout <<
" G4ErrorEnergyLoss BCKD end " << kinEnergyEnd
107 <<
" halfstep " << kinEnergyHalfStep <<
G4endl;
108#endif
109
110
111 kinEnergyEnd = theELossForExtrapolator->EnergyAfterStep( kinEnergyHalfStep,
112 step_length,
113 aMaterial,
114 aParticleDef );
115 kinEnergyEnd = kinEnergyStart - (kinEnergyHalfStep - kinEnergyEnd );
116 }
117
118 G4double edepo = kinEnergyEnd - kinEnergyStart;
119
120#ifdef G4VERBOSE
122 G4cout <<
"AlongStepDoIt Estart= " << kinEnergyStart <<
" Eend " << kinEnergyEnd
123 << " Ediff " << kinEnergyStart-kinEnergyEnd << " step= " << step_length
124 <<
" mate= " << aMaterial->
GetName()
126#endif
127
131
133
135}
@ G4ErrorMode_PropBackwards
G4ParticleDefinition * GetDefinition() const
static G4ErrorPropagatorData * GetErrorPropagatorData()
G4ErrorMode GetMode() const
const G4String & GetName() const
const G4String & GetParticleName() const
G4double GetStepLength() const
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetKineticEnergy() const
G4ParticleChange aParticleChange