The Fortran based simulation described below is not in use anymore. It is being replaced by the simulation part of MarlinTPC.
Introduction
The TPC prototype simulation was developed with the goal of having a large flexibility. It was designed to simulate cosmic muons as well as testbeam data, to have an adjustable geometry for the different measurement setups, to be able to simulate a 3 GEM structure with separately adjustable effective gains and to simulate different read-out geometries (pad shapes and sizes).
It is very valuable in the analysis of reconstruction algorithms, because several systematics and effects can only be examined with the knowledge of the true track position.
The TPC prototype simulation has been developed in several phases over the years and it is written in Fortran.
Simulation Principle
The simulation works in several steps. In the first step the incident particles are simulated. Here the simulation of any particle type in a test-beam setup (fixed mass, momentum and straight tracks at defined angle and position) and the simulation of cosmic muons are possible.
The muon generator simulates cosmic muons with realistic angular and energy spectra. The energy of a generated muon is read in from a list that has been produced by a CORSICA simulation. For comparison with test-data, the geometry of a trigger-setup and the chamber geometry can be used to filter relevant trajectories.
In the following steps, the gas properties like the mixture, the water content and the pressure are taken into account. The primary ionization along these tracks is simulated with HEED. In this process the effects of the electric and magnetic field are not considered which leads to straight tracks and a field independent, three-dimensional distribution of the resulting electron cloud. Parameters like drift velocities and diffusion coefficients and attachment coefficients are external inputs, e.g. calculated by GARFIELD (here the electric and the magnetic field are considered).
The position evolution of these primary electrons in the drift field is done separately for every electron and a Gaussian smearing is used in each of the three dimensions. The electrons reaching the first GEM are "forced" into the closest GEM hole, where the amplification is simulated by applying an effective gain value which is smeared with a Polya distributed random number. Usually, the value of the effective gain is adjusted in several iterations by comparisons of the measured charge between the Monte Carlo results and the measured data.
The new electrons, that are produced during the amplification, are smeared flat inside the GEM hole. An expected extraction efficiency (as well as collection efficiency for the front surface of the GEM) is applied by random rejection of electrons according to measurements and simulations by the Aachen TPC group. The simulation of diffusion and attachement is repeated for the further gas volumes between two GEMs and between the last GEM and the readout structure with according parameters. The amplification and efficiency effects in the 2nd and third GEM are simulated as for the first GEM. The electrons reaching the readout plane are collected on pads according to the chosen pad geometries and sizes (limited to row-wise structures; pad shapes: rectangular and chevrons).
Figure 1 shows two examples to illustrate the evolution of the electron cloud:
-
-
Figure 1 - Development of the charge cloud at 1T (from left to right):
black: primary electrons from Heed; red: electrons after drift; blue: electrons after amplification
a) after 40 cm drift, before GEM amplification
b) after GEM amplification, before the pad plane
(click on a picture to see larger version)
The working principle of the simulation is also shown in Figure 2:
Outlook
The simulation has been used to understand both test data and reconstruction algorithms for this data. Particularly before the availability of a slow-control system, external effects like pollution of the gas mixture with water have been derived from comparison of simulation and data. Beyond available data, the effects of different setups (e.g. GEM settings, distances, applied fields, read-out structures) can be tested. The availability of the MonteCarlo "true" information allows for the investigation of the systematics of reconstruction algorithms of MultiFit and the different fit methods.
For the large prototype, probably other tools, which are based on the common ILC software framework, will be used or developed. A candidate is the TPCGEMSimulation from the Aachen TPC group, which has recently been included in the MarlinTPC framework.

