Tracking Calorimeter Simulation for Tesla

last update: July 18th 2000

We've been developping Geant4 applications for simulation of a Tracking Calorimeter. A first application using only tubs have been exploited since january 99, the "lineaire" one. Since december 1999 we started from scratch a new application, "Mokka", to simulate a Tracking Calorimeter for the Tesla projet.

A few words about the first Lineaire program

We started it with the geometrical information from the NLC project with a very simple approach: using only tubes except for the masks, where we placed conical tubes.

This geometry evolved along 1999 and in the last lineaire release we are running with forty Tungsten and Silicon layers in the Ecal barrel,  as shown in this slide: thirty layers with 1.4 mm and ten layers with 4.3 mm as the Tungsten thickness.

The Hcal was made in the same way but one  would like to play with iron layers mixed with Tungsten ones. So for a set of layers we  have both, iron and Tungsten. The sensitive detector part or the Hcal is all the same as for the Ecal, Si layers placed inside two PCB plates.

But always we placed only tubes. And the cells where we collect hits are always projective in Theta and Phi. Also, all the geometrical data and simulation parameters are read from simple ASCII files at run time. These limitations let us to start a new software development, the Mokka project.



 

The Mokka project

The goals are:
   We choose as database server the MySQL one. It's a relational database server, free and widely portable. It works very well and it offers a lot of features, like a client-server model using TCP/IP, C and Java APIs and so on.

 About the software design, Mokka is a C++ application able to access the geometry database on the fly via a MySQL C++ wrapper and, using the Geant4 framework, build the detector geometry and simulate events in this geometry. The goal of course is to have the Ecal and Hcal hits stored in an output file.

 The run control and conditions are setup via some run control commands, it can be done via an interactive command dialogue or via a macro file execution. As one of the Geant4 facilities, it's very easy to read Pythia event files to be tracked inside the detector.

 Mokka is now able to generate Geant3 Fortran code for BRAHMS, the so called "backward facility".
 



Geometry Database

"Mokka" is runtime data driven by a MySQL DBMS. Starting from the calorimeters mechanic designs, we defined a first Entity-Relationship data model to describe and to keep the geometrical parameters in a relational database. To help to understand and to keep an useful documentation we drew  some technical sheets also.
With these technical sheets and the Entity-Relationship data models you can navigate in the database issuing SQL queries. In this way, it's quite easy to get all the tables you could need to build the detector volumes.
 
You can get the following more information about our first approach for the Ecal and Hcal geometry Databases:
(warning: the Hcal endcaps are still missing)

Output File data format

The following format has been used for each hit in the calorimeter:

  P   S   M   I   J   K   X   Y   Z   E   PID

You can read this output file with a Fortran program as the following:

      program readhits
      implicit none

      integer P,S,M,I,J,K,PID
      real x,y,z,e
...
      open (unit=1,file='event000000.hits',status='old')
      read (1,*,end=2000) P,S,M,I,J,K,x,y,z,e,PID
...


The automatic Fortran code generation by Mokka

The idea is quite simple: Geant3 and Geant4 deal both with the same kind of volume shapes, Box, Tubes and so on. So, in the Mokka C++ code where these shapes are placed we have all the information we need to write on the fly the Geant3 Fortran calls.

 We can do a mapping from some of the Geant4 geometry objects to the Geant3 geometry subroutines, like this one: the Geant4 Solid and LogicalVolume object creations can be translated to a Geant3 GSVOLU call; the Geant4 placement object creation by the Geant3 GPOS one.



Team working on the Geant4 simulation for Tracking Calorimeter:

      Henri VIDEAU
      Jean-Claude BRIENT
      Paulo Mora de Freitas