You are here

User Interface to Raw Data

Simulation

The user interface to the simulation of raw data is provided by the class AliSimulation.

To run the full simulation chain and to create raw data for all detectors the following lines can be typed in aliroot:
  AliSimulation sim;
  sim.SetWriteRawData("ALL");
  sim.Run();
The first argument of the SetWriteRawData method is a string with a space separated list of detectors for which raw data will be created. The special string "ALL" means all detectors. By default raw data DDL files are created as output format. An alternative output format can be specified by a second argument. This argument is a string with a DATE or ROOT file name. A ROOT file name is identified by the extension ".root". Only the final output format is kept and intermediate raw data files are deleted if the optional third argument of the method is kTRUE.

Raw data can be created directly from digits with the method WriteRawData. The following example will create a ROOT raw data file with name raw.root containing raw data from TRD and PMD:
  AliSimulation sim;
  sim.WriteRawData("TRD PMD", "raw.root");
The arguments of WriteRawData are the same as of the SetWriteRawData method.

Internally the ROOT raw data file is not created directly. First the DDL raw data files are produced. Then they are converted to a DATE file. This DATE file is finally converted to a ROOT file. The single steps of this sequence can be executed separately as shown below:
  AliSimulation sim;
  sim.WriteRawFiles("TRD PMD");
  sim.ConvertRawFilesToDate("raw.date");
  sim.ConvertDateToRoot("raw.date", "raw.root");

The conversion of DDL raw data files to a DATE file is performed by the program dateStream. This program is provided by DATE and is available at /afs/cern.ch/alice/library/local/bin/. A DATE file can only be produced if this directory is in the path environment variable or the dateStream program is copied to a directory in the path.

For the conversion of a DATE to a ROOT file the program alimdc is needed. It can be obtained from the aliroot module RAW (aliroot version not older than July 6th, 2004):
  cd $ALICE_ROOT/RAW
  touch Make-depend
  make depend
  make rdm
  cp alimdc $ALICE_BIN
When the alimdc program is invoked it prints some error messages which can be ignored.

Reconstruction

 

The user interface to the reconstruction of raw data is provided by the class AliReconstruction.

The input data can be specified by the SetInput method or by an argument to the Run method. The argument is a string which determines the input format:

  • If the string ends with "/", it is interpreted as a directory containing raw data DDL files.
  • If the string ends with ".root", it is interpreted as a file name containing raw data in ROOT format.
  • Any other non-empty string is interpreted as a file name containing raw data in DATE format.
  • In case of an empty string the Monte Carlo root files are used as input. This is the default.

The full reconstruction chain using raw data DDL files in the current directory as input can be executed by the following commands typed in aliroot:
  AliReconstruction rec;
  rec.SetInput("./");
  rec.Run();
This is equivalent to:
  AliReconstruction rec;
  rec.Run("./");

If the DATE file raw.date should be used as input, the commands are:
  AliReconstruction rec;
  rec.Run("raw.date");

For a ROOT raw data file named raw.root as input the reconstruction is executed by the following lines:
  AliReconstruction rec;
  rec.Run("raw.root");