46 void G4ErrorEnergyLoss::InstantiateEforExtrapolator()
53 delete theELossForExtrapolator;
69 G4double kinEnergyEnd = kinEnergyStart;
76 G4double kinEnergyHalfStep = kinEnergyStart - (kinEnergyStart-kinEnergyEnd)/2.;
80 G4cout <<
" G4ErrorEnergyLoss FWD end " << kinEnergyEnd
81 <<
" halfstep " << kinEnergyHalfStep <<
G4endl;
89 kinEnergyEnd = kinEnergyStart - (kinEnergyHalfStep - kinEnergyEnd );
91 kinEnergyEnd = theELossForExtrapolator->
EnergyAfterStep( kinEnergyStart,
95 G4double kinEnergyHalfStep = kinEnergyStart - (kinEnergyStart-kinEnergyEnd)/2.;
98 G4cout <<
" G4ErrorEnergyLoss BCKD end " << kinEnergyEnd
99 <<
" halfstep " << kinEnergyHalfStep <<
G4endl;
103 kinEnergyEnd = theELossForExtrapolator->
EnergyAfterStep( kinEnergyHalfStep,
107 kinEnergyEnd = kinEnergyStart - (kinEnergyHalfStep - kinEnergyEnd );
110 G4double edepo = kinEnergyEnd - kinEnergyStart;
114 G4cout <<
"AlongStepDoIt Estart= " << kinEnergyStart <<
" Eend " << kinEnergyEnd
115 <<
" Ediff " << kinEnergyStart-kinEnergyEnd <<
" step= " << step_length
116 <<
" mate= " << aMaterial->
GetName()
137 if( theStepLimit != 1. ) {
139 G4double kinEnergyLoss = kinEnergyStart;
144 kinEnergyLoss = - kinEnergyStart +
145 theELossForExtrapolator->
EnergyBeforeStep( kinEnergyStart, currentMinimumStep,
146 aMaterial, aParticleDef );
148 kinEnergyLoss = kinEnergyStart -
149 theELossForExtrapolator->
EnergyAfterStep( kinEnergyStart, currentMinimumStep,
150 aMaterial, aParticleDef );
154 G4cout <<
" G4ErrorEnergyLoss: currentMinimumStep " <<currentMinimumStep
155 <<
" kinEnergyLoss " << kinEnergyLoss
156 <<
" kinEnergyStart " << kinEnergyStart <<
G4endl;
158 if( kinEnergyLoss / kinEnergyStart > theStepLimit ) {
159 Step = theStepLimit / (kinEnergyLoss / kinEnergyStart) * currentMinimumStep;
162 G4cout <<
" G4ErrorEnergyLoss: limiting Step " << Step
163 <<
" energy loss fraction " << kinEnergyLoss / kinEnergyStart
164 <<
" > " << theStepLimit << G4endl;