88 G4double gMaxEnergy = (
pi*initialTotalEnergy)*(
pi*initialTotalEnergy);
90 G4double Zeff = std::sqrt(static_cast<G4double>(Z) * (static_cast<G4double>(Z) + 1.0));
91 z = (0.00008116224*(std::pow(Zeff,0.3333333)));
97 ((1-EnergyRatio)/(2.0*initialTotalEnergy*
EnergyRatio));
107 gMaximum =
std::max(gMaximum,gfunctionEmax);
109 G4double rand, gfunctionTest, randTest;
113 rand = rand/(1-rand+1.0/gMaxEnergy);
117 }
while(randTest > (gfunctionTest/gMaximum));
119 theta = std::sqrt(rand)/initialTotalEnergy;
141 G4cout <<
"Bremsstrahlung Angular Generator is 2BS Generator from 2BS Koch & Motz distribution (Rev Mod Phys 31(4), 920 (1959))" <<
G4endl;
142 G4cout <<
"Sampling algorithm adapted from PIRS-0203" <<
G4endl;
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double PolarAngle(const G4double initial_energy, const G4double final_energy, const G4int Z)
G4double rejection_argument2
const XML_Char int const XML_Char * value
static constexpr double electron_mass_c2
G4double rejection_argument1
G4double rejection_argument3
void PrintGeneratorInformation() const
G4GLOB_DLL std::ostream G4cout
G4RDGenerator2BS(const G4String &name)
G4double RejectionFunction(G4double value) const
static constexpr double pi