Problem 965 - PenelopeRayleigh crashes for low-energy photons in Air
Summary: PenelopeRayleigh crashes for low-energy photons in Air
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic/lowenergy (show other problems)
Version: 9.0
Hardware: Apple Mac OS X
: P5 major
Assignee: Luciano Pandola
URL:
Depends on:
Blocks:
 
Reported: 2007-08-29 17:15 CEST by marcus.h.mendenhall
Modified: 2007-09-03 11:46 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description marcus.h.mendenhall 2007-08-29 17:15:05 CEST
This problem arose within my own code, but is easily reproducible running TestEm1, so I will show it there.  When I was simulating hadron transport through a complex target, including the air around it, I started getting hangs in which G4 would slowly consume all memory on my machine, and loop forevery trying to track.  A bit of poking around showed that PenelopeRayleigh was returning a 0 mean free path for low-energy gammas (around its cutoff at 250 eV).  This seems to happen with 

Here is a script which demonstrates it within TestEm1

/testem/det/setMat Air
/testem/phys/addPhysics penelope
/run/initialize
/gun/particle gamma
/gun/energy 251 eV
/tracking/verbose 1
/run/beamOn 1

this causes infinite looping with zero step length.
Here is a bit of output:

-MeanFreePath = 0[cm]
-G4VDiscreteProcess::PostStepGetPhysicalInteractionLength [ PenRayleigh]
- Particle type - gamma
-   mass:        0[GeV]
-   charge:      0[e]
-   Direction x: 0.151605, y: -0.401562, z: -0.903196
-   Total Momentum = 2.51e-07[GeV]
-   Momentum: 3.80529e-08[GeV], y: -1.00792e-07[GeV], z: -2.26702e-07[GeV]
-   Total Energy   = 2.51e-07[GeV]
-   Kinetic Energy = 2.51e-07[GeV]
- MagneticMoment  [MeV/T]: 0
-   ProperTime     = 0[ns]
- in Material  Air

and so forth.

I have only checked it on my MacOSX install but I don't think it is platform specific, since it happens for all versions of Geant4 from 4.8.1p02 to 4.9 with different options on the compilers, etc.
Comment 1 Maria.Grazia.Pia 2007-08-29 19:55:12 CEST
The problem report is assigned to the developer expert in Penelope processes.

Best wishes,
Maria Grazia Pia
Comment 2 Luciano Pandola 2007-09-03 11:46:26 CEST
Thanks for reporting the problem. The problem happened at very low energy for compound materials that are defined with mass fraction rather than atom numbers. The problem has been identified and fixed. The fix will be available in the next Geant4 public release.