Problem 2302 - GeomNav1002 warnings for low energy neutrons in azimuthally replicated volumes
Summary: GeomNav1002 warnings for low energy neutrons in azimuthally replicated volumes
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/volumes (show other problems)
Version: 10.7
Hardware: All All
: P4 minor
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2020-12-15 21:34 CET by Wouter Deconinck
Modified: 2020-12-17 08:28 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Wouter Deconinck 2020-12-15 21:34:39 CET
I am seeing GeomNav1002 warnings when low energy neutrons generated in a thick lead radiator reach an azimuthally replicated volume. The issue occurs with geant4.10.7 (but likely before as well). I would like to create a minimal example but have been unable to reproduce it in any of the examples. If you have some hints as to where to debug, I will happily try to reproduce this.

Here is the core warning:

G4WT0 >    41 1.06e+03     75.2 2.47e+04  0.000259        0    0.598       698 donutLead_physical CoupledTransportation
G4WT0 >    42 1.04e+03     56.4 2.47e+04  0.000259        0     32.1       730 donutSystem_logical_PV CoupledTransportation
G4WT0 >    43      812     -111 2.47e+04  0.000259        0      286  1.02e+03 logicMother_PV CoupledTransportation
G4WT0 >    44     -130     -810 2.49e+04  0.000259        0 1.19e+03  2.21e+03 pionDetectorSystem_logical_PV CoupledTransportation
G4WT0 >    45     -593 -1.15e+03  2.5e+04  0.000259        0      584  2.79e+03 pionDetectorTSOpenSector_logical_PV CoupledTransportation
G4WT0 > 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomNav1002
      issued by : G4PathFinder::ReportMove()
Endpoint moved between value returned by ComputeStep() and call to Locate(). 
          Change of  (End) Position / G4PathFinder::Locate is 9.999994268616646e-08 mm long
          and its vector is (7.921528322185623e-08,5.86951500736177e-08,-1.67274265550077e-08) mm 
          Endpoint of ComputeStep() was     (-592.8257463279759,-1152.573179067321,25000.00000001673)
          and current position to locate is (-592.8257462487607,-1152.573179008625,25000)
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

G4WT0 >    46     -593 -1.15e+03  2.5e+04  0.000259        0        0  2.79e+03 pionDetectorTSOpenSector_logical_PV nKiller
G4WT0 > 

Volume pionDetectorTSOpenSector_logical_PV is implemented in gdml as a replicavol (which as been checked for overlaps):

<solids>
  <tube name="pionDetectorTSOpenSector_solid"
    rmin="pionDetectorTSInnerRadius"
    rmax="pionDetectorTSOuterRadius"
       z="pionDetectorTSLength"
    startphi="-0.5*PHI/2.0" deltaphi="0.5*PHI" aunit="deg"/>
  <tube name="pionDetectorTSAllSectors_solid"
    rmin="pionDetectorTSInnerRadius"
    rmax="pionDetectorTSOuterRadius"
       z="pionDetectorTSLength"
    startphi="-PHI/2.0" deltaphi="360.0" aunit="deg"/>
</solids>

<structure>

  <volume name="pionDetectorTSOpenSector_logical">
    <materialref ref="G4_AIR"/>
    <solidref ref="pionDetectorTSOpenSector_solid"/>
    <physvol name="pionDetectorTS_physical">
      <file name="pion/TS/pionDetectorTS.gdml"/>
      <position name="pionDetectorTS_position" x="pionDetectorTSRadialPosition"/>
      <rotation name="pionDetectorTS_rotation" y="-90.0" z="90" unit="deg"/>
    </physvol>
    <auxiliary auxtype="Alpha" auxvalue="0.1"/>
  </volume>

  <volume name="pionDetectorTSAllSectors_logical">
    <materialref ref="G4_AIR"/>
    <solidref ref="pionDetectorTSAllSectors_solid"/>
    <!--loop for="i" from="0" to="1" step="1">
      <physvol name="pionDetectorTSOpenSector_physical[i]">
        <volumeref ref="pionDetectorTSOpenSector_logical"/>
        <rotation z="-PHI0-i*PHI" unit="deg"/>
      </physvol>
    </loop-->
    <replicavol number="2">
      <volumeref ref="pionDetectorTSOpenSector_logical"/>
      <replicate_along_axis>
        <direction phi="1"/>
        <width value="PHI" unit="deg"/>
        <offset value="PHI0-PHI/2.0" unit="deg"/>
      </replicate_along_axis>
    </replicavol>
    <auxiliary auxtype="Alpha" auxvalue="0.1"/>
  </volume>

</structure>

Other useful tidbits:
- switching from QGSP_BERT to QGSP_BERT_HP make the problem go away (but this could be because the neutrons cross sections are different)
- switching from replicavol to looped placement (see above) makes the problem go away
- switching off the parallel world does NOT solve the problem 
- making the replicated volumes slightly smaller to avoid overlapping faces does NOT solve the problem
Comment 1 Gabriele Cosmo 2020-12-16 14:21:17 CET
Thanks for reporting this. The warning likely identifies a discrepancy with the correction applied to the step in G4ReplicaNavigation. Can you please try reducing the correction in geant4.10.07/source/geometry/volumes/src/G4ReplicaNavigation.cc:928 to 5*kCarTolerance, recompile and see if the condition from G4PathFinder now gets satisfied?
Comment 2 Gabriele Cosmo 2020-12-16 14:35:34 CET
... or even less: 2*kCarTolerance
Comment 3 Wouter Deconinck 2020-12-17 00:52:05 CET
Thanks. That did the trick!

5*kCarTolerance: still same set of errors
4*kCarTolerance: still same set of errors
3*kCarTolerance: no more errors (even when repeated with 100x more events)
2*kCarTolerance: no more errors

Is there any way to work around this by only changing user code? Is replacing the replica volumes with looped placements the only way?
Comment 4 Gabriele Cosmo 2020-12-17 08:27:11 CET
Thanks for the feedback. The warning cannot be avoided from user's code. The suggested fix is perfectly safe and you can use it. It will be included in the next patch to release 10.7.
Comment 5 Gabriele Cosmo 2020-12-17 08:28:38 CET
...and yes, if you wish you can use placements in place od replicas.