The geometry is consisted of a trapezoid (pond) and two PMTs inside. Each PMT is consisted of a cone and a semisphere. VRML file for the geometry can be found in http://umdgrb.umd.edu/vlasisva/g4_02.wrl When I do a recursive_test I get the following: GeomTest: no daughter volume extending outside mother detected. GeomTest: no overlapping daughters detected. GeomTest: no daughter volume extending outside mother detected. GeomTest: no overlapping daughters detected. GeomTest: no daughter volume extending outside mother detected. GeomTest Error: Overlapping daughter volumes The volumes 385 25 1 1[385] and InBaffle[385], both daughters of volume pond[0], appear to overlap at the following points in global coordinates: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 25.5454 -3418.38 2405.76 160.02 - 3392.84 2405.76 160.02 3.05438 -3421.41 2405.76 160.02 - 3418.36 2405.76 160.02 Which in the mother coordinate system are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 25.5454 -3418.38 2405.76 160.02 - 3392.84 2405.76 160.02 3.05438 -3421.41 2405.76 160.02 - 3418.36 2405.76 160.02 Which in the coordinate system of 385 25 1 1[385] are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 25.5454 -18.2886 3.96276 6.68341 7.25684 3.96276 6.68341 3.05438 -21.3174 3.96276 6.68341 - 18.263 3.96276 6.68341 Which in the coordinate system of InBaffle[385] are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 25.5454 -18.2886 3.96276 1.05171 7.25684 3.96276 1.05171 3.05438 -21.3174 3.96276 1.05171 - 18.263 3.96276 1.05171 GeomTest Error: Overlapping daughter volumes The volumes 400 25 16 1[400] and InBaffle[400], both daughters of volume pond[0], appear to overlap at the following points in global coordinates: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 27.1657 -3424.89 -1832.96 160.02 - 3397.72 -1832.96 160.02 5.13311 -3430 -1832.96 160.02 - 3424.86 -1832.96 160.02 Which in the mother coordinate system are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 27.1657 -3424.89 -1832.96 160.02 - 3397.72 -1832.96 160.02 5.13311 -3430 -1832.96 160.02 - 3424.86 -1832.96 160.02 Which in the coordinate system of 400 25 16 1[400] are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 27.1657 -19.8184 0.123745 7.68341 7.34731 0.123745 7.68341 5.13311 -24.9265 0.123745 7.68341 - 19.7934 0.123745 7.68341 Which in the coordinate system of InBaffle[400] are: length (cm) ---------- start position (cm) ----------- ----------- end position (cm) ------------ 27.1657 -19.8184 0.123745 2.05171 7.34731 0.123745 2.05171 5.13311 -24.9265 0.123745 2.05171 - 19.7934 0.123745 2.05171 GeomTest: no daughter volume extending outside mother detected. GeomTest: no overlapping daughters detected. Output of Atree Now printing with verbosity 0 "World", copy no. 0 "Ground", copy no. 0 "pond", copy no. 0 "385 25 1 1", copy no. 385 "InBaffle", copy no. 385 "400 25 16 1", copy no. 400 (repeated placement) "InBaffle", copy no. 400 (repeated placement) G4ASCIITreeSceneHandler::EndModeling Now the volume with the numbers as name is the red semisphere in the vrml. The baffle is the cone. From what is shown at the vrml there is no overlap. the volumes are not even close. All the other tests give me no problems. I have also increased the /geometry/recursiondepth before testing. The really strange thing is that if I increase the dimensions of the big trapezoid (the pond) then the error message dissapears. I have checked for overlap between the trapezoid and the PMTs but I can't find any. The dimensions of the mother volume (trapezoid-Pond) shouldn't affect the overlap (if any) of it's daughter volumes. In my code the dimensions-position of the PMT are independent of the dimensions of the Pond. Is there a bug in tracking or something else? Vlasios Vasileiou
It looks like a problem of round-off error in the calculation of the distances. Can you please provide the source code of your detector-description class which reproduces the geometry you're showing ? Please, add the information (URL address) to this problem report. Thanks.
Ok Here is some sample code that produces the error message. Try to double pond_top_dx and pond_top_dy. The problem disappears.
the url http://umdgrb.umd.edu/vlasisva/g4sim/g4simdebug.tar.gz
The problem seems originated by the placement of the tiny semisphere within the cone-shell, it is not easy to understand if an overlap is indeed existing, given that the semisphere is very close to the inner surface of the cone shell. The test however seems to tell so. The fact that by enlarging the dimensions of the relatively big mother 'pond' volume makes the warning disappear, is eventually due to a round-off approximation in the calculation of the distances, which in such case may go off the tolerance... However, it is also true that by reducing the max-radius of the tiny sphere by 1*nanometer the overlap's warning gets resolved... One should carefully check the positioning of the volumes, eventually getting used to coherently specify also the units for dimensions, translations and angles.
The semisphere isn't close to the cone. Take note that it is not a perfect hemisphere. There is a maxtheta angle=70 degrees. Please check the file baffle.wrl that has just one PMT to see that there is a clear separation between the two volumes (more than centimeters). DAVID gives no errors.
The user is right. The problem seems related to (schematically) a similar case below: --------------------- | A | | |---------| | | | | | | | |---| | | | | | B | | | | | | | | | | | x------x | | | | | | | | | |---| | | ------ ------ where volume B is the hemisphere and A the cone shell. Segment points of the grid are both outside B and the right end of the segment lies on A's inner surface. I checked the responses from the solids are correct also for another error case reported for the mother trapezoid: GeomTest Error: SolidProblem Spurious entering intersection point Solid name = InBaffle Local position = 11.3919 0.123745 -5.56829 cm Solid response: Where the point is located on its surface. Both cases seem not handled correctly in GeomTestVolume::TestOneLine() and GeomTestSegment::FindSomePoints(). The analysis of the problem is now assigned to the original author of those classes in Geant4.
I want to thank Vlasios for taking the time to report this problem and provide a code example for study. I was able to reproduce this problem and have studied the corresponding geometry and solid code. This issue appears to be due to round off errors. Specifically, the user has placed a conical solid into a mother volume of relatively large dimensions. The geometry testing code attempts to calculate an intersection with this solid from a long distance away. The round off error in this calculation is larger than the "tolerance" value assumed in the solid. This is a design problem in geant4 and is not something that is easy to fix here. I will attempt to install addition error tolerance into the testing code to try to fix this. For running simulations using this geometry, I suggest the user install step limits of modest size (say, the dimensions of each PMT). This will avoid similar roundoff problems effecting the geant4 tracking. Gabriele mentions an issue considering the error message "Spurious intersection point." This could be related to another bug not directly associated with the other types of errors mentioned in this report. I refer him to Problem #652.
Code changes, after testing, have been submitted to the geant4 code respository. See revision 1.3 of geometry/navigation/src/G4GeomTestSegment.cc