207 if(index > index_max) { index = index_max; }
208 else if(index < 0) { index = 0; }
215 if(index < index_max) { A =
std::max(A, Atab[index+1]); }
228 cte2 = 2*c/std::log(1+c*
pi2);
231 t = std::sqrt((
G4Exp(2*c*y/cte2)-1)/c);
237 dmax = A*std::pow(k,-
b)*t/(1+c*t*t);
241 if(ds > dmax && nwarn >= 20) {
243 G4cout <<
"### WARNING in G4Generator2BN: Ekin(MeV)= " << Ek/
MeV
244 <<
" D(Ekin,k)/Dmax-1= " << (ds/dmax - 1)
245 <<
" results are not reliable!"
248 G4cout <<
" WARNING in G4Generator2BN is closed" <<
G4endl;
void set(double x, double y, double z)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4double Calculatedsdkdt(G4double kout, G4double theta, G4double Eel) const
static constexpr double twopi
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
const G4ThreeVector & GetMomentumDirection() const
Hep3Vector & rotateUz(const Hep3Vector &)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static constexpr double MeV
G4ThreeVector fLocalDirection
static constexpr double pi
virtual G4ThreeVector & SampleDirection(const G4DynamicParticle *dp, G4double out_energy, G4int Z, const G4Material *mat=0)
static constexpr double pi2