The HADES geometry format for volumes

History

In 1997, it was intended to retrieved the geometry data directly from 3D-CATIA drawings.
In these drawings the points of the various volumes and their coordinate systems are marked with names. The CATIA drawings were then converted to IGES format. A special interface analyzed these files and wrote the points and coordinate systems of the volumes into the database Oracle.
The hope was, that any change in the technical drawings could be easily converted into a new geometry for GEANT.
But this way was quite time consuming (somebody had to mark these points). Furthermore actual drawings (AUTOCAT drawings )of the inner parts of the detectors were not yet imported into CATIA for all detectors.
Additionally the requirements for GEANT imply some simplifications and modifications, which cannot be retrieved from the drawings. Therefore the final geometry definitions was written directly into ASCII files and with an interface program stored in Oracle.

Features

Each volume has it own local coordinate system, which must not be positioned in the center of the volume.
The transformation describes the transformation of the local coordinate system of the daughter relative to the local coordinate system of the mother.
Some shapes are defined by a list of points (BOX, TRAP, TRD1, ...). This makes it easier to transfer the data from technical drawings into the file format, in especially for trapezes.
The geometry interface calculates automatically the parameters and transformations needed to create the volume in GEANT or ROOT.

Advantage of a local coordinate system:
In GEANT3 and ROOT the volume parameters are specified relative to the center of a volume.
The transformation therefore not only depends on the positioning of a daughter relative to the mother, but also from the size of both volumes.
In case the size of the mother changes asymmetrically, all daughter volumes need new transformations.
  • A simple (artificial) example:
    Example
For some reason the beam tube gets now 200 mm longer.
In the HADES input file one would not change the local coordinate system of the beam tube, but only change the volume parameters.
In the GEANT and ROOT definition one must change additionally the transformations of all three targets, because the center of the beam tube has moved.

Volume definition

A volume (except CAVE, which has no mother and therefore also no transformation) is defined by:
  • name of the volume
  • 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 row-wise as a vector

Names of volumes: All names start with a detector specific character.
Each volume has a name with at least 4 characters (upper case letters). Only the first 4 characters are used in GEANT (the name of the volume).
All volumes of which several copies exist (several nodes of the same volume) 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 22 (the outermost TOF) contains 8 identical cells T22S1 ... T22S8. The volume T22S is created only once via GSVOLU(...) but positioned 8 times via GSPOS(...).
The names of the sensitive volumes must have a special structure defined for each detector.

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 number, if several copies of the mother exist. This number must be the number of the first node of the mother, typically 1. (In GEANT only 4 characters are used, but the additional number is needed to find the mother in Oracle or in the file.)

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 (if not initialized from Oracle).
The predefined media in GEANT are not used.

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 local coordinate system in which the parameters are defined.
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 row-wise 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).
ALERT! The rotation matrix should be given with a precision of at least 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.

Volumes of which several copies exist may use a shortened input structure in the ASCII file:
For the first volume all information above is defined. For the other copies one must only specify
  • name of the volume
  • 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.

Shapes

Each shape is defined by a variable number of 'points' (one in each line of the input file), each having a maximum of 3 values.
Apart from the shapes with 8 corners (BOX , TRAP, TRD1) the parameter are at least very similar to the ones in GEANT.
Each shape has an intrinsic coordinate system. They are the same as in GEANT except for a TRAP and a TRD1.

Shapes

BOX

This shapes has 8 corners described by the x, y, z coordinates.

TRAP

This shapes has 8 corners described by the x, y, z coordinates. The corners are counted clockwise starting at the lower left corner of the bottom plane. The intrinsic coordinate system of a TRAP is different from the one in GEANT. The y-axis points from the smaller side in x-direction to the larger one. A TRAP not rotated in a Box has the same intrinsic coordinate system as the BOX. In GEANT the y- and x-axis point in the opposite directions.

TRD1

This shapes has 8 corners described by the x, y, z coordinates. The intrinsic coordinate system of a TRD1 is the same as for a TRAP, different from the definition in GEANT.

PGON

This shape has a variable number of 'points'.
point 0 NZ number of planes perpendicular to the z-axis where the section is given
point 1 azimuthal angle PHI1 at which the volume begins
opening angle DPHI of the volume
number NPDV of sides of the cross section between the phi limits
point 2ff z coordinate Z of the section
inner radius RMIN at position z
outer radius RMAX at position z

PCON

This shape has a variable number of 'points'.
point 0 NZ number of planes perpendicular to the z-axis where the section is given
point 1 azimuthal angle PHI1 at which the volume begins
opening angle DPHI of the volume
point 2ff z coordinate Z of the section
inner radius RMIN at position z
outer radius RMAX at position z

SPHE

This shape has 3 'points' with 2 parameters each.
point 0 inner radius RMIN of the shell
outer radius RMAX of the shell
point 1 starting polar angle THE1 of the shell
ending polar angle THE2 of the shell
point 2 starting azimuthal angle PHI1 of the shell
ending azimuthal angle PHI2 of the shell

TUBE

This shape has 3 'points'.
point 0 x, y, z coordinate of the center of the circle at the beginning of the tube
point 1 nner radius RMIN of the tube
outer radius RMAX of the tube
point 2 x, y, z coordinate of the center of the circle at the end of the tube

TUBS

This shape has 4 'points'.
point 0 x, y, z coordinate of the center of the circle at the beginning of the tubs
point 1 inner radius RMIN of the tubs
outer radius RMAX of the tubs
point 2 x, y, z coordinate of the center of the circle at the end of the tubs
point 3 starting angle PHI1 of the segment
ending angle PHI2 of the segment

CONE

This shape has 4 'points'.
point 0 x, y, z coordinate of the center of the circle at the beginning of the cone
point 1 inner radius RMIN at the beginning of the cone
outer radius RMAX at the beginning of the cone
point 2 x, y, z coordinate of the center of the circle at the end of the cone
point 3 inner radius RMN2 at the end of the cone
outer radius RMX2 at the end of the cone

CONS

This shape has 5 'points'.
Point 0 x, y, z coordinate of the center of the circle at the beginning of the cons
point 1 inner radius RMN1 at the beginning of the cons
outer radius RMX1 at the beginning of the cons
point 2 x, y, z coordinate of the center of the circle at the end of the cons
point 3 inner radius RMIN at the end of the cons
outer radius RMAX at the end of the cons
point 4 starting angle PHI1 of the segment
ending angle PHI2 of the segment

ELTU

This shape has 3 'points'.
point 0 x, y, z coordinate of the center of the ellipsoid at the beginning of the eltu
point 1 semi-axis P1 along x
semi-axis P2 along y
point 2 x, y, z coordinate of the center of the ellipsoid at the end of the eltu

ALERT! A TUBE, TUBS, CONE, ELTU can not be rotated by different x- and y-values of the starting and ending circles. They have to be identical.
A rotation can only be defined by a rotation matrix.

-- IlseKoenig - 16 Jul 2007
Topic revision: r1 - 2007-07-16, IlseKoenig
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki Send feedback | Imprint | Privacy Policy (in German)