79 twoln10(2.0*
G4Log(10.0)),
195 if(cutEnergy < maxEnergy) {
198 G4double energy2 = totEnergy*totEnergy;
199 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*
mass)/energy2;
201 cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
202 - beta2*
G4Log(maxEnergy/cutEnergy)/tmax;
205 if( 0.0 <
spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
297 if(cutEnergy < tmax) {
302 if(dedx > 0.0) {
return dedx; }
316 dedx -=
material->GetIonisation()->DensityCorrection(x);
348 if(eloss >= preKinEnergy) {
return; }
361 const G4double elossnew = eloss*qfactor + highOrder;
384 if(minKinEnergy >= maxKinEnergy) {
return; }
390 const G4double etot2 = totEnergy*totEnergy;
391 const G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*
mass)/etot2;
396 if( 0.0 <
spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
404 deltaKinEnergy = minKinEnergy*maxKinEnergy
405 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
407 f = 1.0 - beta2*deltaKinEnergy/tmax;
409 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
414 }
while( fmax*rndm[1] > f);
426 grej *= (1.0 +
magMoment2*(x2 - f1/f)/(1.0 + x2));
429 G4cout <<
"### G4BetheBlochModel WARNING: grej= " << grej
431 <<
" Ekin(MeV)= " << kineticEnergy
432 <<
" delEkin(MeV)= " << deltaKinEnergy
435 if(rndmEngineMod->
flat() > grej) {
return; }
453 const G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
456 deltaDirection.
set(sint*std::cos(phi),sint*std::sin(phi), cost) ;
474 vdp->push_back(delta);
477 kineticEnergy -= deltaKinEnergy;
479 finalP = finalP.
unit();
G4double G4Log(G4double x)
static constexpr double twopi
static constexpr double eplus
static constexpr double GeV
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 CorrectionsAlongStep(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, const G4double &length, G4double &eloss) override
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)
const G4ParticleDefinition * theElectron
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double GetParticleCharge(const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
G4double GetChargeSquareRatio() const
~G4BetheBlochModel() override
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
const G4ParticleDefinition * particle
G4ParticleChangeForLoss * fParticleChange
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
const G4Material * currentMaterial
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
G4BetheBlochModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheBloch")
G4ICRU90StoppingData * fICRU90
void SetupParameters(const G4ParticleDefinition *p)
const G4Material * baseMaterial
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 IonHighOrderCorrections(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
G4double IonBarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
static G4EmParameters * Instance()
G4double GetElectronicDEDXforProton(const G4Material *, G4double kinEnergy) const
G4int GetIndex(const G4Material *) const
G4double GetElectronicDEDXforAlpha(const G4Material *, G4double scaledKinEnergy) const
G4double GetMeanExcitationEnergy() const
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
const G4Material * GetMaterial() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
G4ICRU90StoppingData * GetICRU90StoppingData()
G4double GetA27(G4int Z) const
static G4NistManager * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetPDGMagneticMoment() const
G4double GetPDGMass() const
G4int GetLeptonNumber() 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()
static constexpr double eplus
static constexpr double electron_mass_c2
static constexpr double proton_mass_c2
static constexpr double GeV
static constexpr double hbar_Planck
static constexpr double MeV
static constexpr double c_squared
static constexpr double twopi_mc2_rcl2
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments