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 };
82 limitKinEnergy(100.*keV),
83 logLimitKinEnergy(log(limitKinEnergy)),
84 twoln10(2.0*log(10.0)),
87 alphaprime(fine_structure_const/twopi)
95 mass = massSquare = ratio = 1.0;
97 if(p) { SetParticle(p); }
119 G4double tmax = 2.0*electron_mass_c2*tau*(tau + 2.) /
120 (1. + 2.0*(tau + 1.)*ratio + ratio*ratio);
129 if(p) { SetParticle(p); }
143 G4double maxEnergy = min(tmax,maxKinEnergy);
144 if(cutEnergy < maxEnergy) {
146 G4double totEnergy = kineticEnergy + mass;
147 G4double energy2 = totEnergy*totEnergy;
148 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/energy2;
150 cross = 1.0/cutEnergy - 1.0/maxEnergy - beta2*log(maxEnergy/cutEnergy)/tmax
151 + 0.5*(maxEnergy - cutEnergy)/energy2;
154 if (maxEnergy > limitKinEnergy) {
157 G4double logtmin = log(max(cutEnergy,limitKinEnergy));
158 G4double logstep = logtmax - logtmin;
161 for (
G4int ll=0; ll<8; ll++)
163 G4double ep = exp(logtmin + xgi[ll]*logstep);
164 G4double a1 = log(1.0 + 2.0*ep/electron_mass_c2);
165 G4double a3 = log(4.0*totEnergy*(totEnergy - ep)/massSquare);
166 dcross += wgi[ll]*(1.0/ep - beta2/tmax + 0.5*ep/energy2)*a1*(a3 - a1);
169 cross += dcross*logstep*alphaprime;
172 cross *= twopi_mc2_rcl2/beta2;
192 (p,kineticEnergy,cutEnergy,maxEnergy);
207 (p,kineticEnergy,cutEnergy,maxEnergy);
235 G4double dedx = log(2.0*electron_mass_c2*bg2*cutEnergy/eexc2)
236 -(1.0 + cutEnergy/tmax)*beta2;
238 G4double totEnergy = kineticEnergy + mass;
239 G4double del = 0.5*cutEnergy/totEnergy;
255 if (dedx < 0.0) dedx = 0.0 ;
258 if (cutEnergy > limitKinEnergy) {
261 G4double logstep = logtmax - logLimitKinEnergy;
263 G4double ftot2= 0.5/(totEnergy*totEnergy);
265 for (
G4int ll=0; ll<8; ll++)
267 G4double ep = exp(logLimitKinEnergy + xgi[ll]*logstep);
268 G4double a1 = log(1.0 + 2.0*ep/electron_mass_c2);
269 G4double a3 = log(4.0*totEnergy*(totEnergy - ep)/massSquare);
270 dloss += wgi[ll]*(1.0 - beta2*ep/tmax + ep*ep*ftot2)*a1*(a3 - a1);
272 dedx += dloss*logstep*alphaprime;
275 dedx *= twopi_mc2_rcl2*eDensity/beta2;
292 G4double maxKinEnergy = min(maxEnergy,tmax);
293 if(minKinEnergy >= maxKinEnergy) {
return; }
296 G4double totEnergy = kineticEnergy + mass;
297 G4double etot2 = totEnergy*totEnergy;
298 G4double beta2 = kineticEnergy*(kineticEnergy + 2.0*mass)/etot2;
301 if(tmax > limitKinEnergy) {
302 G4double a0 = log(2.*totEnergy/mass);
303 grej += alphaprime*a0*a0;
311 deltaKinEnergy = minKinEnergy*maxKinEnergy
312 /(minKinEnergy*(1.0 - q) + maxKinEnergy*q);
315 f = 1.0 - beta2*deltaKinEnergy/tmax
316 + 0.5*deltaKinEnergy*deltaKinEnergy/etot2;
318 if(deltaKinEnergy > limitKinEnergy) {
319 G4double a1 = log(1.0 + 2.0*deltaKinEnergy/electron_mass_c2);
320 G4double a3 = log(4.0*totEnergy*(totEnergy - deltaKinEnergy)/massSquare);
321 f *= (1. + alphaprime*a1*(a3 - a1));
325 G4cout <<
"G4MuBetheBlochModel::SampleSecondary Warning! "
326 <<
"Majorant " << grej <<
" < "
327 << f <<
" for edelta= " << deltaKinEnergy
328 <<
" tmin= " << minKinEnergy <<
" max= " << maxKinEnergy
336 sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
337 G4double totalMomentum = totEnergy*sqrt(beta2);
338 G4double cost = deltaKinEnergy * (totEnergy + electron_mass_c2) /
339 (deltaMomentum * totalMomentum);
341 G4double sint = sqrt(1.0 - cost*cost);
345 G4ThreeVector deltaDirection(sint*cos(phi),sint*sin(phi), cost) ;
350 kineticEnergy -= deltaKinEnergy;
351 G4ThreeVector dir = totalMomentum*direction - deltaMomentum*deltaDirection;
352 direction = dir.
unit();
358 deltaDirection,deltaKinEnergy);
359 vdp->push_back(delta);
G4DLLIMPORT std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() 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 GetMeanExcitationEnergy() const
G4double DensityCorrection(G4double x)
static G4LossTableManager * Instance()
G4EmCorrections * EmCorrections()
const G4Material * GetMaterial() const
G4IonisParamMat * GetIonisation() const
G4double GetElectronDensity() const
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
virtual G4double CrossSectionPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *, G4double kinEnergy)
virtual ~G4MuBetheBlochModel()
G4MuBetheBlochModel(const G4ParticleDefinition *p=0, const G4String &nam="MuBetheBloch")
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *)
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double MaxSecondaryKinEnergy(const G4DynamicParticle *dynParticle)
G4ParticleChangeForLoss * GetParticleChangeForLoss()