Geometry file format

Each file consists of a list of volumes. Each volume is characterized by its name and a list of parameters. Comments (marked with // at the beginning of a line) are allowed only at the beginning or the end of a volume.

A detector may consist of several modules sitting in a keepin volume and each module consists of several daughters, grand-daughters and so on. First the keepin volume will be read and afterwards each module with all volumes inside. The general construction (keepin volumes or not, number of modules) is for each detector hardwired in the program (see chapter Implemented sets). All inner parts of a module are only defined through the input file. You are free to change the names (with some restrictions), media, shapes, dimensions, and the tree itself, e.g. by inserting volumes, without recompiling the program. The only restriction is that the program will not create a daughter before it has created its mother, thus the mother has to show up in the list before its daughters.

Important: All volumes are created in Geant with the 'ONLY' flag!

The general input for a volume (except CAVE ) looks like:

  • name of the volume
  • inout flag (only for keepin volumes and modules, not for subvolumes of a module)
  • name of the mother-volume
  • Geant shape of the volume
  • name of the medium (= material)
  • points or parameters from technical drawings (depends on the shape)
  • position (x y z) of the coordinate system, in which the points are given, in the coordinate system of the mother
  • 3x3 rotational matrix of the coordinate system listed rowwise as a vector

For explanation:

Names of volumes: For each detector the names of the keepin-volumes and the modules are hardwired in the program (see chapter Implemented sets ). The inner parts of a module have names starting with a detector specific string. Each volume to be created in Geant has a name with at least 4 characters (upper case letters). Only the first 4 characters are used in Geant. All volumes of which several copies exist have names with 5 or more characters. These additionally characters are always digits ranging from 1 to the maximum number of volumes with the same 4-character Geant name. For example Tof 1 contains 8 identical cells T01S1 ... T01S8. The volume T01S is created only once via GSVOLU(...) but positioned 8 times via GSPOS(...). The names of the sensitive volumes must have a special structure which is defined for each detector in chapter Implemented sets.

Inout flag: All keepin volumes and mothervolumes of a detector may have an inout flag. If this inout flag is 1 the volume is created otherwise not. If the flag is not given in the input file the program (next line after name of volume) the program sets it automatically to 1. By setting this flag to 0 in the input file you can prevent for example the creation of a module in a special sector. This flag is not stored in the database. When reading from database the flag is always set to 1 by the program.

Name of the mother: Each volume is positioned in a mother. The name of the mother has 4 characters ( in upper case letters) plus eventually a 5th character if several copies of the mother exist. This 5th character has to be always 1. (In Geant only 4 characters are used, but 5 characters are necessary to find the mother in Oracle.)

Geant Shape: Each volume has a shape (4 characters in upper case letters). The shapes yet implemented in the program are BOX , PGON, PCON, TRAP, TRD1, TUBE, TUBS, CONE, CONS, SPHE, ELTU.

Medium: Each volume is filled with a medium given by the name of the medium. This medium must be defined in the medium file.

Points: Each volume has parameters describing the dimensions. The number of these parameters and their meaning depend on the shape of the volume. This is explained in chapter Shapes.

Coordinate system: Each volume has a coordinate system in which the parameters are given. Its position and orientation relative to the coordinate system of the mother volume is described by a translation vector T and a 3x3 rotation matrix R according to the equation x=R*x'+T where x is the vector in the coordinate system of the mother, and x' the vector in the coordinate system of the daughter. The matrix R is listed rowwise as a vector with 9 components. Each shape has its own intrinsic orientation which is defined similar to the Geant definition except for TRAP and TRD1 (see chapter Shapes). Important: The rotation matrix should be given with a precision of 10**-6. Otherwise you would get a lot of warnings from Geant that the coordinate system is not orthogonal. As long as all volumes in a module are not rotated you may use the coordinate system of the module as the base coordinate system in which all points are given. More information about the coordinate transformations you can find in the document Hades Geometry and Database of Michael Dahlinger.

Important: Volumes of which several copies exist have a special input structure: For the first volume all information above is read. The input for the other copies looks like:

  • name of the volume
  • inout flag if is the volume is a keepin volume or a module (may be missing)
  • name of the mother
  • translation vector of the coordinate transformation
  • rotation matrix of the coordinate transformation

The other information is not necessary because it has to be identical.