Although in most applications the detector will be filled with DO and
H
O , the geometry can be used for empty or partially filled cases as
well. An empty detector is simulated simply by replacing the relevant media by
air (see air_fill.cmd), but a partially filled detector is more complicated
as it introduces two additional surfaces, one for the D
O and one for the
H
O . Rather than add another set of detector elements to described
the unfilled part of any water region, a trick is played using the boundary
manager GEB_PARTIAL_FILL. At the start of a NEXT, NEAR, PICK or REGION
request, this routine is called to convert any unfilled (air) region into the
corresponding filled (water) region. The geometry request is now serviced
without the complication of the addition water surfaces. Before returning
GEB_PARTIAL_FILL is called again and updates the geometry results if the
introduction of the surface would effect them.
The advantages of this trick are speed and simplicity:-
The only minor disadvantage is that reintroducing the surface may cause a PICKed point to fail so GE_PICK has to check this and iterate until the picked point is the correct side of the surface.