76 const G4double delta = 0.5*(std::sqrt(c*c+4.) + std::abs(c));
77 const G4double signc = (c < 0.) ? -1.0 : 1.0;
80 const G4double cosTheta = std::min(1.,std::max(-1.,cofA - 1./cofA));
81 const G4double tau = kinEnergy/CLHEP::electron_mass_c2;
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));
110 const G4double cosTheta = SampleCosTheta(eTkin);
111 G4double theta = std::acos(cosTheta);
112 theta = std::min(std::max(theta, 0.), CLHEP::pi);
126 const G4double sinp = std::sin(phi);
127 const G4double cosp = std::cos(phi);
129 G4double cost = SampleCosTheta(elecKinEnergy);
130 G4double sint = std::sqrt((1. - cost)*(1. + cost));
132 dirElectron.
set(sint*cosp, sint*sinp, cost);
135 cost = SampleCosTheta(posiKinEnergy);
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 &)
virtual void PrintGeneratorInformation() const final
G4double PolarAngle(G4double initial_energy, G4double final_energy, G4int Z)
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
G4DipBustGenerator(const G4String &name="")
virtual ~G4DipBustGenerator()
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
static G4Pow * GetInstance()
G4double A13(G4double A) const
G4ThreeVector fLocalDirection