Problem 73 - tau=1 singularity
Summary: tau=1 singularity
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/electromagnetic (show other problems)
Version: other
Hardware: All All
: P2 normal
Assignee: Michel.Maire
URL:
Depends on:
Blocks:
 
Reported: 2000-03-22 14:49 CET by lockman
Modified: 2005-10-24 03:44 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
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) .