Problem 1522 - geant4 10.00.p01 amsEcal geantino.mac division by zero in RunAction.cc:240
Summary: geant4 10.00.p01 amsEcal geantino.mac division by zero in RunAction.cc:240
Status: RESOLVED FIXED
Alias: None
Product: Examples/Advanced
Classification: Unclassified
Component: amsEcal (show other problems)
Version: 10.0
Hardware: PC Linux
: P5 normal
Assignee: Luciano Pandola
URL:
Depends on:
Blocks:
 
Reported: 2013-08-15 07:41 CEST by Vittorio Zecca
Modified: 2014-06-24 17:29 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Vittorio Zecca 2013-08-15 07:41:13 CEST
Running amsEcal geantino.mac I get zero/zero in RunAction.cc:231 because in
resEvis = 100*rmsEvis/meanEvis;
rmsEvis and meanEvis are both zero.
This is in beta test 10.00.b01.
Comment 1 Luciano Pandola 2013-12-16 09:18:32 CET
Thanks for the report. The bug has been fixed
Comment 2 Vittorio Zecca 2013-12-20 10:45:34 CET
I just downloaded geant4.10.00 but I still have the same bug at the
same location,
changed /run/beamOn 4000 (from 40000) to make it faster.
Can you please double check?
Comment 3 Luciano Pandola 2013-12-20 10:50:27 CET
Yes, Geant4 10.0 is still affected. I have fixed the bug only recently, so the fix will be available in the first available patch of 10.0. My apologies for the misunderstanding.
Comment 4 Vittorio Zecca 2014-06-21 06:12:20 CEST
Now I have a division by zero at line 240 of RunAction.cc 
"resEtot = 100*rmsEtot/meanEtot;"
because rmsEtot and meanEtot are both zero.
Perhaps fix is
"resEtot = meanEtot ? 100*rmsEtot/meanEtot : 0.;"?
Comment 5 Vittorio Zecca 2014-06-21 06:22:05 CEST
Also I have divisions by zero at lines 269 and 277.
Comment 6 Luciano Pandola 2014-06-21 16:44:43 CEST
Ok, thanks for your report. I will have a closer look ASAP.
Comment 7 Luciano Pandola 2014-06-24 17:29:17 CEST
The problem has been fixed by M. Maire. Likely, it will not be in time to be released in the 10.1.beta, but it will surely be released in the next available patch to 10.0. 

Also, it is likely that the example will go under strong re-design and upgrade before the 10.1 release.

Thanks for your report.