In the CADINT interface, a user can indicate a subtree of a detector by giving the name of a volume. All the contents of this volume will be written into a SET file. A user can also choose the contents by setting the daughter volumes visible or invisible using the visibility attribute. Only the visible volumes will be written into the SET file. In order to avoid repeated volumes, a number of divisions can be chosen. The rest of the divisions can be reproduced in a CAD system, if needed. The colors of volumes defined by the GEANT color attribute are also transmitted into SET files.
The CADINT interface writes the geometry of a GEANT detector model
in the SET file format in two basic phases:
The interface writes volumes into the SET format as CSG solids i.e. the volumes are created using extrusions, revolutions, ruled solids, rectangular parallelepipeds, etc. Divisions are written as normal volumes. Every division of a divided volume is a distinct volume in a SET file. An index is attached to the end of the name of each of the divisions in order to distinguish each division instance. The indexing of instances is reset in each division. An index is attached to the end of the volume name of multiple copies of normal volumes as well.
In SET format, a volume must be first written, after that it can be positioned. All volumes are positioned with respect to the global coordinate system. Thus, the tree structure in the SET file is flat. There will be overlaps between volumes, since no Boolean operations are used to define the tree structure. However, the tree structure is written into a separate file. The material information is written into this same text file.
The interface decodes the JVOLUM data structure and computes the necessary parameters if needed (negative parameters, dimensions of divisions, etc.). These computations are based on the GEANT drawing routines. The interface decodes a detector model starting from the global mother volume. After that it decodes the first daughter volume in the left side of the tree. The daughter volume can be a normal volume or a division. It continues decoding daughter volumes until it is at the bottom of the tree. After that the interface returns one level and decodes the next daughter of the current volume if any exists. In a case of a divided volume, the divisions are treated in the same way as the daughter volumes. The creation of the SET file is performed simultaneously.