75 G4double delta = 0.5*(std::sqrt(c*c+4.) + std::abs(c));
76 G4double signc = (c < 0.) ? -1.0 : 1.0;
82 return (cosTheta + beta)/(1 + cosTheta*
beta);
93 G4double sinTheta = std::sqrt((1 - cosTheta)*(1 + cosTheta));
109 G4double theta = std::acos(cosTheta);
129 G4double sint = std::sqrt((1. - cost)*(1. + cost));
131 dirElectron.
set(sint*cosp, sint*sinp, cost);
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"
void set(double x, double y, double z)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4DipBustGenerator(const G4String &name="")
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual ~G4DipBustGenerator()
const G4ThreeVector & GetMomentumDirection() const
G4double SampleCosTheta(G4double kinEnergy)
Hep3Vector & rotateUz(const Hep3Vector &)
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
G4double G4Log(G4double x)
virtual void PrintGeneratorInformation() const final
static constexpr double electron_mass_c2
G4double PolarAngle(G4double initial_energy, G4double final_energy, G4int Z)
static constexpr double twopi
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
G4ThreeVector fLocalDirection
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
T min(const T t1, const T t2)
brief Return the smallest of the two arguments