604 G4double mlrho4=((((3.517e-4*y+1.401e-2)*y+2.393e-1)*y+2.734)*y+2.220);
607 xx0=std::sqrt(bb2+std::sqrt(bb2*bb2+rho4));
610 xx0=ee+std::sqrt(ee*ee+beta*beta);
611 if(master->CheckNuclearCollision(A, a1, xx0*au))
return 0;
625 &root_error, &phip, &phip2)/au;
628 G4cout <<
"Screened Coulomb Root Finder Error" <<
G4endl;
629 G4cout <<
"au " << au <<
" A " << A <<
" a1 " << a1
630 <<
" xx1 " << xx1 <<
" eps " <<
eps
631 <<
" beta " << beta <<
G4endl;
638 <<
" target " << beta*beta*au*au ;
648 G4double lambda0=1.0/std::sqrt(0.5+beta*beta/(2.0*xx1*xx1)
649 -phiprime/(2.0*
eps));
656 G4double xvals[]={0.98302349, 0.84652241, 0.53235309, 0.18347974};
657 G4double weights[]={0.03472124, 0.14769029, 0.23485003, 0.18602489};
658 for(
G4int k=0; k<4; k++) {
661 ff=1.0/std::sqrt(1.0-
phifunc(x*au)/(x*
eps)-beta*beta/(x*x));
662 alpha+=weights[k]*ff;
670 G4double sintheta=std::sin(thetac1);
671 G4double costheta=-std::cos(thetac1);
680 G4double zeta=std::atan2(sintheta, 1-costheta);
G4_c2_const_ptr EMphiData
static const G4double eps
void set_function(const c2_function< float_type > *f)
c2_const_plugin_function_p< G4double > & phifunc
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
void reset(float_type x0, float_type y0, float_type slope)
Change the slope and intercepts after construction.
const c2_function< float_type > & get() const
get a reference to our owned function
the exception class for c2_function operations.
float_type find_root(float_type lower_bracket, float_type upper_bracket, float_type start, float_type value, int *error=0, float_type *final_yprime=0, float_type *final_yprime2=0) const
solve f(x)==value very efficiently, with explicit knowledge of derivatives of the function ...
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double pi
c2_linear_p< G4double > & xovereps
static const G4double alpha
void unset_function()
clear our function