Problem 534

Summary: kinematics of elastic scattering is wrong
Product: Geant4 Reporter: Markus.Hauger
Component: processes/hadronic/modelsAssignee: dennis.herbert.wright
Status: RESOLVED FIXED    
Severity: major    
Priority: P1    
Version: 5.2   
Hardware: PC   
OS: Linux   

Description Markus.Hauger 2003-09-19 04:59:23 CEST
The kinematics is not correctly calculated in G4LElastic.cc:

line 115: G4double p = aParticle->GetTotalMomentum()/GeV;

the momentum is converted into GeV, while all other variables are in MeV,
especially the masses.

Apart from that, the kinematics formula is wrong:

lines 201-213:

   G4double etot = sqrt(m1*m1+p*p)+m2;
   a = etot*etot-p*p*cost*cost;
   b = 2*p*p*(m1*cost*cost-etot);
   c = p*p*p*p*sint*sint;

   G4double de = (-b-sqrt(std::max(0.0,b*b-4.*a*c)))/(2.*a);
   G4double e1 = sqrt(p*p+m1*m1)-de;
   G4double p12=e1*e1-m1*m1;
   p1 = sqrt(std::max(0.0,p12))/1000;
   p = p/1000;
   px = p1*sint*sin(phi);
   py = p1*sint*cos(phi);
   pz = p1*cost;

Problem Fix: replacing lines 201-213 with the following code, keeping line 115:

   G4double pcheck=p*1000.; // GeV->MeV
   G4double ev1 = sqrt(m1*m1+pcheck*pcheck);
   G4double etot = ev1+m2;
   a = etot*etot-pcheck*pcheck*cost*cost;
   b = -2.*(m2*m2*ev1+m2*ev1*ev1+m2*m1*m1+ev1*m1*m1);
   c = 2.*m2*ev1*m1*m1+m2*m2*ev1*ev1+m1*m1*m1*m1+m1*m1*pcheck*pcheck*cost*cost;
   G4double e1 = (-b+sqrt(std::max(0.0,b*b-4.*a*c)))/(2.*a);
   G4double p12=e1*e1-m1*m1;

   p1 = sqrt(std::max(0.0,p12))/1000.; //MeV->GeV
   px = p1*sint*sin(phi);
   py = p1*sint*cos(phi);
   pz = p1*cost;

Perhaps I am using an old an forgotten file, but I have the impression that it
is still frequently used in the physics lists for the elastic processes, or is
there already a replacement?

Cheers

Markus Hauger
Comment 1 Hans-Peter.Wellisch 2005-02-22 04:40:59 CET
Hi Markus,

  thank you for reporting this. Unfortunately, there is more wrong with the
elastic scattering code, and we are currently rewriting this.

Many greetings,

Hans-Peter.
Comment 2 dennis.herbert.wright 2005-11-16 18:25:59 CET
Fixed by Vladimir Ivantchenko in geant4-07-01-patch-01