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;
G4double GetStepLength() const
const G4DynamicParticle * GetDynamicParticle() const
G4VParticleChange * AlongStepDoIt(const G4Track &aTrack, const G4Step &aStep)
const G4String & GetName() const
G4ErrorEnergyLoss(const G4String &processName="G4ErrorEnergyLoss", G4ProcessType type=fElectromagnetic)
G4ParticleDefinition * GetDefinition() const
virtual ~G4ErrorEnergyLoss()
const G4String & GetParticleName() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4ErrorMode GetMode() const
const G4String & GetProcessName() const
G4Material * GetMaterial() const
virtual void Initialize(const G4Track &)
void SetNumberOfSecondaries(G4int totSecondaries)
void ProposeEnergy(G4double finalEnergy)
G4ParticleChange aParticleChange
static G4ErrorPropagatorData * GetErrorPropagatorData()
G4double GetContinuousStepLimit(const G4Track &aTrack, G4double, G4double currentMinimumStep, G4double &)