Problem 1766 - Variance reduction in Radioactive Decay segfaults for alpha decays
Summary: Variance reduction in Radioactive Decay segfaults for alpha decays
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic/models/radioactive_decay (show other problems)
Version: 10.1
Hardware: All All
: P5 minor
Assignee: dennis.herbert.wright
URL:
Depends on:
Blocks:
 
Reported: 2015-07-08 19:33 CEST by Michael Kelsey
Modified: 2015-12-02 22:41 CET (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 Michael Kelsey 2015-07-08 19:33:07 CEST
We want to study the effects of uranium/thorium decay chains in our detector, without the global-time/local-time problems which result from U-238's multi-billion-year half-life.  To do this, we created a simple "histogram" text file for use with RDM:

  /gun/particle ion
  /gun/ion 92 238
  /grdm/sourceTimeProfile timeprof.txt

where timeprof.txt contains:

  0 0
  0.99e6 0
  1e6 1
  1.01e6 0

The job crashes in RDM:

 *** Break *** segmentation violation
 Generating stack trace...
 0x0000000114611787 in G4RadioactiveDecay::DecayIt(G4Track const&, G4Step const&) (in libG4processes.dylib) (G4RadioactiveDecay.cc:1661)
 0x0000000114615db5 in G4RadioactiveDecay::AtRestDoIt(G4Track const&, G4Step const&) (in libG4processes.dylib) (G4RadioactiveDecay.hh:337)
 0x00000001131e874c in G4SteppingManager::InvokeAtRestDoItProcs() (in libG4tracking.dylib) (G4SteppingManager2.cc:341)
 0x00000001131e4444 in G4SteppingManager::Stepping() (in libG4tracking.dylib) (G4SteppingManager.cc:160)
 0x00000001131fad28 in G4TrackingManager::ProcessOneTrack(G4Track*) (in libG4tracking.dylib) (G4TrackingManager.cc:128)
[...]

This crash only occurs in the 10.1 release (and patches), not in 10.0 and not in 10.2-beta.  The error is due to a partial, incomplete migration from G4AlphaDecayChannel to G4AlphaDecay for alpha-decay processes in RDM, specifically lines 909-921 of G4RadioactiveDecay.cc.
Comment 1 dennis.herbert.wright 2015-12-02 22:41:18 CET
Problem was due to a divide by zero when a zero endpoint energy was sent to the beta decay class.  This happens only in the biasing code and passing zero is the
expected behavior. Protection against the zero divide was added to G4BetaMinusDecay.