Created attachment 684 [details] Construction of hollow G4Polyhedra placed in the world volume Dear Geant4-team, when placing a hollow G4Polyhedra in the world volume, the overlap check reports points which are sampled wrongly. Checking overlaps for volume Shape2 (G4Polyhedra) ... -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : GeomVol1002 issued by : G4PVPlacement::CheckOverlaps() Sample point is not on the surface ! The issue is detected for volume Shape2:0 (G4Polyhedra) generated point (18.0567,2.98506,3.01001) is outside *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW ------- Checking overlaps for volume Shape2 (G4Polyhedra) ... -------- WWWW ------- G4Exception-START -------- WWWW ------- *** G4Exception : GeomVol1002 issued by : G4PVPlacement::CheckOverlaps() Sample point is not on the surface ! The issue is detected for volume Shape2:0 (G4Polyhedra) generated point (-14.718,31.3533,29.3699) is inside *** This is just a warning message. *** -------- WWWW -------- G4Exception-END --------- WWWW ------- This only happens when Geant4 is built with the USolids option switched on. If USolids is switched off, there are no such overlap reports. My build for reproducing this: VecGeom-1.1.5 Geant4-10.06.p03 built with -DGEANT4_USE_USOLIDS=ON The attached B1DetectorConstruction.cc is based on the example B1 and contains the construction of a hollow G4Polyhedra. I intentionally call the function CheckOverlaps() several times, since the warnings appear only occasionally. Unfortunately, the macro command /random/setSeeds is ignored by the overlap check when using Geant4 with USolids switched on. It does work for the event generation though. Cheers, Birgit
It is a well known problem: there is a bug in the VecGeom package (not in Geant4) at generating random points on the surface of polycone and polyhedron objects. This does not affect tracking, where VecGeom polycone and polyhedron are fine. So, I suggest you to run overlap check using native Geant4 solids, without USolids switched on.
Hi Evgueni, thanks for your prompt response. It is good to know that this does not affect tracking. Running the overlap check with native Geant4 solids might be problematic for others in my collaboration since we are distributing our software based on LCG releases. The USolids option seems to be switched on for every LCG release I checked so far. I'm going to contact the VecGeom package managers in order to to get a bug fix. The bug report can be watched on JIRA: https://sft.its.cern.ch/jira/browse/VECGEOM-547
This is just a quick update. The VecGeom experts already found and fixed one instance causing the bug. Right now, the bug still occurs for nested Polyhedras in certain constructions, which is under investigation. Cheers, Birgit
The bug has been fixed by the VecGeom experts. It should be shipped with Release 1.1.15. The bug report here can be closed. Thanks, Birgit