File input for Hades Geometry

( updated April 15, 1998 by Ilse Koenig )

General


The filenames for the geometry definition and the media definition must have the suffix .geo and must contain a special keyword for every set:

The filenames for the hit definition must have the suffix .hit and must contain a special keyword for every set of sensitive volumes:


Files for media


Each medium is characterized by a name. The names of the materials and the media are identical. Together with the name all parameters must be given which are needed for the Geant routines GSMATE, GSMIXT, GSTMED and GSCKOV.
There are no predefined materials!

The following parameters are needed:

The variable npckov is 0 for all media except some special media used for the Rich where the tracking of the Cerenkov photons is necessary. These media have additinal parameters

Remark: In the present program version a mixture may contain a maximum of 5 components. If this is not sufficient one has to change MAXCOMP in hgeomedium.h.

The following parameters are normally not read. The default values are -1 and the real values are automatically calculated by Geant. If you want to set these values by yourself, you must type the keyword AUTONULL in your media file. After this keyword all media must contain these additional 4 parameters at the end.

Comments can be placed before a medium in a new line starting with //

Examples:

ALUMINIUM$1 26.98132.7 7.2548500 00.0001
0
corresponds to
namencompaw andensradleng sensflagfldflag fldepsil
npckov


C4F10-212.01 19.6. 9.7.35485 4.10.
01 3..001
0
corresponds to
namencompaw(1) aw(2)an(1) an(2)dens wm(1)wm(2)
sensflagfldflag fldepsil
npckov





Files for geometry


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:

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:

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

Remark: A (main) routine hgeoeuler.cc to calculate the rotation matrix from Euler angles can be found in the module 'ggeo' in the Hades-CVS.


Shapes

A variable number of 'points' (one in each line of the input file), each having a maximum of 3 values, can be stored in the program. Apart from the shapes with 8 corners (BOX , TRAP, TRD1) the parameter are at least very similar to the ones in Geant. Except for a TRAP and a TRD1 the intrinsic coordinate systems are defined as in Geant.

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. That's 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
point1: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:inner 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 RMN1 at the beginning of the cone
outer radius RMX1at 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 RMN2 at the end of the cons

outer radius RMX2 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

Warning: 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 described by a rotation matrix.

Example


File for hit definition


The hit files must contain the following parameters, needed for the Geant routines GSDET and GSDETH:

Comments are allowed only at the beginning and the end of the file in lines starting with //.

Remark: The Geant parameter IDTYP, the user defined detector type needed in the Geant routine GSDET is for each detector hardwired in the program.

Example


Implemented sets


General remark:: In the document Actual available input files and picture you can find the present status of the geometry, media and hit definitions together with some pictures.


Cave

It is a single volume with name CAVE and has no mother and no daughters (All volumes sitting in the cave have their own input files!).


Rich

The Rich is a single module with name RICH, which contains several subvolumes with names all starting with 'R'.

The keepin-volume RICH should have dimensions, which fit exactly to the sectors, so that a particle leaving the Rich in the forward hemisphere enters directly a sector.

The detector identifier for the hits IDTYP is 1.


Target

The target components (targets and support stuctures) are part of the Rich but have their own input file. The mothervolume in the Rich is RTAM. To position the target components properly it's necessary to check the lab-position of RTAM. All target components have names starting with 'T'. The targets must have the name TARG for a single target or TARGxx for a segmented target where xx stands for the number of the target.


Sectors

The set consists of 6 volumes SEC1 ... SEC6 all with the same shape (PGON), medium and dimensions, which are read only for the first one. The sectors are counted clockwise looking in beam direction and start with SEC1 in positive y-direction.

Important: The translation vector describing the position of the sector coordinate system in the cave must be 0. 0. 0..


Mdc

The Mdc consists of 4 driftchambers in each sector:

The dimensions of the driftchambers in different sectors are the same, but can have slightly different positions. (If the driftchamber sits directly in the cave the 5th character is missing.)

All subvolumes in the driftchambers have names starting with "D1"..."D4".
The sensitive volumes (layers) must have 4-character names. The 4th character is the number of the layer (e.g. D1S4 is the sensitive volume in layer 4 of driftchamber 1). The detector identifier for the hits IDTYP is calculated in the program: IDTYP=10*N+L, where N is the number of the driftchamber and L the number of the layer.


Coils

The Coils consist of one module in each sector: CKIV1 ... CKIV6. All volumes have names starting with 'C'.


Shower

The Shower consists of a keepin volume in each sector with names "SHK1" ... "SKH6".

Each keepin volume contains 3 modules:

All subvolumes in the modules have names starting with "S1", "S2" and "S3".

Each module contains only one sensitive layer. The detector identifier for the hits IDTYP is calculated in the program: IDTYP=50+N, where N is the number of the module.


Tof

The Tof wall consists of 22 modules in each sector:

All subvolumes in the modules have names starting with "T01" ... "T22".

In Geant the modules are not positioned directly in a sector but grouped together in keepin volumes:

The last character defines the sector. These keepin volumes are not read but calculated by the program for each sector from the corners of the first and last Tof modules in the respective keepin volume and the corners of the keepin volumes of the shower detector. (A particle leaving the Tof enters directly the Shower detector behind.) Therefore this file must contain the first and last module in the keepin volumes (T01Fx and T14Fx , T15Fx and T18Fx, T19Fx and T22Fx), eventually with the inout flag 0 if the volume should not be created. The may be only missing if the whole group of modules in the respective keepin volume should not be created.

Important: This file must also contain the geometry definition of the keepin volumes SHK1 ... SHK6 of the shower detector. (It's not read from the input file for the Shower detector. To avoid holes or overlapping volumes you should check if the definitions are identical in both files.)

Each module contains 8 identical sensitive cells. The detector identifier for the hits IDTYP is calculated in the program: IDTYP=100+N, where N is the number of the module.


Usergeo

This set allows to read and create up to 9 independent user defined modules (no common keepin volume! ) with names

The 5th character is the number of the sector and is missing if the volume sits directly in the CAVE.

All subvolumes have names starting with "U1" ... "U9".

Each module can contain one sensitive volume with its own file for hit definition. The name of the sensitive volume must 4 characters, there are no copies allowed. The detector identifier for the hits IDTYP is calculated in the program: IDTYP=150+N, where N is the number of the module.


Frames

This set allows to create all support structures which are not parts of a detector as independent modules. All of them may have substructures. All volumes have names starting with "F".

A module can be positioned in the cave ( having a 4-character name "Fxxx") or in the sectors (having 5-character names "Fxxx1" ..."Fxxx6").

Warning: The inout flag is not active, it is always 1. (That's necessary to create many different modules all given in the same input file.) To prevent the creation of a special support structure you have to cut the input for it from file.