98   { 0.0199, 0.1017, 0.2372, 0.4083, 0.5917, 0.7628, 0.8983, 0.9801 };
 
  100   { 0.0506, 0.1112, 0.1569, 0.1813, 0.1813, 0.1569, 0.1112, 0.0506 };
 
  114     fParticleChange(nullptr),
 
  116     lowestKinEnergy(1.0*
GeV),
 
  136   emin = lowestKinEnergy;
 
  151   return std::max(lowestKinEnergy,cut);
 
  169     nbine = size_t(nYBinPerDecade*std::log10(emax/emin));
 
  170     if(nbine < 3) { nbine = 3; }
 
  172     ymin = 
G4Log(minPairEnergy/emin);
 
  180       MakeSamplingTables(); 
 
  206   if (cutEnergy <= minPairEnergy || kineticEnergy <= lowestKinEnergy)
 
  210   const G4double* theAtomicNumDensityVector =
 
  215      G4double Z = (*theElementVector)[i]->GetZ();
 
  218      dedx += loss*theAtomicNumDensityVector[i];
 
  234   if(cut <= minPairEnergy) { 
return loss; }
 
  242   if (kkk > 8)      { kkk = 8; }
 
  243   else if (kkk < 1) { kkk = 1; }
 
  248   for (
G4int l=0 ; l<kkk; l++)
 
  251     for (
G4int ll=0; ll<8; ll++)
 
  273   if (tmax <= cut) { 
return cross; }
 
  280   if(kkk > 8) { kkk = 8; }
 
  281   else if (kkk < 1) { kkk = 1; }
 
  286   for(
G4int l=0; l<kkk; ++l)
 
  288     for(
G4int i=0; i<8; ++i)
 
  312   static const G4double bbbh = 202.4 ;
 
  313   static const G4double g1tf = 1.95e-5 ;
 
  314   static const G4double g2tf = 5.3e-5 ;
 
  315   static const G4double g1h  = 4.4e-5 ;
 
  316   static const G4double g2h  = 4.8e-5 ;
 
  319   G4double residEnergy  = totalEnergy - pairEnergy;
 
  321   G4double massratio2   = massratio*massratio;
 
  325   if (residEnergy <= c3*
z13) { 
return cross; }
 
  331   if (a3 <= 0.) { 
return cross; }
 
  335   if( Z < 1.5 ) { bbb = bbbh ; g1 = g1h ; g2 = g2h ; }
 
  336   else          { bbb = bbbtf; g1 = g1tf; g2 = g2tf; }
 
  340     0.073*
G4Log(totalEnergy/(particleMass+g1*
z23*totalEnergy))-0.26;
 
  344       0.058*
G4Log(totalEnergy/(particleMass+g2*z13*totalEnergy))-0.14;
 
  357   G4double tmnexp = alf/(1. + rta3) + del*rta3;
 
  358   if(tmnexp >= 1.0) { 
return cross; }
 
  364   for (
G4int i=0; i<8; ++i)
 
  378     G4double ale = 
G4Log(bbb/z13*sqrt(xi1*ye1)/(1.+screen*ye1)) ;
 
  383       be = ((2.+a6)*(1.+bet)+xi*a9)*
G4Log(1.+xii)+(a5-bet)/xi1-a9;
 
  385       be = (3.-a6+a1*a7)/(2.*xi);
 
  388     if ( fe < 0.) fe = 0. ;
 
  398       bm  = (a7*(1.+1.5*bet)-a10*xii)*
G4Log(xi1)+xi*(a5-bet)/xi1+a10;
 
  400       bm = (5.-a6+bet*a9)*(xi/2.);
 
  404     if ( fm < 0.) { fm = 0.; }
 
  406     sum += 
wgi[i]*a4*(fe+fm/massratio2);
 
  409   cross = -tmn*sum*
