75 const G4double delta = 0.5*(std::sqrt(c*c+4.) + std::abs(c));
76 const G4double signc = (c < 0.) ? -1.0 : 1.0;
79 const G4double cosTheta = std::min(1.,std::max(-1.,cofA - 1./cofA));
80 const G4double tau = kinEnergy/CLHEP::electron_mass_c2;
81 const G4double beta = std::sqrt(tau*(tau + 2.))/(tau + 1.);
83 return (cosTheta + beta)/(1. + cosTheta*beta);
94 const G4double sinTheta = std::sqrt((1. - cosTheta)*(1. + cosTheta));
109 const G4double cosTheta = SampleCosTheta(eTkin);
110 G4double theta = std::acos(cosTheta);
111 theta = std::min(std::max(theta, 0.), CLHEP::pi);
125 const G4double sinp = std::sin(phi);
126 const G4double cosp = std::cos(phi);
128 G4double cost = SampleCosTheta(elecKinEnergy);
129 G4double sint = std::sqrt((1. - cost)*(1. + cost));
131 dirElectron.
set(sint*cosp, sint*sinp, cost);
134 cost = SampleCosTheta(posiKinEnergy);
135 sint = std::sqrt((1. - cost)*(1. + cost));
137 dirPositron.
set(-sint*cosp, -sint*sinp, cost);
146 G4cout <<
"Angular Generator based on classical formula from" <<
G4endl;
147 G4cout <<
"J.D. Jackson, Classical Electrodynamics, Wiley, New York 1975"
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
void PrintGeneratorInformation() const final
G4double PolarAngle(G4double initial_energy, G4double final_energy, G4int Z)
~G4DipBustGenerator() override
void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
G4DipBustGenerator(const G4String &name="")
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Pow * GetInstance()
G4double A13(G4double A) const
G4ThreeVector fLocalDirection