80 twoln10(2.0*
G4Log(10.0)),
83 fParticleChange =
nullptr;
89 SetParticle(theElectron);
116 if(
nullptr == fParticleChange) {
150 void G4BetheBlochModel::SetupParameters()
156 corrFactor = chargeSquare;
160 magMoment2 = magmom*magmom - 1.0;
164 if(spin == 0.0 && mass <
GeV) {x = 0.736*
GeV;}
165 else if(mass >
GeV) {
170 tlimit = 2.0/formfact;
193 if(cutEnergy < maxEnergy) {
195 G4double totEnergy = kineticEnergy + mass;
196 G4double energy2 = totEnergy*totEnergy;
197 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
199 cross = (maxEnergy - cutEnergy)/(cutEnergy*maxEnergy)
200 - beta2*
G4Log(maxEnergy/cutEnergy)/tmax;
203 if( 0.0 < spin ) { cross += 0.5*(maxEnergy - cutEnergy)/energy2; }
224 (p,kineticEnergy,cutEnergy,maxEnergy);
239 (p,kineticEnergy,cutEnergy,maxEnergy);
264 - (1.0 + cutEnergy/tmax)*beta2;
267 G4double del = 0.5*cutEnergy/(kineticEnergy + mass);
308 G4double e = preKinEnergy - eloss*0.5;
309 if(e < preKinEnergy*0.75) { e = preKinEnergy*0.75; }
315 G4double elossnew = eloss*qfactor + highOrder;
316 if(elossnew > preKinEnergy) { elossnew = preKinEnergy; }
317 else if(elossnew < eloss*0.5) { elossnew = eloss*0.5; }
338 if(minKinEnergy >= maxKinEnergy) {
return; }
343 G4double totEnergy = kineticEnergy + mass;
344 G4double etot2 = totEnergy*totEnergy;
345 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
350 if( 0.0 < spin ) { fmax += 0.5*maxKinEnergy*maxKinEnergy/etot2; }
358 deltaKinEnergy = minKinEnergy*maxKinEnergy
359 /(minKinEnergy*(1.0 - rndm[0]) + maxKinEnergy*rndm[0]);
361 f = 1.0 - beta2*deltaKinEnergy/tmax;
363 f1 = 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
368 }
while( fmax*rndm[1] > f);
373 G4double x = formfact*deltaKinEnergy;
380 grej *= (1.0 + magMoment2*(x2 - f1/f)/(1.0 + x2));
383 G4cout <<
"### G4BetheBlochModel WARNING: grej= " << grej
385 <<
" Ekin(MeV)= " << kineticEnergy
386 <<
" delEkin(MeV)= " << deltaKinEnergy
389 if(rndmEngineMod->
flat() > grej) {
return; }
408 if(cost > 1.0) { cost = 1.0; }
409 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
413 deltaDirection.
set(sint*cos(phi),sint*sin(phi), cost) ;
431 vdp->push_back(delta);
434 kineticEnergy -= deltaKinEnergy;
436 finalP = finalP.
unit();
451 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
void set(double x, double y, double z)
G4IonisParamMat * GetIonisation() const
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
static G4LossTableManager * Instance()
G4ParticleChangeForLoss * GetParticleChangeForLoss()
static constexpr double proton_mass_c2
G4double GetKineticEnergy() const
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
static constexpr double twopi_mc2_rcl2
G4double EffectiveChargeSquareRatio(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4VEmAngularDistribution * GetAngularDistribution()
G4double GetParticleCharge(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double EffectiveChargeCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4ParticleDefinition * GetDefinition() const
virtual void CorrectionsAlongStep(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double &eloss, G4double &, G4double length) override
G4VEmFluctuationModel * GetModelOfFluctuations()
static G4NistManager * Instance()
const G4String & GetParticleName() const
static constexpr double twopi
static constexpr double electron_mass_c2
G4double GetTotalMomentum() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
G4double GetZ13(G4double Z) const
G4GLOB_DLL std::ostream G4cout
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4double GetElectronDensity() const
G4bool UseAngularGeneratorFlag() const
G4double IonBarkasCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4EmCorrections * EmCorrections()
const G4ThreeVector & GetMomentumDirection() const
virtual G4double GetParticleCharge(const G4ParticleDefinition *p, const G4Material *mat, G4double kineticEnergy) override
Hep3Vector & rotateUz(const Hep3Vector &)
static constexpr double eplus
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double IonHighOrderCorrections(const G4ParticleDefinition *, const G4MaterialCutsCouple *, G4double kineticEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
static constexpr double c_squared
G4double G4Log(G4double x)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double DensityCorrection(G4double x)
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
void SetAngularDistribution(G4VEmAngularDistribution *)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
G4double GetPDGSpin() const
G4double GetMeanExcitationEnergy() const
virtual ~G4BetheBlochModel()
static G4Electron * Electron()
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
static constexpr double MeV
G4BetheBlochModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="BetheBloch")
G4double GetPDGMagneticMoment() const
G4double GetChargeSquareRatio() const
void SetLowEnergyLimit(G4double)
void SetDeexcitationFlag(G4bool val)
G4double GetPDGCharge() const
virtual void SetParticleAndCharge(const G4ParticleDefinition *, G4double q2)
virtual void flatArray(const int size, double *vect)=0
static constexpr double hbar_Planck
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override
G4int GetLeptonNumber() const
G4ThreeVector GetMomentum() const
const G4Material * GetMaterial() const
G4int SelectRandomAtomNumber(const G4Material *)