| Summary: | rounding error on phi side in G4ReplicaNavigation | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Alexei Sibidanov <sibid> |
| Component: | geometry/navigation | Assignee: | Gabriele Cosmo <Gabriele.Cosmo> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P4 | ||
| Version: | 10.2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | G4ReplicaNavigation.cc patch | ||
Thanks for the suggested patch. A fix is now included in the development version and will be available in the next release. |
Created attachment 421 [details] G4ReplicaNavigation.cc patch I suggest the following the patch against the situation when a point is exactly on phi border in replica and due to rounding errors it is always outside of any phi wedge which lead to kInfinity result instead of 0. --- geant4.10.02.p02/source/geometry/navigation/src/G4ReplicaNavigation.cc 2016-06-29 07:03:28.000000000 -0700 +++ G4ReplicaNavigation.cc 2016-10-17 18:04:59.981794218 -0700 @@ -355,7 +355,7 @@ compS = -sinSPhi*localDirection.x()+cosSPhi*localDirection.y(); compE = -sinSPhi*localDirection.x()-cosSPhi*localDirection.y(); - if ( (pDistS<=0)&&(pDistE<=0) ) + if ( (pDistS<=halfkCarTolerance)&&(pDistE<=halfkCarTolerance) ) { // Inside both phi *full* planes //