Problem 460

Summary: Problem on G4LElastic
Product: Geant4 Reporter: laurent.desorgher
Component: processes/hadronic/models/low_energyAssignee: Hans-Peter.Wellisch
Status: CLOSED FIXED    
Severity: normal CC: desorgher
Priority: P1    
Version: other   
Hardware: PC   
OS: Linux   

Description laurent.desorgher 2003-02-24 07:57:15 CET
Dear Hans-Peter,

When simulating in geant4.5.0  Elastic scattering of particle on  material
heavier than hydrogen (and probably also on hydrogen) a bug occurs if the
incoming particle has exacltly the direction (0,0,-1.).  In this case the
particle scatters backward  while a  forward direction is expected.
The bug occurs in the file G4LElastic.cc, in the method  G4LElastic::Defs1 in
line 373-377.
As the code  is written (0,0,1) and (0,0,-1.) incident direction are consider as
equivalent to (0,0,1).

To solve the bug I propose to change the lines 373-377 by

else {
       G4double cost=pzinc/p;
       *pxnew = cost*px;
       *pynew = py;
       *pznew = cost*pz;
   }



Best Regards



Laurent Desorgher
Comment 1 Hans-Peter.Wellisch 2003-05-25 12:10:59 CEST
was included already some time ago. Closing the 'ticket' now.