README file for ALICE Time Of Flight Detector Offline Code ========================================================== Intorduction ------------ This is a short overview of the TOF code within the AliROOT framework. Some additional details have been introduced to Structure --------- There are 3 libraries build for the TOF. These are * libTOFbase: This contains the basic stuff, like data classes and managers. * libTOFsim: This contains code used by the simulation only. This includes the detector class, AliTOF, and its derivatives. It also contains the code for building the geometry, as well as the (s)digitisers, raw data writer, QA checker and data containers. * libTOFrec: Code needed for the reconstruction. This includes the reconstruction code itself, as well as cluster and track containers and QA checker. The content of these libraries is detailed more below. libTOFbase: ----------- Till today (February 6th 2008), it contains the following classes AliTOFGeometry: Manager of TOF geometry data. All code queries this manager for geometry parameters, so that the data are always consistent. AliTOFdigit AliTOFrawData AliTOFHitData AliTOFHitDataBuffer Base classes for digits and real digits. They are all data classes that hold the TOT and TOF values for a single sensitive TOF element. AliTOFChannelOffline AliTOFChannelOnline AliTOFChannelOnlineStatus AliTOFcalib AliTOFDataDCS AliTOFFormatDCS: Calibration data classes. AliTOFRawMap: A map of (AliTOFrawData) indices. The AliTOFRawStream class uses this map to store raw data before making digits or clusters. AliTOFDecoder AliTOFRawStream: Classes to read raw data files. AliTOFAlignment: AliTOFPreprocessor AliTOFPreprocessorFDR: libTOFsim: ---------- Till today (February 6th 2008), it contains the following classes AliTOF: Manager for all TOF simulation code. AliTOFv5T0 AliTOFv6T0: Simulation drivers for the TOF detector. AliTOFv5T0 corresponds to a simulation where services are not completly described AliTOFv6T0 contains a more detailed description of all TOF detector components. AliTOFhit AliTOFhitT0: Base classes for hits. They hold the geometrical and physical informations of a single sensitive TOF element, like the ALICE coordinates, the detector indices, i.e. 5 integer numbers (sector, module, strip, par-row and pad numbers), the hit coordinates in the pad reference system and the time-of-flight measurement. Moreover, they hold also some additional measurements, like the momentum components, the energy loss in the sensitive TOF element and the track incident angle on the pad. Only the AliTOFhitT0 object contains also the track length measurement. AliTOFSDigit: Base classes for sdigits. They hold the TOF detector informations, like the detector indices, i.e. 5 integer numbers (sector, module, strip, par-row and pad numbers), the time-of-flight and the time-over-threshold informations according to the test beam results. Each detector element can record more than one sdigit (but not more than 3). AliTOFSDigitizer AliTOFDigitizer: Base class for the (s)digitiser. AliTOFSDigitizer makes summable digits (AliTOFSDigit) from hits, and AliTOFDigitizer makes digits (quasi real data) from summable digits. AliTOFHitMap A map of (AliTOFSDigit) indices. The AliTOFSDigitizer uses this map to store simulation data (i.e. hits) before making sdigits. AliTOFDigitMap: A map of (AliTOFdigit) indices. The AliDDLRawData uses this map to store the TOF digits indices before making real digits (i.e. raw data). AliTOFDDLRawData: Base class for digit-to-raw_data transformation. It makes raw data from digits: practically, it transforms the 5 detector indices (sector, module, strip, pad-row and pad numbers) in hardware address, consisting of 5 induces (TOF readout module, slot, chain, TDC and channel numbers). AliTOFT0: AliTOFTrigger: AliTOFQAChecker AliTOFQADataMakerSim libTOFrec: ---------- Till today (February 6th 2008), it contains the following classes AliTOFRecoParam: AliTOFReconstructor: AliTOFcluster: Reconstructed point in the TOF. These objects are made AliTOFReconstructor. AliTOFClusterFinder: AliTOFtrack: Base classe for TOF tracks. It holds ... AliTOFtracker AliTOFtrackerMI AliTOFtrackerV1: AliTOFpidESD: AliTOFQADataMakerRec: TOF Calibration: ---------------- 1. Online Calibration 1.1. New Calibration Schema 1.1.1. Configuration The online calibration which is performed by the TOF preprocessor is configured according to a CDB object (stored in /TOF/Calib/Config), where a flag for the computation of the delays is set according to the type of data taking (cosmics ---> kFALSE / beam ---> kTRUE), and where the starting validity of the calibration objects that will be written in the OCDB is defined (see sec. 1.1.3.). The data are stored in the CDB object as entries in a TMap, with IDs "ComputingDelays" and "StartingRun" respectively. 1.1.2. Objects - AliTOFChannelOnlineArray: array of floats containing the delay value calculated for each TOF channel by the TOF preprocessor starting from the DAQ DA for PHYSICS runs (see TOFda.cxx). Inheriting from TObject. - AliTOFChannelOnlineStatusArray: array of chars defining the status for each TOF channel according to the processing of the data coming from PULSER and NOISE runs (TOFpulserda.cxx, TOFnoiseda.cxx). The status is defined also according to the FEE map written in the DCS FXS, where the status ON/OFF of the channels is stored. The first (least significant) two bits refer to the FEE status, the second two to the pulser data, and the third two to the noise data, leaving the last two empy. The status is always (FEE/pulser/noise) defined as: 00 --> Unknown; 01 --> Good; 10 --> Bad. Inheriting from TObject. 1.1.3. OCDB - /TOF/Calib/ParOnlineDelay: directory where the AliTOFChannelOnlineArray calibration objects are stored, with validity [0, 999999999], increasing the sv number every time. After offline calibration takes place, in case a reset is needed at run XYZ, the validity changes to [XYZ, 999999999], again with increasing sv. - /TOF/Calib/Status: directory where the AliTOFChannelOnlineStatusArray calibration objects are stored, with validity [current_run, 999999999]. In case of a PHYSICS run, the update occurs only if the FEE map has changed. In case of a PULSER/NOISE run, the update occurs once at the very end of the processing, so to merge the information from the FEE status map and those from the TOFpulserda/TOFnoiseda. 1.1.4. Reference Data - /TOF/Calib/DAQData: directory to store the histograms at run level that are produced by the TOFda. - /TOF/Calib/DCSData: directory to store the data that come out from the processing of the TOF DCS DPs. - /TOF/Calib/PulserData: directory to store the histograms that are produced by the TOFpulserda. - /TOF/Calib/NoiseData: directory to store the histograms that are produced by the TOFnoiseda. - /TOF/Calib/FEEData: directory to store the histogram reproducing the FEE status of the TOF channels. 1.1.5. Usage in Reconstruction During reconstruction, both the AliTOFChannelOnlineArray and the AliTOFChannelOnlineStatusArray corresponding to the current run have to be loaded from OCDB in the AliTOFReconstructor class instance. From there, they are passed to the AliTOFClusterFinder, where the status of the channel is used in order to decide whether to use it or not, while the delay is used to calibrate when the offline calibration information is not yet available. 1.2. Old Calibration Schema 1.2.1. Configuration No OCDB configuration entry is foreseen. 1.2.2. Objects - AliTOFChannelOnline: object containing the value of the delay for a certain TOF channel. Inheriting from TObject. An TObjArray of 157248 of such objects is used to store the information coming from the TOF online calibration. Inheriting from TObject. - AliTOFChannelOnlineStatus: object containing the status of a TOF channel as determined during the reading of the FEE map/ during a pulser run/ during a noise run. Three TObjArray objects of 157248 of such objects should be present in the OCDB for each run: one related to the FEE status of the channels, one related to pulser run results, and one related to noise run results. The status is defined as: 00 --> Unknown; 01 --> Good; 10 --> Bad. Inheriting from TObject. 1.2.3. OCDB - /TOF/Calib/ParOnline: directory where a TObjArray of 157248 AliTOFChannelOnline calibration objects are stored, with validity [0, 999999999], increasing the sv number every time. After offline calibration takes place, in case a reset is needed at run XYZ, the validity changes to [XYZ, 999999999], again with increasing sv. - /TOF/Calib/HW: directory where a TObjArray of 157248 AliTOFChannelOnlineStatus calibration objects are stored, with validity [current_run, 999999999], as obtained from reading the FEE map from the DCS FXS. The update occurs only if the FEE map has changed. - /TOF/Calib/Pulser: directory where a TObjArray of 157248 AliTOFChannelOnlineStatus calibration objects are stored, with validity [current_run, 999999999], as obtained from a pulser run. - /TOF/Calib/Noise: directory where a TObjArray of 157248 AliTOFChannelOnlineStatus calibration objects are stored, with validity [current_run, 999999999], as obtained from a noise run. 1.2.4. Reference Data - /TOF/Calib/DAQData: directory to store the histograms at run level that are produced by the TOFda. - /TOF/Calib/DCSData: directory to store the data that come out from the processing of the TOF DCS DPs. - /TOF/Calib/PulserData: directory to store the histograms that are produced by the TOFpulserda. - /TOF/Calib/NoiseData: directory to store the histograms that are produced by the TOFnoiseda. - /TOF/Calib/FEEData: directory to store the histogram reproducing the FEE status of the TOF channels. 1.2.5. Usage in Reconstruction During reconstruction, the TObjArray of AliTOFChannelOnline and the three TObjArray objects of AliTOFChannelOnlineStatus coming from the FEE map, the pulser run data, and the noise run data corresponding to the current run have to be loaded from OCDB in the AliTOFReconstructor class instance. From there, they are passed to the AliTOFClusterFinder, where the status of the channel is used in order to decide whether to use it or not, while the delay is used to calibrate when the offline calibration information is not yet available. 2. TOF Offline Calibration 2.1. Object - AliTOFChannelOffline: object containing the calibration parameters for each TOF channel that should correct both for the delay introduced by the electronics and the hardware, and for the time slewing effect. A TObjArray of 157248 of such objects is stored in the CDB to perform refined calibration during reconstruction. Inheriting from TObject. 2.2. OCDB - /TOF/Calib/ParOffline: directory containing the CDB entry corresponding to the offline calibration of the TOF as stored in a TObjArray object of 157248 AliTOFChannelOffline objects with validity [0, 999999999], increasing the sv number every time. In case a reset is needed at run XYZ, after collecting the statistics necessary to the offline calibration (when the online calibration object becomes valid again), the validity changes to [XYZ, 999999999], again with increasing sv. 2.3 Usage in Reconstruction The TObjArray of 157248 AliTOFChannelOffline objects is retrieved for the current run in AliTOFReconstructor, and passed to AliTOFClusterFinder. As soon as enough statistics is collected for every channel, since the validity of the offline calibration object was set, for each channel with a valid status, the calibration is performed using the calibration parameters present in this TObjArray of AliTOFChannelOffline. Authors: -------- Annalisa De Caro ---------------------------------------------------------------------- Local Variables: mode: text End: