75 twoln10(2.0*
G4Log(10.0))
82 fElimit = 2.0*CLHEP::MeV;
108 if(
nullptr == fParticleChange) {
114 if(
nullptr == lsdata) {
116 if(
nullptr == lsdata) {
151void G4LindhardSorensenIonModel::SetupParameters()
156 Zin =
G4lrint(std::abs(charge));
157 chargeSquare = charge*charge;
158 eRatio = CLHEP::electron_mass_c2/mass;
159 pRatio = CLHEP::proton_mass_c2/mass;
161 1./(0.5*CLHEP::eplus*CLHEP::hbar_Planck*CLHEP::c_squared);
163 magMoment2 = magmom*magmom - 1.0;
165 if(spin == 0.0 && mass < GeV) { x = 0.736*CLHEP::GeV; }
166 else if (Zin > 1) { x /= nist->
GetA27(Zin); }
168 formfact = 2.0*CLHEP::electron_mass_c2/(x*x);
169 tlimit = 2.0/formfact;
191 G4double emax = std::min(tmax, maxKinEnergy);
192 G4double escaled = kinEnergy*pRatio;
193 G4double cross = (escaled <= fElimit)
236 G4double cutEnergy = std::min(std::min(cut,tmax), tlimit);
238 G4double escaled = kinEnergy*pRatio;
239 G4double dedx = (escaled <= fElimit)
258 if(eloss >= preKinEnergy) {
return; }
264 const G4double e = std::max(preKinEnergy - eloss*0.5, preKinEnergy*0.5);
272 if(escaled <= fElimit) {
274 if(Z > 2 && Z <= 80) {
275 res = fIonData->
GetDEDX(mat, Z, escaled,
G4Log(escaled));
284 G4double cut = (
nullptr == pcuts) ? tmax : pcuts->GetProductionCut(1);
287 res += (
G4Log(x)*(tau + 1.)*(tau + 1.)/(tau * (tau + 2.0)) + 1.0 - x)
288 *q2*CLHEP::twopi_mc2_rcl2*eDensity;
293 res = eloss*q2/chargeSquare;
298 const G4double beta2 = tau * (tau+2.0)/(gam*gam);
303 CLHEP::twopi_mc2_rcl2*q2*eDensity*(deltaL+deltaL0)*length/beta2;
311 if(res > preKinEnergy || 2*res < eloss) { res = eloss; }
323 std::vector<G4DynamicParticle*>* vdp,
332 const G4double minKinEnergy = std::min(cut, tmax);
333 const G4double maxKinEnergy = std::min(maxEnergy, tmax);
334 if(minKinEnergy >= maxKinEnergy) {
return; }
339 G4double totEnergy = kineticEnergy + mass;
340 G4double etot2 = totEnergy*totEnergy;
341 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
346 if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
354 deltaKinEnergy = minKinEnergy*maxKinEnergy
355 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
357 f = 1.0 - beta2*deltaKinEnergy/tmax;
359 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
364 }
while( fmax*rndm[1] > f);
369 G4double x = formfact*deltaKinEnergy;
375 G4double x2 = 0.5*electron_mass_c2*deltaKinEnergy/(mass*mass);
376 grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
379 G4cout <<
"### G4LindhardSorensenIonModel WARNING: grej= " << grej
381 <<
" Ekin(MeV)= " << kineticEnergy
382 <<
" delEkin(MeV)= " << deltaKinEnergy
385 if(rndmEngineMod->
flat() > grej) {
return; }
401 std::sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
402 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
404 cost = std::min(cost, 1.0);
405 G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
409 deltaDirection.
set(sint*std::cos(phi),sint*std::sin(phi), cost) ;
426 vdp->push_back(delta);
429 kineticEnergy -= deltaKinEnergy;
431 finalP = finalP.
unit();
446 return 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.) /
447 (1. + 2.0*(tau + 1.)*eRatio + eRatio*eRatio);
G4double G4Log(G4double x)
#define G4MUTEX_INITIALIZER
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)
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
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 EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy)
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4bool isInitialized=false)
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 MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
G4double GetChargeSquareRatio(const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) 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
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()