There is a problem even with the simplest G4Polycone with 2 z-planes, if the starting phi and ending phi during solid definition is crossing 0, but the physical volume is created by rotating the polycone to some quadrant, so resulting volume is not intersecting the axes. Builtin kernel geometry grid test gives in such situation a lot of errors like: ---------------------------------- GeomTest Error: SolidProblem DistanceToOut(p,v) = kInfinity for point inside Solid name = LAr::HEC::Module Local position = 23.8844 2.35241 144.3 cm GeomTest Error: SolidProblem Spurious entering intersection point Solid name = LAr::HEC::Module Local position = 47.7689 4.70482 144.3 cm --------------------------------------- In the inverse situation (solid constructed in one quadrant and physical volume created by rotating to have phi=0 inside the volume) is without problems. Also the constructing solid with phi=0 inside, and not rotating them during placement is O.K. Only the first abovementioned combination gives an errors (and then problems during tracking) The very siple complete example is available: http://pavol.home.cern.ch/pavol/GeomTest1.tgz
Thank you for supplying the example code, and apologizes for the delay in handling your problem. I was able to compile your test code and run it. The following error message: > GeomTest Error: SolidProblem > DistanceToOut(p,v) = kInfinity for point inside > Solid name = LAr::HEC::Module > Local position = 23.8844 2.35241 144.3 cm would represent a serious problem that I would like to check, however, when I ran your code this error message did not appear. Does your example program (after running the macro geomTest.mac) generate this error message in your setup? Which specific geant4 release and computer platform (processor type) are you using? > GeomTest Error: SolidProblem > Spurious entering intersection point > Solid name = LAr::HEC::Module > Local position = 47.7689 4.70482 144.3 cm Your program did produce this error for me. I believe I have tracked this down to a bug in the geometry testing code and now have a fix. I will test this fix further and assuming it does not break anything else, the code will hopefully make it into the next patch. Thank you for reporting this problem.
Code changes, after testing, have been submitted to the geant4 code respository to fix the "spurious entering intersection point" message. See revision 1.3 of geometry/navigation/src/G4GeomTestSegment.cc Problem changed to "WORKSFORME" since I could not reproduce the more serious "SolidProblem" message.