69G4double G4MuBetheBlochModel::xgi[]={ 0.0199, 0.1017, 0.2372, 0.4083, 0.5917,
70 0.7628, 0.8983, 0.9801 };
72G4double G4MuBetheBlochModel::wgi[]={ 0.0506, 0.1112, 0.1569, 0.1813, 0.1813,
73 0.1569, 0.1112, 0.0506 };
80 limitRadCorrection(250.*
CLHEP::MeV),
81 limitKinEnergy(100.*
CLHEP::keV),
82 logLimitKinEnergy(
G4Log(limitKinEnergy)),
83 twoln10(2.0*
G4Log(10.0)),
84 alphaprime(
CLHEP::fine_structure_const/
CLHEP::twopi)
88 if(
nullptr != p) { SetParticle(p); }
105 G4double tmax = 2.0*CLHEP::electron_mass_c2*tau*(tau + 2.) /
106 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
114 if(
nullptr == particle) {
117 massSquare = mass*mass;
118 ratio = CLHEP::electron_mass_c2/mass;
128 if(
nullptr == fParticleChange) {
146 G4double maxEnergy = std::min(tmax, maxKinEnergy);
147 if(cutEnergy < maxEnergy) {
149 G4double totEnergy = kineticEnergy + mass;
150 G4double energy2 = totEnergy*totEnergy;
151 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
153 cross = 1.0/cutEnergy - 1.0/maxEnergy -
154 beta2*
G4Log(maxEnergy/cutEnergy)/tmax +
155 0.5*(maxEnergy - cutEnergy)/energy2;
158 if (maxEnergy > limitKinEnergy && kineticEnergy > limitRadCorrection) {
161 G4double logtmin =
G4Log(std::max(cutEnergy,limitKinEnergy));
162 G4double logstep = logtmax - logtmin;
165 for (
G4int ll=0; ll<8; ++ll) {
168 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - ep)/massSquare);
169 dcross += wgi[ll]*(1.0/ep - beta2/tmax + 0.5*ep/energy2)*a1*(a3 - a1);
171 cross += dcross*logstep*alphaprime;
173 cross *= CLHEP::twopi_mc2_rcl2/beta2;
190 (p,kineticEnergy,cutEnergy,maxEnergy);
205 (p,kineticEnergy,cutEnergy,maxEnergy);
218 G4double cutEnergy = std::min(cut, tmax);
228 G4double dedx =
G4Log(2.0*CLHEP::electron_mass_c2*bg2*cutEnergy/eexc2)
229 -(1.0 + cutEnergy/tmax)*beta2;
231 G4double totEnergy = kineticEnergy + mass;
232 G4double del = 0.5*cutEnergy/totEnergy;
243 if (cutEnergy > limitKinEnergy && kineticEnergy > limitRadCorrection) {
246 G4double logstep = logtmax - logLimitKinEnergy;
248 G4double ftot2= 0.5/(totEnergy*totEnergy);
250 for (
G4int ll=0; ll<8; ++ll) {
253 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - ep)/massSquare);
254 dloss += wgi[ll]*(1.0 - beta2*ep/tmax + ep*ep*ftot2)*a1*(a3 - a1);
256 dedx += dloss*logstep*alphaprime;
258 dedx *= CLHEP::twopi_mc2_rcl2*eDensity/beta2;
262 dedx = std::max(dedx, 0.);
269 std::vector<G4DynamicParticle*>* vdp,
277 G4double maxKinEnergy = std::min(maxEnergy, tmax);
278 if(minKinEnergy >= maxKinEnergy) {
return; }
280 G4double totEnergy = kineticEnergy + mass;
281 G4double etot2 = totEnergy*totEnergy;
282 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
285 G4bool radC = (tmax > limitKinEnergy && kineticEnergy > limitRadCorrection);
288 grej += alphaprime*
a0*
a0;
296 tkin = minKinEnergy*maxKinEnergy/(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
297 f = 1.0 - beta2*tkin/tmax + 0.5*tkin*tkin/etot2;
299 if(radC && tkin > limitKinEnergy) {
301 G4double a3 =
G4Log(4.0*totEnergy*(totEnergy - tkin)/massSquare);
302 f *= (1. + alphaprime*a1*(a3 - a1));
306 G4cout <<
"G4MuBetheBlochModel::SampleSecondary Warning! "
307 <<
"Majorant " << grej <<
" < "
308 << f <<
" for edelta= " << tkin
309 <<
" tmin= " << minKinEnergy <<
" max= " << maxKinEnergy
323 G4double deltaMom = std::sqrt(tkin * (tkin + 2.0*CLHEP::electron_mass_c2));
324 G4double totalMom = totEnergy*std::sqrt(beta2);
325 G4double cost = tkin * (totEnergy + CLHEP::electron_mass_c2) /
326 (deltaMom * totalMom);
327 cost = std::min(cost, 1.0);
328 const G4double sint = std::sqrt((1.0 - cost)*(1.0 + cost));
331 deltaDirection.
set(sint*std::cos(phi),sint*std::sin(phi), cost) ;
336 vdp->push_back(delta);
339 kineticEnergy -= tkin;
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
static G4Electron * Electron()
G4double HighOrderCorrections(const G4ParticleDefinition *, const G4Material *, const G4double kineticEnergy, const G4double cutEnergy)
G4double ShellCorrection(const G4ParticleDefinition *, const G4Material *, const 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
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, const G4Material *)=0
G4VEmAngularDistribution * GetAngularDistribution()
G4int SelectRandomAtomNumber(const G4Material *) const
void SetAngularDistribution(G4VEmAngularDistribution *)
G4bool UseAngularGeneratorFlag() const
G4ParticleChangeForLoss * GetParticleChangeForLoss()