89 minNumberInteractionsBohr(10.0),
97 particleMass = chargeSquare = ipotFluct = electronDensity = f1Fluct = f2Fluct
98 = e1Fluct = e2Fluct = e1LogFluct = e2LogFluct = ipotLogFluct = e0 = esmall
100 m_Inv_particleMass = m_massrate =
DBL_MAX;
121 m_Inv_particleMass = 1.0 / particleMass;
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;
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);
319 for (
G4int k=0; k<nb; ++k) { loss += w2/(1.-w*rndmarray[k]); }
322 if(emean > 0.0) { SampleGauss(rndmEngineF, emean, sig2e, loss); }
349 * electronDensity * chargeSquare;
360 if(part != particle) {
365 if( particleMass != 0.0 ){
366 m_Inv_particleMass = 1.0 / particleMass;
ThreeVector shoot(const G4int Ap, const G4int Af)
G4IonisParamMat * GetIonisation() const
G4long G4Poisson(G4double mean)
G4double GetKineticEnergy() const
virtual G4double Dispersion(const G4Material *, const G4DynamicParticle *, G4double, G4double) override
G4double GetEnergy2fluct() const
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double, G4double, G4double) override
G4double GetLogEnergy2fluct() const
G4UniversalFluctuation(const G4String &nam="UniFluc")
G4ParticleDefinition * GetDefinition() const
G4double GetLogMeanExcEnergy() const
G4double GetEnergy0fluct() const
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2) final
virtual ~G4UniversalFluctuation()
G4double GetElectronDensity() const
static constexpr double eplus
static constexpr double eV
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void InitialiseMe(const G4ParticleDefinition *) final
G4double GetLogEnergy1fluct() const
G4double GetPDGMass() const
G4double GetMeanExcitationEnergy() const
G4double GetF2fluct() const
G4double GetPDGCharge() const
virtual void flatArray(const int size, double *vect)=0
G4double GetF1fluct() const
const G4Material * GetMaterial() const
G4double GetEnergy1fluct() const