factorForCross*z2*residEnergy/(totalEnergy*pairEnergy);
 
  424   if (kineticEnergy <= lowestKinEnergy) { 
return cross; }
 
  429   if (cut >= tmax) { 
return cross; }
 
  432   if(tmax < kineticEnergy) {
 
  440 void G4MuPairProductionModel::MakeSamplingTables()
 
  444   for (
G4int iz=0; iz<nzdat; ++iz) {
 
  450     for (
size_t it=0; it<=nbine; ++it) {
 
  463       size_t imax   = (size_t)fac;
 
  475       if(0 == it) { pv->
PutX(nbiny, 0.0); }
 
  477       for (
size_t i=0; i<nbiny; ++i) {
 
  479         if(0 == it) { pv->
PutX(i, x); }
 
  491         } 
else if(i == imax) {
 
  498       kinEnergy *= factore;
 
  501       if(it+1 == nbine) { kinEnergy = emax; }
 
  510                               std::vector<G4DynamicParticle*>* vdp, 
 
  522     sqrt(kineticEnergy*(kineticEnergy + 2.0*particleMass));
 
  535   if(minEnergy >= maxEnergy) { 
return; }
 
  554   G4int iz1(0), iz2(0);
 
  555   for(
G4int iz=0; iz<nzdat; ++iz) { 
 
  561       if(iz > 0) { iz1 = 
zdat[iz-1]; }
 
  566   if(0 == iz1) { iz1 = iz2 = 
zdat[nzdat-1]; }
 
  576     G4double x = FindScaledEnergy(iz1, rand, logTkin, yymin, yymax);
 
  578       G4double x2 = FindScaledEnergy(iz2, rand, logTkin, yymin, yymax);
 
  583       x += (x2 - 
x)*(
lnZ - lz1)/(lz2 - lz1);
 
  586     PairEnergy = kineticEnergy*
G4Exp(x*coeff);
 
  589   } 
while((PairEnergy < minEnergy || PairEnergy > maxEnergy) && 10 > count);
 
  596     (1.-6.*particleMass*particleMass/(totalEnergy*(totalEnergy-PairEnergy)))
 
  597                                        *sqrt(1.-minPairEnergy/PairEnergy);
 
  601   G4double ElectronEnergy = (1.-r)*PairEnergy*0.5;
 
  602   G4double PositronEnergy = PairEnergy - ElectronEnergy;
 
  615   G4double dirx  = sint*cos(phi), diry = sint*sin(phi), dirz = cos(theta) ;
 
  633   kineticEnergy -= (ElectronEnergy + PositronEnergy);
 
  636   partDirection *= totalMomentum;
 
  638   partDirection = partDirection.
unit();
 
  642   vdp->push_back(aParticle1);
 
  643   vdp->push_back(aParticle2);
 
  649 void G4MuPairProductionModel::DataCorrupted(
G4int Z, 
G4double logTkin)
 
  652   ed << 
"G4ElementData is not properly initialized Z= " << Z
 
  653      << 
" Ekin(MeV)= " << 
G4Exp(logTkin)
 
  654      << 
" IsMasterThread= " << 
IsMaster() 
 
G4double MaxSecondaryEnergyForElement(G4double kineticEnergy, G4double Z)
G4double LowEnergyLimit() const 
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
static const G4double xgi[8]
G4ParticleChangeForLoss * GetParticleChangeForLoss()
std::vector< G4Element * > G4ElementVector
std::ostringstream G4ExceptionDescription
G4double GetKineticEnergy() const 
void InitialiseElementSelectors(const G4ParticleDefinition *, const G4DataVector &)
const G4ParticleDefinition * particle
G4double HighEnergyLimit() const 
static const G4double ak2
G4MuPairProductionModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="muPairProd")
void SetParticle(const G4ParticleDefinition *)
G4ElementData * GetElementData()
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
const G4ElementVector * GetElementVector() const 
static G4NistManager * Instance()
static constexpr double twopi
static constexpr double electron_mass_c2
G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut, G4double tmax)
static constexpr double TeV
void PutValue(size_t idx, size_t idy, G4double value)
G4double ComputeMicroscopicCrossSection(G4double tkin, G4double Z, G4double cut)
static const G4int zdat[5]
void InitialiseForElement(G4int Z, G4PhysicsVector *v)
virtual G4double ComputeDEDXPerVolume(const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy) override
static const G4double sqrte
const G4ThreeVector & GetMomentumDirection() const 
static const G4double ak1
Hep3Vector & rotateUz(const Hep3Vector &)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double GetLOGZ(G4int Z) const 
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. 
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]
static constexpr double GeV
static G4Electron * Electron()
static const G4double fac
static constexpr double MeV
const G4String & GetName() const 
static constexpr double pi
size_t GetNumberOfElements() const 
void PutY(size_t idy, G4double value)
G4ElementData * fElementData
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
virtual ~G4MuPairProductionModel()
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
virtual void InitialiseLocal(const G4ParticleDefinition *, G4VEmModel *masterModel) override
G4ThreeVector GetMomentum() const 
virtual G4double MinPrimaryEnergy(const G4Material *, const G4ParticleDefinition *, G4double) override