Problem 2191 - Incorrect DistanceToOut computation for G4ExtrudedSolid
Summary: Incorrect DistanceToOut computation for G4ExtrudedSolid
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 10.5
Hardware: All All
: P4 normal
Assignee: Gabriele Cosmo
URL: https://geant4-forum.web.cern.ch/t/wa...
Depends on:
Blocks:
 
Reported: 2019-09-12 18:14 CEST by Cedric Hernalsteens
Modified: 2019-10-09 12:34 CEST (History)
1 user (show)

See Also:


Attachments

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