Problem 926

Summary: Bug in G4MuonMinusCaptureAtRest.cc
Product: Geant4 Reporter: nanjo
Component: processes/hadronic/stoppingAssignee: dennis.herbert.wright
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.1   
Hardware: PC   
OS: Linux   

Description nanjo 2007-01-19 08:02:46 CET
Dear geant4 developers,

I got an error message with Geant4 8.2 as follows.
G4NucleiProperties::GetNuclearMass: Wrong values for A = 1 and Z = 1.01

It is not appeared with Geant4 8.1.

I think it is due to a bug in
source/processes/hadronic/stopping/src/G4MuonMinusCaptureAtRest.cc
at the line number 101 (also at the line number 102).
 101   targetZ = G4lrint(aEle->GetZ())+perCent;  //...
 102   targetA = G4lrint(aEle->GetN())+perCent;  //...

I think it should be
 101   targetZ = G4lrint(aEle->GetZ()+perCent);  //...
 102   targetA = G4lrint(aEle->GetN()+perCent);  //...

Please check and fix it.

Best regards,
Hajime
Comment 1 dennis.herbert.wright 2007-01-25 10:05:59 CET
This has been fixed.  perCent was removed: G4lrint is sufficient to round to the
nearest integer.  Thanks for reporting this.