93 const G4int G4MuPairProductionModel::zdat[]={1, 4, 13, 29, 92};
94 const G4double G4MuPairProductionModel::adat[]={1.01, 9.01,26.98, 63.55, 238.03};
96 0.5917, 0.7628, 0.8983, 0.9801 };
98 0.1813, 0.1569, 0.1112, 0.0506 };
110 sqrte(sqrt(
G4Exp(1.))),
114 lowestKinEnergy(1.0*
GeV),
133 if(limit > lowestKinEnergy) { lowestKinEnergy = limit; }
135 emin = lowestKinEnergy;
150 return std::max(lowestKinEnergy,cut);
164 nbine = size_t(nYBinPerDecade*std::log10(emax/emin));
165 if(nbine < 3) { nbine = 3; }
167 ymin =
G4Log(minPairEnergy/emin);
175 MakeSamplingTables();
203 if (cutEnergy <= minPairEnergy || kineticEnergy <= lowestKinEnergy)
207 const G4double* theAtomicNumDensityVector =
212 G4double Z = (*theElementVector)[i]->GetZ();
215 dedx += loss*theAtomicNumDensityVector[i];
217 if (dedx < 0.) { dedx = 0.; }
231 if(cut <= minPairEnergy) {
return loss; }
241 if (kkk > 8) { kkk = 8; }
242 else if (kkk < 1) { kkk = 1; }
247 for (
G4int l=0 ; l<kkk; l++)
250 for (
G4int ll=0; ll<8; ll++)
258 if (loss < 0.) loss = 0.;
272 if (tmax <= cut) {
return cross; }
279 if(kkk > 8) { kkk = 8; }
280 else if (kkk < 1) { kkk = 1; }
285 for(
G4int l=0; l<kkk; ++l)
287 for(
G4int i=0; i<8; ++i)
296 if(cross < 0.0) { cross = 0.0; }
311 static const G4double bbbh = 202.4 ;
312 static const G4double g1tf = 1.95e-5 ;
313 static const G4double g2tf = 5.3e-5 ;
314 static const G4double g1h = 4.4e-5 ;
315 static const G4double g2h = 4.8e-5 ;
318 G4double residEnergy = totalEnergy - pairEnergy;
320 G4double massratio2 = massratio*massratio ;
324 if (residEnergy <= c3*
z13) {
return cross; }
326 G4double c7 = 4.*CLHEP::electron_mass_c2;
330 if (a3 <= 0.) {
return cross; }
334 if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
335 else { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
339 0.073*
G4Log(totalEnergy/(particleMass+g1*
z23*totalEnergy))-0.26;
343 0.058*
G4Log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
349 G4double a0 = totalEnergy*residEnergy;
350 G4double a1 = pairEnergy*pairEnergy/a0;
356 G4double tmnexp = alf/(1. + rta3) + del*rta3;
357 if(tmnexp >= 1.0) {
return cross; }
363 for (
G4int i=0; i<8; ++i)
377 G4double ale =
G4Log(bbb/z13*sqrt(xi1*ye1)/(1.+screen*ye1)) ;
382 be = ((2.+a6)*(1.+bet)+xi*a9)*
G4Log(1.+xii)+(a5-bet)/xi1-a9;
384 be = (3.-a6+a1*a7)/(2.*xi);
387 if ( fe < 0.) fe = 0. ;
397 bm = (a7*(1.+1.5*bet)-a10*xii)*
G4Log(xi1)+xi*(a5-bet)/xi1+a10;
399 bm = (5.-a6+bet*a9)*(xi/2.);
403 if ( fm < 0.) { fm = 0.; }
405 sum +=
wgi[i]*a4*(fe+fm/massratio2);
408 cross = -tmn*sum*
factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
409 if(cross < 0.0) { cross = 0.0; }
423 if (kineticEnergy <= lowestKinEnergy) {
return cross; }
428 if (cut >= tmax) {
return cross; }
431 if(tmax < kineticEnergy) {
439 void G4MuPairProductionModel::MakeSamplingTables()
449 for (
size_t it=0; it<=nbine; ++it) {
462 size_t imax = (size_t)fac;
474 if(0 == it) { pv->
PutX(nbiny, 0.0); }
476 for (
size_t i=0; i<nbiny; ++i) {
478 if(0 == it) { pv->
PutX(i, x); }
490 }
else if(i == imax) {
497 kinEnergy *= factore;
500 if(it+1 == nbine) { kinEnergy = emax; }
509 std::vector<G4DynamicParticle*>* vdp,
521 sqrt(kineticEnergy*(kineticEnergy + 2.0*particleMass));
534 if(minEnergy >= maxEnergy) {
return; }
553 G4int iz1(0), iz2(0);
560 if(iz > 0) { iz1 = zdat[iz-1]; }
565 if(0 == iz1) { iz1 = iz2 = zdat[nzdat-1]; }
575 G4double x = FindScaledEnergy(iz1, rand, logTkin, yymin, yymax);
577 G4double x2 = FindScaledEnergy(iz2, rand, logTkin, yymin, yymax);
582 x += (x2 -
x)*(
lnZ - lz1)/(lz2 - lz1);
585 PairEnergy = kineticEnergy*
G4Exp(x*coeff);
587 }
while((PairEnergy < minEnergy || PairEnergy > maxEnergy) && 10 > count);
594 (1.-6.*particleMass*particleMass/(totalEnergy*(totalEnergy-PairEnergy)))
595 *sqrt(1.-minPairEnergy/PairEnergy);
599 G4double ElectronEnergy = (1.-
r)*PairEnergy*0.5;
600 G4double PositronEnergy = PairEnergy - ElectronEnergy;
613 G4double dirx = sint*cos(phi), diry = sint*sin(phi), dirz = cos(theta) ;
631 kineticEnergy -= (ElectronEnergy + PositronEnergy);
634 partDirection *= totalMomentum;
636 partDirection = partDirection.
unit();
640 vdp->push_back(aParticle1);
641 vdp->push_back(aParticle2);
647 void G4MuPairProductionModel::DataCorrupted(
G4int Z,
G4double logTkin)
650 ed <<
"G4ElementData is not properly initialized Z= " << Z
651 <<
" Ekin(MeV)= " <<
G4Exp(logTkin)
652 <<
" IsMasterThread= " <<
IsMaster()
G4double MaxSecondaryEnergyForElement(G4double kineticEnergy, G4double Z)
G4double LowEnergyLimit() const
static const G4double xgi[8]
G4ParticleChangeForLoss * GetParticleChangeForLoss()
std::vector< G4Element * > G4ElementVector
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const
G4MuPairProductionModel(const G4ParticleDefinition *p=0, const G4String &nam="muPairProd")
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
const G4ParticleDefinition * particle
G4double HighEnergyLimit() const
void SetParticle(const G4ParticleDefinition *)
G4ElementData * GetElementData()
const G4ElementVector * GetElementVector() const
static G4NistManager * Instance()
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy)
G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut, G4double tmax)
void PutValue(size_t idx, size_t idy, G4double value)
G4double ComputeMicroscopicCrossSection(G4double tkin, G4double Z, G4double cut)
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel)
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
std::vector< G4EmElementSelector * > * GetElementSelectors()
void SetProposedMomentumDirection(const G4ThreeVector &dir)
const G4double * GetAtomicNumDensityVector() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double)
static G4Positron * Positron()
void SetElementSelectors(std::vector< G4EmElementSelector * > *)
G4double GetPDGMass() const
void PutX(size_t idx, G4double value)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4double ComputeDMicroscopicCrossSection(G4double tkin, G4double Z, G4double pairEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static const G4double wgi[8]
G4double GetLOGZ(G4int Z)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
static G4Electron * Electron()
const G4String & GetName() const
size_t GetNumberOfElements() const
void PutY(size_t idy, G4double value)
G4ElementData * fElementData
virtual ~G4MuPairProductionModel()
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4ThreeVector GetMomentum() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)