next up previous contents
Next: Extending the Geometry Up: Detector Geometry Previous: Boundary Manager   Contents

Partial Water Fill

Although in most applications the detector will be filled with D$_2$O and H$_2$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$_2$O and one for the H$_2$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.


next up previous contents
Next: Extending the Geometry Up: Detector Geometry Previous: Boundary Manager   Contents
sno Guest Acct 2009-09-09