NA49 logo


Home page

Last modification:


From the GNA49 MC space point information, the TPC response simulation generates raw data in the digitized format produced by the TPC readout electronics. Ideally this simulation should include all the effects like diffusion, distortions, charge loss which the track ionization cloud suffers as it drifts to the readout plane, amplification by field wires, coupling of the amplification signal to the readout plane, and amplification, shaping, and digitization by the readout electronics. In addition, other known non-ideal behavior of the detector system, which includes cross-talk between channels and undershoot at long times after a signal pulse, should be simulated. Instead of a detailed simulation of most of these effects, a parameterized response function is used. The parameters are fixed by as-build properties of the detector and electronics and by comparison of the simulation results to actual data.

The MTSIM program is used to simulate TPC raw data. It may be used in simulation-only mode or simulation & embed mode. To use this program in place of the raw data input file for the normal reconstruction run-script use: for simulation-only mode - mtsim:(gfile) or for simulation & embed mode - mtsim:(gfile),(rfile), where (gfile) is a Monte-Carlo data file produced by GNA49/G2DS and (rfile) is a NA49 raw data file.

1) A setup file can be used to specify geometry and perform customization, as is done in the standard run script (see run). The value of the variable SETUP specifies the setup file. If SETUP is not set, the file Setup will be used, if present.

2) The plugin uses internally defined defaults for setting up mtsim, and also for defining the vertical geometry in the case of simulation-only. These defaults are set in shell script functions and can be overridden by redefining the functions in the setup file. The functions which can be redefined are:

  • PadtransSetup() - define the vertical geometry in tpc structures in the file padtrans.d
  • MtsimSetup() - define the mtsim constant structures m_vtpc1, m_vtp2, m_mtpcl and m_mtpcr in the file mtsim.d
  • MtdedxSetup() - define the mtpc dedx constant structure mt_dedx_t in file mtdedx.d
  • PADTRANS - defining this variable to point to a user provided file causes the mtsim.plugin to read the PadtransSetup() from the specified file.


1) reconstruct 10 simulated events from file venus.ds using global chain with matching -
run 3905 -f Setup -256 -d all -MC -i mtsim:$SIMDIR/$SIMFILE -n 10 -o $OUTFILE

2) reconstruct 10 events containing tracks embedded from file flat.ds into raw data from run 1458, do matching -
run 3905 -f Setup -256 -d all -MC -i mtsim:$SIMDIR/$SIMFILE,$RAWFILE -n 10 -o $OUTFILE

Below you can see two scripts: one for reconstruction without embedding, and one with embedding.

  • Script to run reconstruction without embedding

  • Script to run reconstruction with embedding