Opción 1: CADMesh GeomVol1002 warnings: Are micron-scale overlaps critical?

Geant4 Version: 11.4.1
Operating System: Fedora Linux 43
Compiler/Version: GCC 15.2.1
CMake Version: 3.31.11


Hi everyone,

I am building a detector geometry in Geant4 using CADMesh to import complex shapes (G4TessellatedSolid). When I build and run the simulation normally (e.g., using /run/beamOn), the navigation seems to work perfectly, and I do not get any “stuck in geometry” track errors or overlapping warnings.

However, when I explicitly force an overlap test using the /geometry/test/run command, I get several GeomVol1002 warnings.

Most of the reported overlaps are in the range of 20 to 35 µm, and some even report “0 fm” of protrusion when checking daughter volumes against their mother volumes.

My core questions are:

  1. If a simulation involving optical physics has an overlap on the order of micrometers (or femtometers), can this cause significant problems in optical photon transport (e.g., reflection/refraction at the boundaries)?
  2. Is it normal to get these warnings exclusively when running /geometry/test/run, but not during standard particle tracking? Should I be concerned about this behavior?
  3. Is there a standard threshold for “acceptable” overlaps when working with CADMesh imports, or is it common practice to ignore these warnings if the geometry is visually and logically correct?

Technical context:

  • Importing method: CADMesh (TessellatedMesh from OBJ files).
  • The detector involves multiple nested layers (Tape → Teflon → Air → Scintillator/Fiber).

I have attached the overlap check output for reference:

Running geometry overlaps check...
Checking overlaps for volume CasePV:0 (G4Box) ... OK! 
Checking overlaps for volume TapeWrapPV:0 (G4TessellatedSolid) ... OK! 
Checking overlaps for volume TeflonWrapPV:0 (G4TessellatedSolid) ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with mother volume !
          Overlap is detected for volume TeflonWrapPV:0 (G4TessellatedSolid) with its mother volume TapeWrapLV (G4TessellatedSolid)
          protrusion at mother local point (1.0537,101.504,4.03911) by 0 fm  (max of 891 cases)
NOTE: Reached maximum fixed number -1- of overlaps reports for this volume !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Checking overlaps for volume AirWrapperPV:0 (G4TessellatedSolid) ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with mother volume !
          Overlap is detected for volume AirWrapperPV:0 (G4TessellatedSolid) with its mother volume TeflonWrapLV (G4TessellatedSolid)
          protrusion at mother local point (1.032,100.805,3.23388) by 0 fm  (max of 385 cases)
NOTE: Reached maximum fixed number -1- of overlaps reports for this volume !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Checking overlaps for volume ScintillatorPV:0 (G4TessellatedSolid) ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with volume already placed !
          Overlap is detected for volume ScintillatorPV:0 (G4TessellatedSolid) with FiberPV:0 (G4TessellatedSolid)
          overlap at local point (-55.6536,-90.9666,0.650622) by 34.7174 um  (max of 500 cases)
NOTE: Reached maximum fixed number -1- of overlaps reports for this volume !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Checking overlaps for volume FiberPV:0 (G4TessellatedSolid) ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with mother volume !
          Overlap is detected for volume FiberPV:0 (G4TessellatedSolid) with its mother volume AirWrapperLV (G4TessellatedSolid)
          protrusion at mother local point (-7.51138,101.023,0.783116) by 0 fm  (max of 23 cases)
NOTE: Reached maximum fixed number -1- of overlaps reports for this volume !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Checking overlaps for volume TeflonAnillosPV:0 (G4TessellatedSolid) ... 
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : GeomVol1002
      issued by : G4PVPlacement::CheckOverlaps()
Overlap with volume already placed !
          Overlap is detected for volume TeflonAnillosPV:0 (G4TessellatedSolid) with ScintillatorPV:0 (G4TessellatedSolid)
          overlap at local point (21.2729,69.0388,0.876371) by 27.9235 um  (max of 573 cases)
