| Summary: | Possible Issue with Calculating Effective Charge of a Material | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | txenglish |
| Component: | processes/electromagnetic/utils | Assignee: | Vladimir.Ivantchenko |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P4 | ||
| Version: | other | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Snippet of code from G4EmSaturation.cc | ||
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 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 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 |
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