87 EnergyRatio = finalTotalEnergy/initialTotalEnergy;
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)));
94 rejection_argument1 = (1.0+EnergyRatio*EnergyRatio);
95 rejection_argument2 = - 2.0*EnergyRatio + 3.0*rejection_argument1;
96 rejection_argument3 = ((1-EnergyRatio)/(2.0*initialTotalEnergy*EnergyRatio))*
97 ((1-EnergyRatio)/(2.0*initialTotalEnergy*EnergyRatio));
106 G4double gMaximum = std::max(gfunction0,gfunction1);
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;
131 G4double gfunction = (4+std::log(rejection_argument3+(z/argument)))*
132 ((4*EnergyRatio*value/argument)-rejection_argument1)+rejection_argument2;
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;