146 if (meanLoss < minLoss) {
return meanLoss; }
152 G4double tau = tkin * m_Inv_particleMass;
155 G4double beta2 = tau*(tau + 2.0)/gam2;
166 (meanLoss >= minNumberInteractionsBohr*tmax))
169 (1.+m_massrate*(2.*
gam+m_massrate)) ;
170 if (tmaxkine <= 2.*tmax)
174 * electronDensity * chargeSquare);
181 G4double twomeanLoss = meanLoss + meanLoss;
185 }
while (0.0 > loss || twomeanLoss < loss);
200 if (material != lastMaterial) {
210 esmall = 0.5*sqrt(e0*ipotFluct);
211 lastMaterial = material;
215 if(tmax <= e0) {
return meanLoss; }
219 if(meanLoss < 25.*ipotFluct)
221 if(rndmEngineF->flat()*ipotFluct< 0.04*meanLoss)
231 for (
G4int istep=0; istep < nstep; ++istep) {
233 loss = a1 = a2 = a3 = 0.;
235 if(tmax > ipotFluct) {
238 if(w2 > ipotLogFluct) {
239 G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct);
240 a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct;
241 if(w2 > e2LogFluct) {
242 a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct;
247 if(rndmEngineF->flat() <
G4Exp(-sa1))
250 a1 = meanLoss*(1.-rate)/e1;
273 a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*
G4Log(w1));
283 AddExcitation(rndmEngineF, a1, e1, emean, loss, sig2e);
286 AddExcitation(rndmEngineF, a2, e2, emean, loss, sig2e);
288 if(emean > 0.0) { SampleGauss(rndmEngineF, emean, sig2e, loss); }
298 alfa = w1*(nmaxCont+a3)/(w1*nmaxCont+a3);
300 G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
301 emean += namean*e0*alfa1;
302 sig2e += e0*e0*namean*(alfa-alfa1*alfa1);
316 rndmEngineF->flatArray(nb, rndmarray);
317 for (
G4int k=0; k<nb; ++k) { loss += w2/(1.-w*rndmarray[k]); }
320 if(emean > 0.0) { SampleGauss(rndmEngineF, emean, sig2e, loss); }
ThreeVector shoot(const G4int Ap, const G4int Af)
G4IonisParamMat * GetIonisation() const
G4long G4Poisson(G4double mean)
G4double GetKineticEnergy() const
G4double GetEnergy2fluct() const
static constexpr double twopi_mc2_rcl2
G4double GetLogEnergy2fluct() const
G4ParticleDefinition * GetDefinition() const
G4double GetLogMeanExcEnergy() const
static constexpr double electron_mass_c2
G4double GetEnergy0fluct() const
G4double GetElectronDensity() const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void InitialiseMe(const G4ParticleDefinition *) final
G4double GetLogEnergy1fluct() const
G4double GetMeanExcitationEnergy() const
G4double GetF2fluct() const
G4double GetF1fluct() const
const G4Material * GetMaterial() const
G4double GetEnergy1fluct() const