70 twoln10(2.0*
G4Log(10.0))
172 if(cutEnergy < maxEnergy) {
175 G4double energy2 = totEnergy*totEnergy;
176 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*
mass)/energy2;
178 cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
179 - beta2*
G4Log(maxEnergy/cutEnergy)/tmax;
182 if( 0.0 <
spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
203 (p,kineticEnergy,cutEnergy,maxEnergy);
218 (p,kineticEnergy,cutEnergy,maxEnergy);
244 - (1.0 + cutEnergy/tmax)*beta2;
303 if(elossnew > preKinEnergy) { elossnew = preKinEnergy; }
304 else if(elossnew < 0.0) { elossnew = eloss*0.5; }
312 vector<G4DynamicParticle*>* vdp,
322 if(minKinEnergy >= maxKinEnergy) {
return; }
328 G4double etot2 = totEnergy*totEnergy;
329 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*
mass)/etot2;
334 if( 0.0 <
spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
342 deltaKinEnergy = minKinEnergy*maxKinEnergy
343 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
345 f = 1.0 - beta2*deltaKinEnergy/tmax;
347 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
352 }
while( fmax*rndm[1] > f);
367 G4cout <<
"### G4LindhardSorensenIonModel WARNING: grej= " << grej
369 <<
" Ekin(MeV)= " << kineticEnergy
370 <<
" delEkin(MeV)= " << deltaKinEnergy
373 if(rndmEngineMod->
flat() > grej) {
return; }
392 if(cost > 1.0) { cost = 1.0; }
393 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
397 deltaDirection.
set(sint*cos(phi),sint*sin(phi), cost) ;
415 vdp->push_back(delta);
418 kineticEnergy -= deltaKinEnergy;
420 finalP = finalP.
unit();
void set(double x, double y, double z)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double GetDeltaL(G4int Z, G4double gamma) const
G4double GetChargeSquareRatio() const
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4int SelectRandomAtomNumber(const G4Material *)
static constexpr double hbar_Planck
static constexpr double MeV
G4LindhardSorensenIonModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="LindhardSorensen")
static constexpr double twopi_mc2_rcl2
Float_t x1[n_points_granero]
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
const G4ThreeVector & GetMomentumDirection() const
G4double BarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
static G4LindhardSorensenData * lsdata
const G4String & GetParticleName() const
G4double DensityCorrection(G4double x)
G4double GetPDGCharge() const
virtual void flatArray(const int size, double *vect)=0
Hep3Vector & rotateUz(const Hep3Vector &)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4ParticleDefinition * theElectron
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double GetPDGMass() const
G4double G4Log(G4double x)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
G4ParticleChangeForLoss * fParticleChange
void SetParticle(const G4ParticleDefinition *p)
G4ParticleChangeForLoss * GetParticleChangeForLoss()
static constexpr double c_squared
const G4ParticleDefinition * particle
G4double GetPDGSpin() const
void SetDeexcitationFlag(G4bool val)
G4EmCorrections * EmCorrections()
G4ParticleDefinition * GetDefinition() const
G4VEmFluctuationModel * GetModelOfFluctuations()
static constexpr double electron_mass_c2
virtual ~G4LindhardSorensenIonModel()
static constexpr double twopi
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
void SetAngularDistribution(G4VEmAngularDistribution *)
G4double GetMeanExcitationEnergy() const
static G4Electron * Electron()
G4double GetPDGMagneticMoment() const
G4ThreeVector GetMomentum() const
static constexpr double eplus
G4double GetA27(G4int Z) const
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
void SetLowEnergyLimit(G4double)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
G4bool UseAngularGeneratorFlag() const
G4IonisParamMat * GetIonisation() const
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
static G4LossTableManager * Instance()
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &eloss, G4double &, G4double length) override
G4VEmAngularDistribution * GetAngularDistribution()
const G4Material * GetMaterial() const
G4double GetTotalMomentum() const
Float_t x2[n_points_geant4]
virtual G4double GetParticleCharge(const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
static constexpr double GeV
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override
G4double GetElectronDensity() const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static G4NistManager * Instance()