Problem 2191

Summary: Incorrect DistanceToOut computation for G4ExtrudedSolid
Product: Geant4 Reporter: Cedric Hernalsteens <cedric.hernalsteens>
Component: geometry/solidsAssignee: Gabriele Cosmo <Gabriele.Cosmo>
Status: RESOLVED FIXED    
Severity: normal CC: cedric.hernalsteens
Priority: P4    
Version: 10.5   
Hardware: All   
OS: All   
URL: https://geant4-forum.web.cern.ch/t/warnings-with-g4extrudedsolids/872/2

Description Cedric Hernalsteens 2019-09-12 18:14:46 CEST
This issue is apparently known and discussed on the forum:

https://geant4-forum.web.cern.ch/t/warnings-with-g4extrudedsolids/872

Basically, in G4ExtrudedSolid::DistanceToOut we have this

G4double pz = p.z() - z1 - z0; // incorrect

which should be replaced by

G4double pz = p.z() - 0.5 * (z0 + z1); // correct

This can lead to stuck tracks.
Comment 1 Gabriele Cosmo 2019-09-13 08:13:57 CEST
Thanks. This fix is already included in the current Master and will be available in the next patch and release.
Comment 2 Cedric Hernalsteens 2019-10-09 12:20:30 CEST
Thanks for the information, however, at this stage I am not able to see the fixed version in the latest GIT master branch or in the 10.6-beta snapshot.

I am not familiar with the development process of Geant4, so I might not be looking at the right place.

Could you double-check or point me to the fixed branch if it already is?
Comment 3 Gabriele Cosmo 2019-10-09 12:30:42 CEST
The fix has been introduced in a development version -after- the Beta release (the Master development branch is not accessible to public, by policy).
It will be available in the new release in December and in any future patch to 10.5.
Comment 4 Cedric Hernalsteens 2019-10-09 12:34:40 CEST
Thanks Gabriele! This is all clear now.