Geometry

GEANT4 needs a geometry to run, but this can be anyone, as it will not be used for tracking. Nevertheless, if you want to set some condition on a given cell (volume) you have to previously define it. And if you want for example to get a F4 tally (cell scorer) you have to set the right cubic volume of the cell.

An important difference of GEANT4 with respect to MCNP is that geometry parts are defined as volumes (box, cube, cone, trapezoid, ...) and placed one with respect to the other. There is no concept of surface, so you cannot define any; but we have added a trick to be able to du surface tallies (see section on tallies).

A simple example of a geometry, implementing a unique volume named cell_11 of cubic volume 20 cm3 is the following:


      :VOLU world BOX 1000 1000 1000 G4_AIR
      :MATE mate_11 1 1 1.
      :VOLU cell_11 BOX 20.*cm 1.*cm 1.*cm mate_11
      :ROTM RM0 0 0 0 
      :PLACE cell_11 1 world RM0 0 0 0 
    

You can define the explanation of the geometry text file format in the chapter about Geometry in this guide, but we will go though this example line by line for better understanding.

The first line defines a world volume, what is mandatory in GEANT4. This volume is simply one that is not placed anywhere, but others are placed inside it.

The second line defines a material. Materials are also not used, but you may like to define one with the name you like, for example for applying some condition in it. In this example we have defined a simple material named mate_11 of atomic number 1, atomic mass 1 and density 1.

The third line defines a volume (cell in MCNP terminology) that is a box. The only important thing is the name you give to it and its cubic volume; therefore we recommend you to define always a box with one dimension equal to the cubic volume and the other two equal to 1 cm. One important thing to mark here: GEANT4 default unit is mm, not cm; for this reason we have explicitly multiplied the box dimensions by cm.

Once you have defined a volume, you have to place it into another one. To do this you need to define the relative rotation matrix and the relative position. As rotation matrix we have defined the unity (rotation of 0 around X, 0 around Y and 0 around Z). As you can see for placing a volume you have to define first the volume name, the volume copy (as you may place several copies of the same volume) and the name of the parent volume; then the name of the rotation matrix and finally the three relative position coordinates. If you need to define more volumes, you can simply copy this one as many times as you like, changing the name.

Note that the name of the volume is cell_N. You may indeed call the volume as you like, but when GAMOS read a step from the ptrac file and finds that the cell ID is N, it will assume that the particle is in a volume called cell_N. So, if you want to do scoring or filtering in a volume, you have to use this notation.