69 if (material != lastMaterial) {
71 f1Fluct = ioni->GetF1fluct();
72 f2Fluct = ioni->GetF2fluct();
73 e1Fluct = ioni->GetEnergy1fluct();
74 e2Fluct = ioni->GetEnergy2fluct();
75 e1LogFluct = ioni->GetLogEnergy1fluct();
76 e2LogFluct = ioni->GetLogEnergy2fluct();
78 lastMaterial = material;
90 a1 = C*f1Fluct*(
w2-e1LogFluct)/e1Fluct;
91 a2 = C*f2Fluct*(
w2-e2LogFluct)/e2Fluct;
108 if(a1+a2 <= 0.) { a3 /=
rate; }
115 if(a1 > 0.0) {
AddExcitation(rndmEngineF, a1, e1, emean, loss, sig2e); }
118 if(a2 > 0.0) {
AddExcitation(rndmEngineF, a2, e2, emean, loss, sig2e); }
120 if(sig2e > 0.0) {
SampleGauss(rndmEngineF, emean, sig2e, loss); }
131 const G4double namean = a3*w1*(alfa-1.)/((w1-1.)*alfa);
132 emean += namean*
e0*alfa1;
133 sig2e +=
e0*
e0*namean*(alfa-alfa1*alfa1);
151 if(sig2e > 0.0) {
SampleGauss(rndmEngineF, emean, sig2e, loss); }
G4double G4Log(G4double x)
G4long G4Poisson(G4double mean)
virtual void flatArray(const int size, double *vect)=0
G4IonisParamMat * GetIonisation() const
void AddExcitation(CLHEP::HepRandomEngine *rndm, const G4double ax, const G4double ex, G4double &eav, G4double &eloss, G4double &esig2)
void SampleGauss(CLHEP::HepRandomEngine *rndm, const G4double eav, const G4double esig2, G4double &eloss)
~G4UrbanFluctuation() override
G4UrbanFluctuation(const G4String &nam="UrbanFluc")
G4double SampleGlandz(CLHEP::HepRandomEngine *rndm, const G4Material *, const G4double tcut) override