76 const G4double delta = 0.5*(std::sqrt(c*c+4.) + std::abs(c));
77 const G4double signc = (c < 0.) ? -1.0 : 1.0;
82 const G4double beta = std::sqrt(tau*(tau + 2.))/(tau + 1.);
84 return (cosTheta +
beta)/(1. + cosTheta*
beta);
95 const G4double sinTheta = std::sqrt((1. - cosTheta)*(1. + cosTheta));
111 G4double theta = std::acos(cosTheta);
126 const G4double sinp = std::sin(phi);
127 const G4double cosp = std::cos(phi);
130 G4double sint = std::sqrt((1. - cost)*(1. + cost));
132 dirElectron.
set(sint*cosp, sint*sinp, cost);
136 sint = std::sqrt((1. - cost)*(1. + cost));
138 dirPositron.
set(-sint*cosp, -sint*sinp, cost);
147 G4cout <<
"Angular Generator based on classical formula from" <<
G4endl;
148 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
G4double SampleCosTheta(G4double kinEnergy)
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
static constexpr double electron_mass_c2
static constexpr double twopi
static constexpr double pi
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