65std::vector<G4float>* G4LindhardSorensenIonModel::fact[] = {
nullptr};
71 twoln10(2.0*
G4Log(10.0))
73 fParticleChange =
nullptr;
79 fElimit = 2.0*CLHEP::MeV;
100 if(
nullptr == fParticleChange) {
107 if(
nullptr == lsdata) {
110 if(
nullptr == fIonData) {
139void G4LindhardSorensenIonModel::SetupParameters()
144 Zin =
G4lrint(std::abs(charge));
145 chargeSquare = charge*charge;
146 eRatio = CLHEP::electron_mass_c2/mass;
147 pRatio = CLHEP::proton_mass_c2/mass;
149 1./(0.5*CLHEP::eplus*CLHEP::hbar_Planck*CLHEP::c_squared);
151 magMoment2 = magmom*magmom - 1.0;
153 if(spin == 0.0 && mass < GeV) { x = 0.736*CLHEP::GeV; }
154 else if (Zin > 1) { x /= nist->
GetA27(Zin); }
156 formfact = 2.0*CLHEP::electron_mass_c2/(x*x);
157 tlimit = 2.0/formfact;
179 G4double emax = std::min(tmax, maxKinEnergy);
180 G4double escaled = kinEnergy*pRatio;
181 G4double cross = (escaled <= fElimit)
224 G4double cutEnergy = std::min(std::min(cut,tmax), tlimit);
226 G4double escaled = kinEnergy*pRatio;
227 G4double dedx = (escaled <= fElimit)
246 if(eloss >= preKinEnergy) {
return; }
252 const G4double e = std::max(preKinEnergy - eloss*0.5, preKinEnergy*0.5);
262 if(escaled <= fElimit) {
275 res += (
G4Log(x)*(tau + 1.)*(tau + 1.)/(tau * (tau + 2.0)) + 1.0 - x)
276 *q2*CLHEP::twopi_mc2_rcl2*eDensity;
286 const G4double beta2 = tau * (tau+2.0)/(gam*gam);
291 CLHEP::twopi_mc2_rcl2*q2*eDensity*(deltaL+deltaL0)*length/beta2;
300 if(res > preKinEnergy) { res = preKinEnergy; }
301 else if(res < 0.0) { res = eloss; }
313 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;
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 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
392 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
394 cost = std::min(cost, 1.0);
395 G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
399 deltaDirection.
set(sint*std::cos(phi),sint*std::sin(phi), cost) ;
416 vdp->push_back(delta);
419 kineticEnergy -= deltaKinEnergy;
421 finalP = finalP.
unit();
436 return 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.) /
437 (1. + 2.0*(tau + 1.)*eRatio + eRatio*eRatio);
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
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
G4double GetTotalMomentum() const
static G4Electron * Electron()
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetDEDX(const G4Material *, const G4int Z, const G4double e, const G4double loge) const
G4double GetMeanExcitationEnergy() const
G4double GetDeltaL(G4int Z, G4double gamma) const
~G4LindhardSorensenIonModel() override
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) 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")
void CorrectionsAlongStep(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, const G4double &length, G4double &eloss) override
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
G4ProductionCuts * GetProductionCuts() 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
G4int GetAtomicNumber() const
G4double GetPDGMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4double GetPDGSpin() const
G4double GetProductionCut(G4int index) const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4VEmAngularDistribution * GetAngularDistribution()
G4int SelectRandomAtomNumber(const G4Material *) const
void SetDeexcitationFlag(G4bool val)
void SetAngularDistribution(G4VEmAngularDistribution *)
G4bool UseAngularGeneratorFlag() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()