In G4MuonMinusCaptureAtRest::AtRestDoit, there is an uninitialized variable which results in crashes and incorrect results: if( G4UniformRand()*(lambdac + lambdad) > lambdac) { // Decay pEMCascade->DoBoundMuonMinusDecay(targetCharge,mass,&nCascade,Cascade); // Generate secondaries from capture } else { DoMuCapture(); } aParticleChange.SetNumberOfSecondaries( nGkine + nCascade ); In the above segment of code, if the program branches into the DoBoundMuonMinusDecay section of the if, the variable nGkine is not initialized, and can have a huge negative value when used in the call to SetNumberOfSecondaries. The line: nGkine = 0; should be inserted after the call to DoBoundMuonMinusDecay to fix the problem.
implemented the suggested fix, and tagged hadronics/stopping as 'stopping-V02-00-01'