68G4double G4MuBetheBlochModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083, 0.5917,
69 0.7628, 0.8983, 0.9801 };
71G4double G4MuBetheBlochModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813, 0.1813,
72 0.1569, 0.1112, 0.0506 };
79 limitKinEnergy(100.*
CLHEP::keV),
80 logLimitKinEnergy(
G4Log(limitKinEnergy)),
81 twoln10(2.0*
G4Log(10.0)),
82 alphaprime(
CLHEP::fine_structure_const/
CLHEP::twopi)
86 if(
nullptr != p) { SetParticle(p); }
103 G4double tmax = 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.) /
104 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
112 if(
nullptr == particle) {
115 massSquare = mass*mass;
116 ratio = CLHEP::electron_mass_c2/mass;
126 if(
nullptr == fParticleChange) {
141 G4double maxEnergy = std::min(tmax, maxKinEnergy);
142 if(cutEnergy < maxEnergy) {
144 G4double totEnergy = kineticEnergy + mass;
145 G4double energy2 = totEnergy*totEnergy;
146 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
148 cross = 1.0/cutEnergy - 1.0/maxEnergy -
149 beta2*
G4Log(maxEnergy/cutEnergy)/tmax +
150 0.5*(maxEnergy - cutEnergy)/energy2;
153 if (maxEnergy > limitKinEnergy) {
156 G4double logtmin =
G4Log(std::max(cutEnergy,limitKinEnergy));
157 G4double logstep = logtmax - logtmin;
160 for (
G4int ll=0; ll<8; ++ll) {
163 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - ep)/massSquare);
164 dcross += wgi[ll]*(1.0/ep - beta2/tmax + 0.5*ep/energy2)*a1*(a3 - a1);
166 cross += dcross*logstep*alphaprime;
168 cross *= CLHEP::twopi_mc2_rcl2/beta2;
185 (p,kineticEnergy,cutEnergy,maxEnergy);
200 (p,kineticEnergy,cutEnergy,maxEnergy);
213 G4double cutEnergy = std::min(cut, tmax);
223 G4double dedx =
G4Log(2.0*CLHEP::electron_mass_c2*bg2*cutEnergy/eexc2)
224 -(1.0 + cutEnergy/tmax)*beta2;
226 G4double totEnergy = kineticEnergy + mass;
227 G4double del = 0.5*cutEnergy/totEnergy;
236 dedx = std::max(dedx, 0.0);
239 if (cutEnergy > limitKinEnergy) {
242 G4double logstep = logtmax - logLimitKinEnergy;
244 G4double ftot2= 0.5/(totEnergy*totEnergy);
246 for (
G4int ll=0; ll<8; ++ll) {
249 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - ep)/massSquare);
250 dloss += wgi[ll]*(1.0 - beta2*ep/tmax + ep*ep*ftot2)*a1*(a3 - a1);
252 dedx += dloss*logstep*alphaprime;
255 dedx *= CLHEP::twopi_mc2_rcl2*eDensity/beta2;
259 dedx = std::max(dedx, 0.);
266 std::vector<G4DynamicParticle*>* vdp,
274 G4double maxKinEnergy = std::min(maxEnergy, tmax);
275 if(minKinEnergy >= maxKinEnergy) {
return; }
277 G4double totEnergy = kineticEnergy + mass;
278 G4double etot2 = totEnergy*totEnergy;
279 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
282 if(tmax > limitKinEnergy) {
284 grej += alphaprime*
a0*
a0;
292 tkin = minKinEnergy*maxKinEnergy/(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
293 f = 1.0 - beta2*tkin/tmax + 0.5*tkin*tkin/etot2;
295 if(tkin > limitKinEnergy) {
297 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - tkin)/massSquare);
298 f *= (1. + alphaprime*a1*(a3 - a1));
302 G4cout <<
"G4MuBetheBlochModel::SampleSecondary Warning! "
303 <<
"Majorant " << grej <<
" < "
304 << f <<
" for edelta= " << tkin
305 <<
" tmin= " << minKinEnergy <<
" max= " << maxKinEnergy
312 std::sqrt(tkin * (tkin + 2.0*CLHEP::electron_mass_c2));
313 G4double totalMomentum = totEnergy*std::sqrt(beta2);
314 G4double cost = tkin * (totEnergy + CLHEP::electron_mass_c2) /
315 (deltaMomentum * totalMomentum);
317 G4double sint = std::sqrt(1.0 - cost*cost);
319 G4ThreeVector deltaDirection(sint*std::cos(phi), sint*std::sin(phi), cost);
324 kineticEnergy -= tkin;
325 G4ThreeVector dir = totalMomentum*direction - deltaMomentum*deltaDirection;
326 direction = dir.
unit();
333 vdp->push_back(delta);
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy, G4double cutEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
G4double DensityCorrection(G4double x) const
G4double GetMeanExcitationEnergy() const
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
const G4Material * GetMaterial() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy) override
G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *) override
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy) override
G4MuBetheBlochModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="MuBetheBloch")
G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetPDGMass() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()