79 twoln10(2.0*log(10.0)),
110 if(isInitialised) {
return; }
112 isInitialised =
true;
128 tmax = std::min(maxEnergy, tmax);
130 if(cutEnergy < tmax) {
132 G4double xmin = cutEnergy/kineticEnergy;
134 G4double tau = kineticEnergy/electron_mass_c2;
137 G4double beta2 = tau*(tau + 2)/gamma2;
142 G4double gg = (2.0*gam - 1.0)/gamma2;
143 cross = ((xmax - xmin)*(1.0 - gg + 1.0/(xmin*xmax)
144 + 1.0/((1.0-xmin)*(1.0 - xmax)))
145 - gg*log( xmax*(1.0 - xmin)/(xmin*(1.0 - xmax)) ) ) / beta2;
159 cross = (xmax - xmin)*(1.0/(beta2*xmin*xmax) + b2
160 - 0.5*b3*(xmin + xmax)
161 + b4*(xmin*xmin + xmin*xmax + xmax*xmax)/3.0)
165 cross *= twopi_mc2_rcl2/kineticEnergy;
227 if (kineticEnergy < th) { tkin = th; }
229 G4double tau = tkin/electron_mass_c2;
236 eexc /= electron_mass_c2;
245 dedx = log(2.0*(tau + 2.0)/eexc2) - 1.0 - beta2
246 + log((tau-d)*d) + tau/(tau-d)
247 + (0.5*d*d + (2.0*tau + 1.)*log(1. - d/tau))/gamma2;
256 dedx = log(2.0*(tau + 2.0)/eexc2) + log(tau*d)
257 - beta2*(tau + 2.0*d - y*(3.0*d2
258 + y*(d - d3 + y*(d2 - tau*d3 + d4))))/tau;
266 dedx *= twopi_mc2_rcl2*electronDensity/beta2;
267 if (dedx < 0.0) { dedx = 0.0; }
271 if (kineticEnergy < th) {
272 x = kineticEnergy/th;
273 if(x > 0.25) { dedx /= sqrt(x); }
274 else { dedx *= 1.4*sqrt(x)/(0.1 + x); }
294 tmax = 0.5*kineticEnergy;
296 tmax = kineticEnergy;
298 if(maxEnergy < tmax) { tmax = maxEnergy; }
299 if(tmin >= tmax) {
return; }
301 G4double energy = kineticEnergy + electron_mass_c2;
302 G4double totalMomentum = sqrt(kineticEnergy*(energy + electron_mass_c2));
305 G4double gam = energy/electron_mass_c2;
315 G4double gg = (2.0*gam - 1.0)/gamma2;
317 grej = 1.0 - gg*xmax + xmax*xmax*(1.0 - gg + (1.0 - gg*y)/(y*y));
321 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
323 z = 1.0 - gg*x + x*x*(1.0 - gg + (1.0 - gg*y)/(y*y));
348 grej = 1.0 + (y*y*b4 - xmin*xmin*xmin*b3 + y*b2 - xmin*b1)*beta2;
351 x = xmin*xmax/(xmin*(1.0 - q) + xmax*q);
353 z = 1.0 + (y*y*b4 - x*y*b3 + y*b2 - x*b1)*beta2;
366 G4double deltaKinEnergy = x * kineticEnergy;
369 sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
370 G4double cost = deltaKinEnergy * (energy + electron_mass_c2) /
371 (deltaMomentum * totalMomentum);
372 G4double sint = (1.0 - cost)*(1. + cost);
373 if(sint > 0.0) { sint = sqrt(sint); }
378 G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
382 kineticEnergy -= deltaKinEnergy;
385 G4ThreeVector dir = totalMomentum*direction - deltaMomentum*deltaDirection;
386 direction = dir.
unit();
391 deltaDirection,deltaKinEnergy);
392 vdp->push_back(delta);
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
G4double GetMeanExcitationEnergy() const
G4double DensityCorrection(G4double x)
G4double GetTotNbOfAtomsPerVolume() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
const G4ParticleDefinition * particle
void SetParticle(const G4ParticleDefinition *p)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
G4ParticleChangeForLoss * fParticleChange
virtual ~G4MollerBhabhaModel()
G4ParticleDefinition * theElectron
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
G4MollerBhabhaModel(const G4ParticleDefinition *p=0, const G4String &nam="MollerBhabha")
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4ParticleChangeForLoss * GetParticleChangeForLoss()