82 G4double sint = std::sqrt((1 - cost)*(1 + cost));
98 G4double uMax = 2*(1. + kinEnergy/CLHEP::electron_mass_c2);
102 static const G4double border = 0.25;
108 u = (border > rndmEngine->
flat()) ? uu*a1 : uu*a2;
113 return 1.0 - 2.0*u*u/(uMax*uMax);
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 <<
"Bremsstrahlung Angular Generator is Modified Tsai" <<
G4endl;
148 G4cout <<
"Distribution suggested by L.Urban (Geant3 manual (1993) Phys211)"
150 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
virtual ~G4ModifiedTsai()
G4ModifiedTsai(const G4String &name="")
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=nullptr) final
virtual void PrintGeneratorInformation() const final
virtual void SamplePairDirections(const G4DynamicParticle *dp, G4double elecKinEnergy, G4double posiKinEnergy, G4ThreeVector &dirElectron, G4ThreeVector &dirPositron, G4int Z=0, const G4Material *mat=nullptr) final
G4ThreeVector fLocalDirection