Next: PMT Simulation
Up: Detector Geometry
Previous: Extending the Geometry
Contents
The basic geometry routines of any Monte Carlo are subjected to a particularly
virulent form of Murphy's Law. Not only will every possible (and impossible)
situation arrive, but also it is guaranteed to happen at the point of maximun
inconvenience - i.e. about 10 hours into the ``definitive'' run. Points
will be in two or more regions simulataneously or in no region at all. Tracks
will travel in the planes of any flat surface and strike any intersection
between two surfaces with a pinpoint accuracy that would be the envy of any
tactical force commander. In order to combat these problems we have to try both
prevention and cure. Prevention is dealt with by the following:-
- Using, as the basic design, an embedded geometry. If each boundary is
only ever dealt with by one piece of code then it may be wrong, but it should at
least be consistent!
- The EXTRACT switch GE_DEBUG. Switching this on means that for each call
to GE_NEXT, after finding the boundary, GE_REGION is called to check on the
region on either side of the boundary. This checks consistency between GE_NEXT
and GE_NEAR. This debug code will also pick up a number of other problems.
To help cure problems we need to be able to reproduce bugs
when they crop up. Keeping a short history of previous calls to the geometry
interface routines that can be dumped when an error occurs will help here.
Next: PMT Simulation
Up: Detector Geometry
Previous: Extending the Geometry
Contents
sno Guest Acct
2009-09-09