64std::vector<G4float>* G4LindhardSorensenIonModel::fact[] = {
nullptr};
71 twoln10(2.0*
G4Log(10.0))
73 fParticleChange =
nullptr;
75 SetParticle(theElectron);
100 if(
nullptr == fParticleChange) {
106 if(
IsMaster() &&
nullptr == lsdata) {
133void G4LindhardSorensenIonModel::SetupParameters()
139 chargeSquare = charge*charge;
140 ratio = electron_mass_c2/mass;
141 static const G4double aMag = 1./(0.5*eplus*hbar_Planck*c_squared);
143 magMoment2 = magmom*magmom - 1.0;
145 formfact = (spin == 0.0 && mass < GeV) ? 1.181e-6 : 1.548e-6;
148 formfact = 3.969e-6*x*x;
150 tlimit = std::sqrt(0.414/formfact +
151 electron_mass_c2*electron_mass_c2) - electron_mass_c2;
174 G4double maxEnergy = std::min(tmax,maxKinEnergy);
175 if(cutEnergy < maxEnergy) {
177 G4double totEnergy = kineticEnergy + mass;
178 G4double energy2 = totEnergy*totEnergy;
179 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
181 cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
182 - beta2*
G4Log(maxEnergy/cutEnergy)/tmax;
185 if( 0.0 < spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
187 cross *= twopi_mc2_rcl2*chargeSquare/beta2;
231 G4double cutEnergy = std::min(cut,tmax);
243 G4double dedx =
G4Log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)
244 - (1.0 + cutEnergy/tmax)*beta2;
247 G4double del = 0.5*cutEnergy/(kineticEnergy + mass);
260 dedx = std::max(dedx, 0.0);
263 dedx *= twopi_mc2_rcl2*chargeSquare*eDensity/beta2;
284 G4double e = preKinEnergy - eloss*0.5;
289 G4double beta2 = tau * (tau+2.0)/(gam*gam);
295 eloss + twopi_mc2_rcl2*chargeSquare*eDensity*(deltaL+deltaL0)*length/beta2;
303 if(elossnew > preKinEnergy) { elossnew = preKinEnergy; }
304 else if(elossnew < 0.0) { elossnew = eloss*0.5; }
312 vector<G4DynamicParticle*>* vdp,
323 G4double maxKinEnergy = std::min(maxEnergy,tmax);
324 if(minKinEnergy >= maxKinEnergy) {
return; }
329 G4double totEnergy = kineticEnergy + mass;
330 G4double etot2 = totEnergy*totEnergy;
331 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
336 if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
344 deltaKinEnergy = minKinEnergy*maxKinEnergy
345 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
347 f = 1.0 - beta2*deltaKinEnergy/tmax;
349 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
354 }
while( fmax*rndm[1] > f);
359 G4double x = formfact*deltaKinEnergy*(deltaKinEnergy + 2*electron_mass_c2);
365 G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
366 grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
369 G4cout <<
"### G4LindhardSorensenIonModel WARNING: grej= " << grej
371 <<
" Ekin(MeV)= " << kineticEnergy
372 <<
" delEkin(MeV)= " << deltaKinEnergy
375 if(rndmEngineMod->
flat() > grej) {
return; }
391 sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
392 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
394 if(cost > 1.0) { cost = 1.0; }
395 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
399 deltaDirection.
set(sint*cos(phi),sint*sin(phi), cost) ;
417 vdp->push_back(delta);
420 kineticEnergy -= deltaKinEnergy;
422 finalP = finalP.
unit();
437 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
438 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
virtual void flatArray(const int size, double *vect)=0
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
G4double GetTotalMomentum() const
static G4Electron * Electron()
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetMeanExcitationEnergy() const
G4double DensityCorrection(G4double x)
G4double GetDeltaL(G4int Z, G4double gamma) const
~G4LindhardSorensenIonModel() override
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override
void CorrectionsAlongStep(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &eloss, G4double &, G4double length) override
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
G4double GetChargeSquareRatio() const
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4LindhardSorensenIonModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="LindhardSorensen")
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
G4double GetParticleCharge(const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
const G4Material * GetMaterial() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
G4double GetA27(G4int Z) const
static G4NistManager * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetPDGMagneticMoment() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4double GetPDGSpin() const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
G4VEmFluctuationModel * GetModelOfFluctuations()
G4VEmAngularDistribution * GetAngularDistribution()
G4int SelectRandomAtomNumber(const G4Material *)
void SetLowEnergyLimit(G4double)
void SetDeexcitationFlag(G4bool val)
void SetAngularDistribution(G4VEmAngularDistribution *)
G4bool UseAngularGeneratorFlag() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()