Problem 2572

Summary: Possible Issue with Calculating Effective Charge of a Material
Product: Geant4 Reporter: txenglish
Component: processes/electromagnetic/utilsAssignee: Vladimir.Ivantchenko
Status: RESOLVED FIXED    
Severity: normal    
Priority: P4    
Version: other   
Hardware: All   
OS: All   
Attachments: Snippet of code from G4EmSaturation.cc

Description txenglish 2023-10-30 21:13:20 CET
Created attachment 832 [details]
Snippet of code from G4EmSaturation.cc

In the G4EmSaturation.cc file, under FindBirksCoefficient, it seems that the calculation of the effective charge of the material is incorrect. The attachment shows the snippet of code where curChargeSq is initially set to 0.0, but as the loop goes over all of the elements in the material the curChargeSq is overwritten each time. So the last element of the material is the only one that contributes to the calculation. I believe this should instead have curChargeSq += Z*Z*w
Comment 1 Vladimir.Ivantchenko 2023-11-07 11:58:31 CET
Hello,

thank you very much for this report! This typo make computations incorrect. The fix will be available in the new public version 11.2 (December, 2023). Likely will be backported to the new patches for the previous versions of Geant4.


VI
Comment 2 Vladimir.Ivantchenko 2023-12-12 11:26:01 CET
Hello,

in the new Geant4 11.2 the problem is fixed, this report is left opened until it will be backported to previous release.

VI
Comment 3 Vladimir.Ivantchenko 2023-12-14 22:18:55 CET
Hello,

the fix is backported to 11.1.3. It was decided not backport further for earlier  release. So, it is resolved and closed.

VI