Created attachment 720 [details] Patch (two lines) The entries in G4DensityEffectData.cc for G4_Mg and G4_Tm each have one-character typos which affect the evaluation of the Fermi density effect. The attached patch fixes this problem. The correct values are taken from Sternheimer, Berger and Seltzer 1984. I have attached the page with the relevant table. I am attaching plots showing the value of delta as a function of x = log(p/m). The fix makes the value of delta as a function of x look sensible for thulium. The shape of delta for magnesium is improved, but still looks suspect. I wonder if there is also a typo in the original tables. This fix only affects the situation in which pure elemental magnesium or thulium is used. Presumably this is a pretty rare case. Naturally it also has no effect if SetDensityEffectCalculatorFlag() is used.
Created attachment 721 [details] Table from Sternheimer, Berger and Seltzer 1984 Shows the values of the density effect parameters.
Created attachment 722 [details] Comparison before and after patch for G4_Tm Shows clear improvement for the value of delta as a function of x for G4_Tm. Now there is no discontinuity at x0.
Created attachment 723 [details] Comparison before and after patch for G4_Mg Shows the effect of the patch on delta as a function of x for G4_Mg. As I said above, the improvement is less obvious here. The new shape seems less wrong than the old shape, but the new shape is still not monotonic in x, as I think it has to be. Nevertheless, this is the result of using the values as given in Sternheimer et al.
Created attachment 727 [details] Patch (8 lines of code, 5 lines of comments) I did a thorough check through G4DensityEffectData.cc, comparing to Sternheimer's 1984 table and I found 6 other typos. The complete list of affected materials is: G4_Mg G4_Tm G4_Be G4_Fe G4_Y G4_BUTANE G4_MS20_TISSUE G4_UREA
Created attachment 728 [details] Tables from Sternheimer, Berger and Seltzer 1984 Tables from SBS 1984 paper showing all the values referenced in the patch.
Created attachment 729 [details] Change in delta with fix for all 8 materials Plots of the difference in delta values as a function of x when this patch is applied. Note the vertical scale. The changes are all quite small. The largest is for thulium. The different shapes of the changes reflect how the typos were in different parameters for the different materials. For instance, for MS20_TISSUE the typo was for -C, which means the asymptotic value of delta at high x is wrong.
Any reason not to accept this very simple patch?
Dear Matthew, Sorry, for unknown reasons the bugzilla system did not notify me of this report. We take you report on board. Marc
Thanks, Matthew, This was difficult to identify if directly not working with the density effect correction. The fix will be done 1st to master and also to 10.7 for a new patch. Vladimir
Hello, Matthew, Thank you very much for this report. the fix is integrated into Geant4 master. It will be backported to Geant4 11.0 and to 10.7. Cheers, Vladimir