NOTE: Reached maximum fixed number -1- of overlaps reports for this volume !
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

Checking overlaps for volume SiliconSensorPV:0 (G4TessellatedSolid) ... OK! 
Geometry overlaps check completed !

Any guidance on whether to treat these as “noise” or if I should adjust the geometry further would be greatly appreciated.

Thank you,
Jesús Ángel

Hi. In my experience, overlapping is always incorrect and can even lead to program crash. In scintillator simulation, overlapping could lead to effectively wrong optical surfaces.

Those 0 fm overlap may rasie from a closely touched volumes, but those with few tens of um are overlap for sure. But all of them are considered overlap in Geant4.

You should try avoiding any overlaps. Maybe you can try raise the precision of OBJ file if its precision is not enough (as long as the original model are overlap-free)? 18 digits should reproduce a lossless double number.

Thank you, Zhao_Shihan, for the clarification. I understand that even micron-scale overlaps can compromise the optical surface properties. I will revisit my CAD export settings to increase the precision of the tessellated surfaces and aim for a completely overlap-free geometry. Your insight on the precision of the OBJ files is very helpful.

One specific issue in my experience that can really mess up meshing (tessellated solids), is if you have nested or coincident curved surfaces (like a pipe through a box, but more complicated). In Geant4, the surfaces which include curved shapes are analytic, and “generally” don’t introduce spurious overlaps. Further, if you build your volumes hierarchically (mother-daughter placement), there’s only one actual surface involved, so overlaps don’t happen.

But in a CAD system, it’s very possible for the “outer surface” of a volume to get tesselated quite differently than the “inner surface” of the enclosing volume. If that happens, you can easily have facets from each side crossing over one another. Increasing the precision, or increasing the number of circumfirential points on curves, can help reduce that.

Hi @jangelmm

Welcome to the Geant4 forum!

Thank you for your question, it is very interesting.

The “0 fm” cases may be related to numerical precision in the overlap checking algorithm.

The overlaps of 20–35 µm may be worth to investigate them. As @Zhao_Shihan said, for many particle simulations they may be small, but optical photons are more sensitive because reflections and refractions depend directly on the exact position of geometry boundaries. If an overlap affects the definition of an interface, it can change the optical response.

To answer your questions:

  1. In principle, overlaps should be avoided. The impact depends on how often particles interact with the affected regions. Note that even if the depth of the protrusion is small, the total overlap section may be big (800 points out of 10000, so 8% of the surface)

  2. It is normal to see these warnings in /geometry/test/run but not during normal tracking. The test checks many random points on all surfaces, while real events may never hit some of these problematic regions.

  3. Ideally, overlaps should be zero. In practice, small numerical overlaps can happen with CAD geometries, but values of tens of microns are usually worth investigating.

Looking at your geometry, most overlaps seem to come from (thin?) wrapping layers (Tape → Teflon → Air) around the scintillator.

If these layers are only used to reproduce reflective optical behaviour, one simple option is to remove them and use a G4LogicalSkinSurface (or G4LogicalBorderSurface) directly on the scintillator. In this case, the optical reflection is handled by the surface model [link to optical physics documentation], and the extra volumes are not needed. This also removes the source of many overlaps.

However, if you want to keep the real wrapping materials around the scintillator (for example to model more realistic optical behaviour, including effects related to diffuse reflection and refractive index changes), another possibility is to build the wrapper layers using G4ScaledSolid [link to scaled solid documentation]. Instead of importing several independent CAD meshes for Tape, Teflon, and Air, you can import only the scintillator mesh and create the surrounding layers by scaling it. Alternatively, you can scale the solid manually. This is only useful if you really need the physical layers. Otherwise, the skin surface approach is simpler.

As a final note, you may be interested in this post: https://geant4-forum.web.cern.ch/t/importing-cad-geometries-into-geant4-practical-notes-and-common-pitfalls/14912

Thank you for your time.

Best,
Alvaro