Problem 73

Summary: tau=1 singularity
Product: Geant4 Reporter: lockman
Component: processes/electromagneticAssignee: Michel.Maire
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: other   
Hardware: All   
OS: All   

Description lockman 2000-03-22 14:49:40 CET
In tag Geant4-01-01,
processes/electromagnetic/standard/src/G4MultipleScattering.cc,
line 459, the formula for "prob" has a logarithmic singularity at tau=1:

 else
    {
      tau = truestep/range ;
      if(tau < taulim)
        prob = exp(-(alpha1-1.)*tau)*(1.+scatteringparameter*tau) ;
      else
here===> prob = exp((alpha1-1.)*log(1.-tau))*(1.+scatteringparameter*tau) ;
    }


I think this should be changed to
      if (tau < taulim)
        prob = exp(-(alpha1-1.)*tau)*(1.+scatteringparameter*tau) ;
      else if (tau < 1.)
        prob = exp((alpha1-1.)*log(1.-tau))*(1.+scatteringparameter*tau) ;
      else
        prob = 0;
Comment 1 Laszlo.Urban 2000-03-24 06:21:59 CET
The multiplescattering PostStepDoIt should not be called with tau=1,
 but of course it was a bug . It is fixed now together a similar singularity
 in the .icc file (AlongStepDoIt) .