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);
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.;
237 if(tmax > ipotFluct) {
240 if(w2 > ipotLogFluct) {
241 if(w2 > e2LogFluct) {
242 G4double C = meanLoss*(1.-rate)/(w2-ipotLogFluct);
243 a1 = C*f1Fluct*(w2-e1LogFluct)/e1Fluct;
244 a2 = C*f2Fluct*(w2-e2LogFluct)/e2Fluct;
246 a1 = meanLoss*(1.-rate)/e1;
252 if(rndmEngineF->flat() <
G4Exp(-sa1))
255 a1 = meanLoss*(1.-rate)/e1;
275 a3 = rate*meanLoss*(tmax-e0)/(e0*tmax*
G4Log(w1));
285 AddExcitation(rndmEngineF, a1, e1, emean, loss, sig2e);
288 AddExcitation(rndmEngineF, a2, e2, emean, loss, sig2e);
290 if(emean > 0.0) { SampleGauss(rndmEngineF, emean, sig2e, loss); }
300 alfa = w1*(nmaxCont+a3)/(w1*nmaxCont+a3);
302 G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
303 emean += namean*e0*alfa1;
304 sig2e += e0*e0*namean*(alfa-alfa1*alfa1);
318 rndmEngineF->flatArray(nb, rndmarray);
319 for (
G4int k=0; k<nb; ++k) { loss += w2/(1.-w*rndmarray[k]); }
322 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
G4double GetLogEnergy2fluct() const
G4ParticleDefinition * GetDefinition() const
G4double GetLogMeanExcEnergy() const
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