81 G4double sint = std::sqrt((1 - cost)*(1 + cost));
97 G4double uMax = 2*(1. + kinEnergy/CLHEP::electron_mass_c2);
101 static const G4double border = 0.25;
107 u = (border > rndmEngine->
flat()) ? uu*a1 : uu*a2;
112 return 1.0 - 2.0*u*u/(uMax*uMax);
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 <<
"Bremsstrahlung Angular Generator is Modified Tsai" <<
G4endl;
147 G4cout <<
"Distribution suggested by L.Urban (Geant3 manual (1993) Phys211)"
149 G4cout <<
"Derived from Tsai distribution (Rev Mod Phys 49,421(1977)) \n"
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4ModifiedTsai(const G4String &name="")
G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
void PrintGeneratorInformation() const final
~G4ModifiedTsai() override
void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
G4ThreeVector fLocalDirection