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) ;
618 gDirection.rotateUz(partDirection);
633 kineticEnergy -= (ElectronEnergy + PositronEnergy);
636 partDirection *= totalMomentum;
638 partDirection = partDirection.
unit();
642 vdp->push_back(aParticle1);
643 vdp->push_back(aParticle2);
G4double MaxSecondaryEnergyForElement(G4double kineticEnergy, G4double Z)
G4double GetKineticEnergy() const
const G4ParticleDefinition * particle
static constexpr double twopi
static constexpr double electron_mass_c2
static const G4int zdat[5]
const G4ThreeVector & GetMomentumDirection() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
G4double GetLOGZ(G4int Z) const
void SetProposedMomentumDirection(const G4ThreeVector &dir)
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double MeV
const G4Element * SelectRandomAtom(const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
G4ThreeVector GetMomentum() const