| Summary: | Do not assign DBL_MAX as lifetime for a stable particle. | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Alberto.Ribon |
| Component: | processes/decay | Assignee: | kurasige |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | Alberto.Ribon, Federico.Carminati, kurasige |
| Priority: | P5 | ||
| Version: | 9.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | The patch to fix the problem in Geant4 9.6 | ||
Thank you for reporting the problem. I've fixed the bug and bug-fixed tags are decay-V09-06-03 (for 9.6.patch) decay-V10-00-02 (for 10.0.patch) |
Created attachment 254 [details] The patch to fix the problem in Geant4 9.6 Federico Carminati has reported to me the following problem. Do not assign DBL_MAX as lifetime for a stable particle. This gets multiplied by the number of lifetimes to live and therefore exceed the representable number in case it is larger than one. Federico has also provided a patch (included in attachment) to fix this problem in Geant4 9.6. My comment: for "normal" use of Geant4, where the overflow exception is not activated, this problem is not seen and does not affect the physics results. However, it would be nice to fix it, so that Geant4 can work in all conditions (including when the overflow exception is activated). The solution proposed seems quite reasonable: use a lifetime much bigger than the age of the universe (e.g. 10^24 seconds) instead of DBL_MAX. To apply the patch, it is enough to copy it in the main directory of Geant4 (where source/ appears as a subdirectory) and do: patch -p1 < G4corr2.patch It would be nice to fix the problem also in G4 10.0, both for the patch and for the development.