Photonuclear cross sections are tabulated in GEANT4 as a function of the nuclear mass number (A) of the nucleus, but the G4PhotoNuclearCrossSection class only provides functionality to retrieve the cross section as a function of the atomic number (Z), from which the average nuclear mass is looked up before determining the cross section. The (integer) difference between the average nuclear mass and the atomic number is taken as the neutron number (N), and the mass number is then calculated as A = Z + N, after which the cross section can be calculate. While this is generally incorrect for any given isotope, it is especially problematic for heavy isotopes of hydrogen, for which a special branch exists to (correctly) return a cross section of exactly 0 for photonuclear reactions on a single proton below the pion threshold (~140 MeV). The current implementation returns a cross section of exactly 0 for low energy reactions on all isotopes of hydrogen, not just A = 1, which is incorrect.
Created attachment 513 [details] Illustration of correcting the xs lookup for deuterium only Header file illustrating a correction to the xs lookup for deuterium only.
Created attachment 514 [details] Illustration of correcting the xs lookup for deuterium only Source file illustrating a correction to the xs lookup for deuterium only.
Your fix looks OK to me, but why did you place all instances of G4Log with std::log ? G4Log was specially designed to perform faster calculations than std::log.
Presumably you're referring to the energy bounds relevant to the mid-energy (100ish MeV - 50 GeV) interpolation scheme --- the project in which this was discovered is built against version 10.00.p02, in which std::log was the original implementation. Looking at the latest release (10.03.p03), G4Log is used.
Your fix was implemented. Thanks for reporting it.