68 G4double c, cosTheta, delta, cofA, signc = 1., a, power = 1./3.;
80 delta = std::sqrt(a*a+4.);
84 cofA = -signc*std::pow(delta, power);
86 cosTheta = cofA - 1./cofA;
88 G4double tau = eTkin/electron_mass_c2;
89 G4double beta = std::sqrt(tau*(tau + 2.))/(tau + 1.);
91 cosTheta = (cosTheta + beta)/(1 + cosTheta*beta);
93 G4double sinTheta = std::sqrt((1 - cosTheta)*(1 + cosTheta));
107 G4double c, cosTheta, delta, cofA, signc = 1., a, power = 1./3.;
118 delta = std::sqrt(a*a+4.);
122 cofA = -signc*std::pow(delta, power);
124 cosTheta = cofA - 1./cofA;
126 gamma = 1. + eTkin/electron_mass_c2;
127 beta = std::sqrt(1. - 1./gamma/gamma);
129 cosTheta = (cosTheta + beta)/(1 + cosTheta*beta);
131 theta = std::acos(cosTheta);
133 if( theta < 0. ) theta = 0.;
134 if( theta > pi ) theta = pi;
143 G4cout <<
"Angular Generator based on classical formula from" <<
G4endl;
144 G4cout <<
"J.D. Jackson, Classical Electrodynamics, Wiley, New York 1975"
G4DLLIMPORT std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
G4double PolarAngle(const G4double initial_energy, const G4double final_energy, const G4int Z)
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=0)
void PrintGeneratorInformation() const
G4DipBustGenerator(const G4String &name="")
virtual ~G4DipBustGenerator()
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4ThreeVector fLocalDirection