Problem 1858 - Geometry navigation error for G4Polyhedra
Summary: Geometry navigation error for G4Polyhedra
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/solids (show other problems)
Version: 10.2
Hardware: All All
: P3 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2016-05-08 19:12 CEST by whit
Modified: 2016-05-09 10:15 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description whit 2016-05-08 19:12:30 CEST
Hello,

I get the following error:

-------- WWWW ------- G4Exception-START -------- WWWW -------                                                                                                                         [21/990]
*** G4Exception : GeomNav0123
      issued by : G4NormalNavigation::ComputeStep()
 Dangerous inconsistency in response of solid.
    Solid type: G4Polyhedra    Name= hex_polyhedra
 Mother volume gives safety > 0 despite being called for *Outside* point 
   Location = (4412.76,-616.983,711.912)
   Direction= (0.986608,-0.146897,0.0708978)
   - Safety (Isotropic d) = 4442.86
   - Intersection Distance= 9e+99


*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : GeomNav0003
      issued by : G4NormalNavigation::ComputeStep()
============================================================
 WARNING>  Current Point appears to be Outside mother volume !! 
   Response of DistanceToOut was negative or kInfinity when called in G4NormalNavigation::ComputeStep()
   Current physical volume = sl4_1_56_phys
   Position (loc)  = (4412.762486,-616.9834106,711.9119067)
   Direction (dir) = (0.9866077333,-0.1468968251,0.07089783802)
 For confirmation:
   Response of DistanceToOut (loc, +dir)= 9e+99
   Response of DistanceToOut (loc, -dir)= 9e+99
   Inside responds = 0 , ie:  Outside -- a problem, as observed in G4NormalNavigation::ComputeStep() / output from G4NavigatorLogger::ReportVolumeAndIntersection
   Obtain safety(ToIn) = 4442.641666
   Obtain safety(ToOut) = 4442.863814
 Response of DistanceToIn (loc, +dir)= 9e+99
 Response of DistanceToIn (loc, -dir)= 9e+99
 Exit Normal at loc = (0.8660254038,-0.5,2.542456422e-19)
     Dir . Normal   = 0.9278757731
 Checking points moved from position by distance/dir.  Solid responses: 
  +eps in direction :    kOutside  +eps in Normal  :    kOutside
  -eps in direction :    kOutside  -eps in Normal  :    kOutside
 Parameters of solid:     
-----------------------------------------------------------
-----------------------------------------------------------
    *** Dump for solid - hex_polyhedra ***
    ===================================================
 Solid type: G4Polyhedra
 Parameters: 
    starting phi angle : 0 degrees 
    ending phi angle   : 360 degrees 
    number of sides    : 6 
    number of Z planes: 2
              Z values: 
              Z plane 0: -756.3404704813868
              Z plane 1: 756.3404704813868
              Tangent distances to inner surface (Rmin): 
              Z plane 0: 0
              Z plane 1: 0
              Tangent distances to outer surface (Rmax): 
              Z plane 0: 13.172
              Z plane 1: 13.172
    number of RZ points: 4
              RZ values (corners): 
                         0, 756.3404704813868
                         0, -756.3404704813868
                         13.172, -756.3404704813868
                         13.172, 756.3404704813868
-----------------------------------------------------------
============================================================
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***


What is going on?
I am using the latest patched version of 10.2

Cheers,
Whit
Comment 1 whit 2016-05-08 21:41:26 CEST
After some investigation, it appears that this is some sort of precision bug.

First, the geometry was a G4Polyhedra with 6 sides arranged in a honeycomb array with no gap between them.

It was my understanding that shared surfaces for regular volumes (non-boolean) should behave properly. However, once I subtrack more than 1.0e-13*mm from the radii (creating a 2.0e-13*mm) gap between the volumes, the error no long occurs.

I would guess that the tolerance is subtracted with the wrong sign somewhere...

Anyway, this should be an easy fix for someone more familiar with G4Polyhedra.
Comment 2 Gabriele Cosmo 2016-05-09 10:15:19 CEST
The exception reports a potential precision issue which may show up for relatively big volumes, especially if shared surfaces are concerned and shapes with trigonometric setup, like the polyhedra in this case.
The latest Geant4 release brings more enhanced checks to detect on the spot such cases.
Solutions can be to either define a realistic gap between the shared surfaces, like you've done, or to properly tune the geometrical tolerance to be adequate to the size of your detector.