Problem 193

Summary: General Particle Source bug
Product: Geant4 Reporter: marc.kippen
Component: eventAssignee: Makoto.Asai
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description marc.kippen 2001-01-15 13:01:55 CET
General Particle Source bug in GenerateIsotropicFlux:

Must protect against divide by zero case when posthe = acos(tz) = 0.0 (i.e., any
source position where X=0 and Y=0)

Fix:
======

replace:
         posphi = acos(tx/sin(posthe));

with:
         if (posthe != 0. && posthe != pi)
            posphi = acos(tx/sin(posthe));
         else
            posphi = 0.0;
Comment 1 Makoto.Asai 2001-01-16 02:20:59 CET
Thank you for reporting. The author will fix it quite soon.
The correction should go to the closest patch release.
Comment 2 Makoto.Asai 2001-02-08 20:39:59 CET
Fix is now committed. It should be included in the coming patch release.