What's the consequence of overlapping?

Hi,

Since the application guide has only demonstrated what is overlap and how to detect it, what’s the consequence of having overlapped volumes? Should users always avoid overlapping?

Consider a geometry of wls fiber penetrating plastic scintillator, can I implement it using two intersecting volume?

Overlapping volumes means that some locations in space do not have a unique, well defined identity: they belong to two different volumes simultaneously. This is different than a mother volume-daughter volume relationship, where the space point has the unique identity of the lowest daughter in the volume tree.

For your case, where the fiber is inserted into the scintillator but extends outside the volume, you could implement that as a G4SubtractionSolid: remove a hole from the scintillator, the place the fiber at the position of the whole as a sibling of the scintillator (i.e., they are both placed in the same mother volume).

Thanks for answering.

So overlapping leads to wrong simulation result instead of program abort, is this correct?
Also, the application guide mentioned that two volume placed precisely next to each other may be considered as overlapping due to round off error. Is it correct that “precisely next to each other” is not overlap and hence will not lead to wrong simulation result, users should ignore overlap warning if they are sure that ti is caused by “precisely next to each other” volumes?

correct.

not correct. might be the case for some special configurations (thinking about touching cubes aligned with the coordinate system, but I don’t know for sure!).
as soon as there are some angles involved there is always some imperfection due to the discrete nature of computer numbers.

or users could add small gaps and not have overlap/touching faces at all.

Thank you weller,

I’m actually developing optical simulation here so small gaps may lead to wrong result too. We use silicone oil to fill up the small air gaps between touching components to enhance coupling in real experiment, How should I handle such touching faces in simulation?

Touching surfaces are perfectly fine (except if involved in Boolean operations, like subtractions) and overlaps within the geometrical tolerance defined by the system (10E-9mm by default) have no side effects.

2 Likes

This was a great discussion!

Are the overlap issues described in the documentation? The only thing I can find is this, which tells how to find overlaps, but not why.

You’re right that the documentation doesn’t explain clearly why volume overlaps are bad. Basically, the problem is that the overlap region is undefined – should it represent the physics of material A, or of material B? You can see this clearly in the way that Geant4 optimizes the geometry, by voxelizing it: in the overlap region, should the voxel be assigned to point to volume A or volume B?

When a particle is traversing your geometry, which volume it’s assigned to will depend on it’s direction of motion – entering from one side, it’ll stay in volume A as it passes through the overlap region (and therefore “ought to” experience the physics of material A), while entering from the other side it’ll stay in volume B.

1 Like

OK, that confirms what I suspected was going on, thanks for the clarification. This sort of explanation should be documented…

By the way, does the same apply to mother-daughter overlaps, ie when a daughter sticks out of its mother V1 into another volume V2? In that case, I could also imagine that the geometry tree acts in our favor: since V1 and V2 do not overlap, the overlap region would always belong to V2 and not to the daughter. But since I have no idea how navigation is done, I suspect that is the wrong guess :smiley: I was playing around with voxelizing arbitrary volumes using replicas, and at least the overlap checker did not complain if some voxels were outside the mother.

(And if I may shamefully direct you to this other topic I opened and ask for your opinion…)

I would speculate that in this case particles leaving the daughter would be logically placed into V1 - but already be outside the boundaries. So they would never find the next boundary to leave V1 until they are outside the world!?