Problem 2572 - Possible Issue with Calculating Effective Charge of a Material
Summary: Possible Issue with Calculating Effective Charge of a Material
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic/utils (show other problems)
Version: other
Hardware: All All
: P4 normal
Assignee: Vladimir.Ivantchenko
URL:
Depends on:
Blocks:
 
Reported: 2023-10-30 21:13 CET by txenglish
Modified: 2023-12-14 22:18 CET (History)
0 users

See Also:


Attachments
Snippet of code from G4EmSaturation.cc (52.94 KB, image/png)
2023-10-30 21:13 CET, txenglish
Details

Note You need to log in before you can comment on or make changes to this problem.
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