97static const G4int nzdat = 5;
98static const G4int zdat[5] = {1, 4, 13, 29, 92};
101{ 0.0198550717512320, 0.1016667612931865, 0.2372337950418355, 0.4082826787521750,
102 0.5917173212478250, 0.7627662049581645, 0.8983332387068135, 0.9801449282487680 };
105{ 0.0506142681451880, 0.1111905172266870, 0.1568533229389435, 0.1813418916891810,
106 0.1813418916891810, 0.1568533229389435, 0.1111905172266870, 0.0506142681451880 };
115 factorForCross(
CLHEP::fine_structure_const*
CLHEP::fine_structure_const*
116 CLHEP::classic_electr_radius*
CLHEP::classic_electr_radius*
118 sqrte(sqrt(
G4Exp(1.))),
119 minPairEnergy(4.*
CLHEP::electron_mass_c2),
120 lowestKinEnergy(0.85*
CLHEP::GeV)
206 const G4double* theAtomicNumDensityVector =
211 G4double Z = (*theElementVector)[i]->GetZ();
214 dedx += loss*theAtomicNumDensityVector[i];
216 dedx = std::max(dedx, 0.0);
229 G4double cut = std::min(cutEnergy, tmax);
238 if(kkk > 8) { kkk = 8; }
239 else if (kkk < 1) { kkk = 1; }
243 for (
G4int l=0 ; l<kkk; ++l) {
244 for (
G4int ll=0; ll<8; ++ll) {
251 loss = std::max(loss, 0.0);
265 if (tmax <= cut) {
return cross; }
270 if(kkk > 8) { kkk = 8; }
271 else if (kkk < 1) { kkk = 1; }
276 for(
G4int l=0; l<kkk; ++l) {
277 for(
G4int i=0; i<8; ++i) {
285 cross = std::max(cross, 0.0);
300 static const G4double bbbh = 202.4 ;
301 static const G4double g1tf = 1.95e-5 ;
302 static const G4double g2tf = 5.3e-5 ;
303 static const G4double g1h = 4.4e-5 ;
304 static const G4double g2h = 4.8e-5 ;
310 G4double residEnergy = totalEnergy - pairEnergy;
315 G4double a0 = 1.0 / (totalEnergy * residEnergy);
316 G4double alf = 4.0 * electron_mass_c2 / pairEnergy;
319 G4double tmnexp = alf/(1.0 + rt) + delta*rt;
321 if(tmnexp >= 1.0) {
return 0.0; }
326 G4double massratio2 = massratio*massratio;
327 G4double inv_massratio2 = 1.0 / massratio2;
331 if(
Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
332 else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
339 if (z1exp > 35.221047195922)
342 zeta = (0.073 *
G4Log(z1exp) - 0.26) / (0.058 *
G4Log(z2exp) - 0.14);
357 for (
G4int i = 0; i < 8; ++i)
359 rho[i] =
G4Exp(tmn*xgi[i]) - 1.0;
360 rho2[i] = rho[i] * rho[i];
361 xi[i] = xi0*(1.0-rho2[i]);
362 xi1[i] = 1.0 + xi[i];
363 xii[i] = 1.0 / xi[i];
372 for (
G4int i = 0; i < 8; ++i)
374 G4double yeu = (b40 + 5.0) + (b40 - 1.0) * rho2[i];
375 G4double yed = b62*
G4Log(3.0 + xii[i]) + (2.0 * beta - 1.0)*rho2[i] - b40;
377 G4double ymu = b62 * (1.0 + rho2[i]) + 6.0;
378 G4double ymd = (b40 + 3.0)*(1.0 + rho2[i])*
G4Log(3.0 + xi[i])
379 + 2.0 - 3.0 * rho2[i];
381 ye1[i] = 1.0 + yeu / yed;
382 ym1[i] = 1.0 + ymu / ymd;
388 for(
G4int i = 0; i < 8; ++i) {
389 if(xi[i] <= 1000.0) {
390 be[i] = ((2.0 + rho2[i])*(1.0 + beta) +
391 xi[i]*(3.0 + rho2[i]))*
G4Log(1.0 + xii[i]) +
392 (1.0 - rho2[i] - beta)/xi1[i] - (3.0 + rho2[i]);
394 be[i] = 0.5*(3.0 - rho2[i] + 2.0*beta*(1.0 + rho2[i]))*xii[i];
398 G4double a10 = (1.0 + 2.0 * beta) * (1.0 - rho2[i]);
399 bm[i] = ((1.0 + rho2[i])*(1.0 + 1.5 * beta) - a10*xii[i])*
G4Log(xi1[i]) +
400 xi[i] * (1.0 - rho2[i] - beta)/xi1[i] + a10;
402 bm[i] = 0.5*(5.0 - rho2[i] + beta * (3.0 + rho2[i]))*xi[i];
408 for (
G4int i = 0; i < 8; ++i) {
409 G4double screen = screen0*xi1[i]/(1.0 - rho2[i]);
414 fe = std::max(
fe, 0.0);
417 G4double fm = std::max(alm_crm*bm[i], 0.0)*inv_massratio2;
419 sum += wgi[i]*(1.0 + rho[i])*(
fe + fm);
422 return -tmn*sum*
factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
438 G4double tmax = std::min(maxEnergy, maxPairEnergy);
440 if (cut >= tmax) {
return cross; }
443 if(tmax < kineticEnergy) {
455 for (
G4int iz=0; iz<nzdat; ++iz) {
461 for (
size_t it=0; it<=
nbine; ++it) {
463 pv->
PutY(it,
G4Log(kinEnergy/CLHEP::MeV));
474 size_t imax = (size_t)fac;
488 for (
size_t i=0; i<
nbiny; ++i) {
490 if(0 == it) { pv->
PutX(i, x); }
502 }
else if(i == imax) {
509 kinEnergy *= factore;
521 std::vector<G4DynamicParticle*>* vdp,
543 G4double maxEnergy = std::min(tmax, maxPairEnergy);
546 if(minEnergy >= maxEnergy) {
return; }
565 G4int iz1(0), iz2(0);
566 for(
G4int iz=0; iz<nzdat; ++iz) {
572 if(iz > 0) { iz1 = zdat[iz-1]; }
577 if(0 == iz1) { iz1 = iz2 = zdat[nzdat-1]; }
594 x += (x2 - x)*(
lnZ - lz1)/(lz2 - lz1);
597 pairEnergy = kinEnergy*
G4Exp(x*coeff);
600 }
while((pairEnergy < minEnergy || pairEnergy > maxEnergy) && 10 > count);
612 G4double eEnergy = (1.-r)*pairEnergy*0.5;
613 G4double pEnergy = pairEnergy - eEnergy;
620 eDirection, pDirection);
622 eEnergy = std::max(eEnergy - CLHEP::electron_mass_c2, 0.0);
623 pEnergy = std::max(pEnergy - CLHEP::electron_mass_c2, 0.0);
629 vdp->push_back(aParticle1);
630 vdp->push_back(aParticle2);
633 kinEnergy -= pairEnergy;
634 partDirection *= totalMomentum;
636 partDirection = partDirection.
unit();
645 vdp->push_back(newdp);
667 else { res = pv->
FindLinearX((pmin + rand*(pmax - pmin))/p0, logTkin); }
679 ed <<
"G4ElementData is not properly initialized Z= " <<
Z
680 <<
" Ekin(MeV)= " <<
G4Exp(logTkin)
681 <<
" IsMasterThread= " <<
IsMaster()
690 for (
G4int iz=0; iz<nzdat; ++iz) {
697 std::ostringstream ss;
699 std::ofstream outfile(ss.str());
711 std::ostringstream ost;
712 ost << path <<
"/mupair/";
718 for (
G4int iz=0; iz<nzdat; ++iz) {
721 std::ostringstream ss;
723 std::ifstream infile(ss.str(), std::ios::in);
std::vector< const G4Element * > G4ElementVector
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
static G4Electron * Electron()
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
G4Physics2DVector * GetElement2DData(G4int Z)
static G4EmParameters * Instance()
G4bool RetrieveMuDataFromFile() const
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetAtomicNumDensityVector() const
G4double ComputeMicroscopicCrossSection(G4double tkin, G4double Z, G4double cut)
void SetParticle(const G4ParticleDefinition *)
virtual void DataCorrupted(G4int Z, G4double logTkin) const
void MakeSamplingTables()
G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut, G4double tmax)
G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
G4MuPairProductionModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="muPairProd")
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double FindScaledEnergy(G4int Z, G4double rand, G4double logTkin, G4double yymin, G4double yymax)
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin, G4double Z, G4double pairEnergy)
const G4ParticleDefinition * particle
G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double) override
G4ParticleChangeForLoss * fParticleChange
G4double MaxSecondaryEnergyForElement(G4double kineticEnergy, G4double Z)
G4double GetLOGZ(G4int Z) const
static G4NistManager * Instance()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double GetPDGMass() const
const G4String & GetParticleName() const
G4bool Retrieve(std::ifstream &fIn)
void PutY(std::size_t idy, G4double value)
void Store(std::ofstream &fOut) const
G4double Value(G4double x, G4double y, std::size_t &lastidx, std::size_t &lastidy) const
void PutValue(std::size_t idx, std::size_t idy, G4double value)
void PutX(std::size_t idx, G4double value)
G4double FindLinearX(G4double rand, G4double y, std::size_t &lastidy) const
static G4Positron * Positron()
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr)
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4VEmAngularDistribution * GetAngularDistribution()
G4double LowEnergyLimit() const
std::vector< G4EmElementSelector * > * GetElementSelectors()
G4double HighEnergyLimit() const
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4ElementData * fElementData
void SetAngularDistribution(G4VEmAngularDistribution *)
const G4String & GetName() const
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
G4double SecondaryThreshold() const
G4ElementData * GetElementData()
G4ParticleChangeForLoss * GetParticleChangeForLoss()
void ProposeTrackStatus(G4TrackStatus status)