42 #ifndef G4DiffuseElastic_h
43 #define G4DiffuseElastic_h 1
279 G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
281 modvalue = std::fabs(value);
285 value2 = value*
value;
287 fact1 = 57568490574.0 + value2*(-13362590354.0
288 + value2*( 651619640.7
289 + value2*(-11214424.18
290 + value2*( 77392.33017
291 + value2*(-184.9052456 ) ) ) ) );
293 fact2 = 57568490411.0 + value2*( 1029532985.0
294 + value2*( 9494680.718
295 + value2*(59272.64853
296 + value2*(267.8532712
297 + value2*1.0 ) ) ) );
299 bessel = fact1/fact2;
307 shift = modvalue-0.785398164;
309 fact1 = 1.0 + value2*(-0.1098628627e-2
310 + value2*(0.2734510407e-4
311 + value2*(-0.2073370639e-5
312 + value2*0.2093887211e-6 ) ) );
314 fact2 = -0.1562499995e-1 + value2*(0.1430488765e-3
315 + value2*(-0.6911147651e-5
316 + value2*(0.7621095161e-6
317 - value2*0.934945152e-7 ) ) );
319 bessel = std::sqrt(0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2 );
331 G4double modvalue, value2, fact1, fact2, arg, shift, bessel;
333 modvalue = std::fabs(value);
335 if ( modvalue < 8.0 )
337 value2 = value*
value;
339 fact1 = value*(72362614232.0 + value2*(-7895059235.0
340 + value2*( 242396853.1
341 + value2*(-2972611.439
342 + value2*( 15704.48260
343 + value2*(-30.16036606 ) ) ) ) ) );
345 fact2 = 144725228442.0 + value2*(2300535178.0
346 + value2*(18583304.74
347 + value2*(99447.43394
348 + value2*(376.9991397
349 + value2*1.0 ) ) ) );
350 bessel = fact1/fact2;
358 shift = modvalue - 2.356194491;
360 fact1 = 1.0 + value2*( 0.183105e-2
361 + value2*(-0.3516396496e-4
362 + value2*(0.2457520174e-5
363 + value2*(-0.240337019e-6 ) ) ) );
365 fact2 = 0.04687499995 + value2*(-0.2002690873e-3
366 + value2*( 0.8449199096e-5
367 + value2*(-0.88228987e-6
368 + value2*0.105787412e-6 ) ) );
370 bessel = std::sqrt( 0.636619772/modvalue)*(std::cos(shift)*fact1 - arg*std::sin(shift)*fact2);
372 if (value < 0.0) bessel = -bessel;
388 if( std::fabs(x) < 0.01 )
390 df = 1./(1. + x/f2 + x*x/
f3 + x*x*x/
f4);
408 if( std::fabs(x) < 0.01 )
412 result = 2. - x2 + x2*x2/6.;
430 fBeta = a/std::sqrt(1+a*a);
534 G4double sinHalfTheta = std::sin(0.5*theta);
535 G4double sinHalfTheta2 = sinHalfTheta*sinHalfTheta;
543 G4double xsc = ch2/(sinHalfTheta2+am)/(sinHalfTheta2+am);
600 xsc /= (1 - c1 + am)*(1 - c2 + am);