41 GGcout(
"GGEMSComptonScattering",
"GGEMSComptonScattering", 3) <<
"GGEMSComptonScattering creating..." <<
GGendl;
46 if (primary_particle !=
"gamma") {
47 std::ostringstream oss(std::ostringstream::out);
48 oss <<
"For Compton scattering, incident particle has to be a 'gamma'";
57 GGcout(
"GGEMSComptonScattering",
"GGEMSComptonScattering", 3) <<
"GGEMSComptonScattering created!!!" <<
GGendl;
66 GGcout(
"GGEMSComptonScattering",
"~GGEMSComptonScattering", 3) <<
"GGEMSComptonScattering erasing..." <<
GGendl;
68 GGcout(
"GGEMSComptonScattering",
"~GGEMSComptonScattering", 3) <<
"GGEMSComptonScattering erased!!!" <<
GGendl;
77 GGfloat cross_section_by_atom = 0.0f;
79 if (atomic_number < 1 || energy < 1e-4f) {
return cross_section_by_atom;}
81 GGfloat p1Z = atomic_number * ( 2.7965e-23f + 1.9756e-27f*atomic_number + -3.9178e-29f*atomic_number*atomic_number);
82 GGfloat p2Z = atomic_number * (-1.8300e-23f + -1.0205e-24f*atomic_number + 6.8241e-27f*atomic_number*atomic_number);
83 GGfloat p3Z = atomic_number * ( 6.7527e-22f + -7.3913e-24f*atomic_number + 6.0480e-27f*atomic_number*atomic_number);
84 GGfloat p4Z = atomic_number * (-1.9798e-21f + 2.7079e-24f*atomic_number + 3.0274e-26f*atomic_number*atomic_number);
85 GGfloat T0 = (atomic_number < 1.5f)? 40.0e-3f : 15.0e-3f;
89 cross_section_by_atom = p1Z*logf(1.0f+2.0f*d1)/d1+(p2Z+p3Z*d1+p4Z*d1*d1)/(1.0f+20.0f*d1+230.0f*d1*d1+440.0f*d1*d1*d1);
93 d2 = p1Z*logf(1.0f+2.0f*d1)/d1+(p2Z+p3Z*d1+p4Z*d1*d1)/(1.0f+20.0f*d1+230.0f*d1*d1+440.0f*d1*d1*d1);
94 d3 = (-T0 * (d2 - cross_section_by_atom)) / (cross_section_by_atom*1.0e-3f);
95 d4 = (atomic_number > 1.5f)? 0.375f-0.0556f*logf(atomic_number) : 0.15f;
96 d5 = logf(energy / T0);
97 cross_section_by_atom *= expf(-d5 * (d3 + d4*d5));
100 return cross_section_by_atom;