The tessellated solids sometimes give this error,
*** G4Exception : UnknownInsideOutside issued by : G4TessellatedSolid::Inside() Cannot determine whether point is inside or outside volume! *** This is just a warning message.
Found out Why and What we can do about it?
- It seems that this is an issue in the CAD models where the objects are not being fully enclosed into a volume. i.e. there is a small hole in the object somewhere.
Updated by Littlefield, Matthew over 9 years ago
OK, If you download the latest geometry off of the CDB and run the simulation on that you should be able to recreate the error. I'm seeing it now, I had to make a couple of changes to the handling software because of other bugs I didn't spot before so best to update your branch from the maus/merge branch before you download. :-)
Updated by Bayes, Ryan over 9 years ago
I allowed the simulation to run with the warning using the current CDB geometry.
As reported the code just outputs.
- G4Exception : UnknownInsideOutside
issued by : G4TessellatedSolid::Inside()
Cannot determine whether point is inside or outside volume!
- This is just a warning message.
repeatedly until the end when there is a message
Setting the phase ..
Made 2 attempts to phase 4 cavities with 2 remaining
Traceback (most recent call last):
File "./simulate_mice.py", line 54, in <module>
File "./simulate_mice.py", line 51, in run
MAUS.Go(my_input, my_map, MAUS.ReducePyDoNothing(), my_output, datacards)
File "/data/neutrino02/rbayes/MICE/devel_maus/maus/src/common_py/Go.py", line 108, in init
RuntimeError: Failed to phase cavities at FieldPhaser::PhaseCavities
The G4Tessellated solid error is given because the G4TessellatedSolid::Inside() method needs to test whether the test point is inside the solid more than once to get a vector normal to the solid surface and iterative tests do not converge (I think). The authors admit that this code is over-engineered (spit and duct tape came up, I believe), but the code is simple enough that it is unlikely that there is a bug.
New problem is why does the error appear in the FieldPhaser?
Updated by Bayes, Ryan about 9 years ago
Jason provided a gdml file of a simplified object translated from CAD. When translated to MAUS modules and used as the geometry in a MAUS simulation the warning was reproduced. The conclusion is that the problem was not associated with a complicated geometry.
The problem was investigated by running raw gdml files through an example gdml reader provided in geant4.9.6. The error was not reproduced in the toy simulation. Conclusion was that the error was not in the production of the gdml, so it must have been in the software in MAUS somewhere. It was clearly not in the translation from GDML to MAUS modules or the translation from MAUS modules to G4Solids ... no information was lost going from gdml to G4Solids based on some judicious output statements.
Problem is solved by switching to geant4.9.5. Building MAUS v0.5.2 with geant4.9.5 and making no other changes I was able to run the CAD derived geometry with no G4TessellatedSolid warnings.