Geant4 Version:11.4.2
Operating System:Ubuntu22.04
Hello everyone,
While simulating deuteron-induced reactions in thin targets to generate neutrons, I noticed a strange behavior in the neutron energy spectrum. After some investigation, I found that this behavior was related to the use of the integral method for cross-section calculations.
In particular, I noticed a difference in how the method is implemented on the electromagnetic and hadronic sides of Geant4, and I would like to better understand this difference.
In the electromagnetic case (G4VEmProcess / G4EmParameters), the lambdaFactor (ξ, default value 0.8) used to estimate the maximum cross section σₘ over a step is exposed as a configurable parameter. It has a setter/getter (SetLambdaFactor / LambdaFactor), a UI command (/process/eLoss/lambdaFactor VALUE), input validation (0 < ξ < 1), and the documentation recommends keeping ξ consistent with dRoverRange, i.e. ξ + dRoverRange = 1, with a warning not to exceed 1.
In G4HadronicProcess.cc, however, the equivalent factor is defined as:
namespace
{
constexpr G4double lambdaFactor = 0.8;
constexpr G4double invLambdaFactor = 1.0/lambdaFactor;
}
Since these constants have internal linkage and are constexpr, and as far as I can tell there is no corresponding setter in G4HadronicParameters, no UI command, and no runtime configurability. The only way to change the value would therefore be to modify the source code and recompile Geant4.
This becomes relevant when changing dRoverRange. For example, if dRoverRange is reduced from 0.2 to a smaller value while ξ remains fixed at 0.8, the relation ξ + dRoverRange = 1 is no longer satisfied. In practice, this means that the cross section is not updated as frequently as one might expect from the chosen dRoverRange, but only when the particle loses at least 20% of its initial kinetic energy.
My question is therefore: is this difference between the electromagnetic and hadronic implementations intentional ?
I understand that the hadronic version of the algorithm is more elaborate than the electromagnetic one. In particular, it handles the fHadOnePeak and fHadTwoPeaks cases, including multiple peaks/dips in the cross section via G4TwoPeaksHadXS. I can therefore imagine that exposing this factor as a freely configurable parameter could be more delicate on the hadronic side than in the simpler single-peak EM case.
However, I was wondering why there is no way to tune this parameter for hadronic processes, especially since the EM documentation explicitly recommends keeping ξ consistent with dRoverRange. I have not found an equivalent recommendation or safeguard for the hadronic implementation.
Is there a particular reason why this parameter was never linked to dRoverRange or exposed as a configurable parameter for hadronic processes ?
In my particular case, I was able to obtain satisfactory results by using a step limiter to force a sufficiently large number of steps in the target, and by disabling the use of the integral method. However, I would like to make sure that this is an appropriate approach, or whether I am misunderstanding how the hadronic implementation of the integral method is intended to work.
Thanks in advance for any insight !
Mathieu