1 #ifndef ALITRDCALONLINEGAINTABLEROC_H
2 #define ALITRDCALONLINEGAINTABLEROC_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 #include "AliTRDCalOnlineGainTableMCM.h"
9 //////////////////////////////////////////////////////////////////////////////////////////////
11 // Data structure to store gaintables of the online calibration in the OCDB
12 // consisting of three classes:
13 // AliTRDCalOnlineGainTable
14 // AliTRDCalOnlineGainTableROC
15 // AliTRDCalOnlineGainTableMCM
17 // AliTRDCalOnlineGainTable is the main class from which all stored data can be accessed.
18 // The two sub-classes AliTRDCalOnlineGainTableROC and AliTRDCalOnlineGainTableMCM
19 // contain the gaintables on ROC level and on the MCM level respectively.
21 // The online calibration is used to compensate gain deviations on the pad level.
22 // For the offline reconstruction the online calibration has to be undone.
23 // The corresponding gain correction factor that was used by the online gain filter can be accessed
24 // via the functions AliTRDCalOnlineGainTable::GetGainCorrectionFactor(Int_t det, Int_t row, Int_t col)
25 // and AliTRDCalOnlineGainTable::GetGainCorrectionFactor(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col).
27 // AliTRDCalOnlineGainTableROC is a class to allocate MCM Gain Tables
28 // and to access all stored calibration values from the ROC level by indicating row and col
30 //////////////////////////////////////////////////////////////////////////////////////////////
32 class AliTRDCalOnlineGainTableROC: public TObject
36 AliTRDCalOnlineGainTableROC();
37 AliTRDCalOnlineGainTableROC(const AliTRDCalOnlineGainTableROC& other);
38 AliTRDCalOnlineGainTableROC& operator=(const AliTRDCalOnlineGainTableROC& other);
39 ~AliTRDCalOnlineGainTableROC();
41 Float_t GetGainCorrectionFactor(Int_t row, Int_t col);
42 Short_t GetAdcdac(Int_t row, Int_t col);
43 Float_t GetMCMGain(Int_t row, Int_t col);
44 Short_t GetFGAN(Int_t row, Int_t col);
45 Short_t GetFGFN(Int_t row, Int_t col);
47 void AllocateGainTableMCM(Int_t rob, Int_t mcm);
49 AliTRDCalOnlineGainTableMCM* GetGainTableMCM(Int_t index) const
51 //returns the Gain Table of the given MCM
52 return fMCMGainTables[index];
55 AliTRDCalOnlineGainTableMCM* GetGainTableMCM(Int_t rob, Int_t mcm) const
57 //returns the Gain Table of the given MCM
58 return GetGainTableMCM(16*rob+mcm);
63 AliTRDCalOnlineGainTableMCM* fMCMGainTables[128]; // Array of gain tables for MCMs
65 ClassDef(AliTRDCalOnlineGainTableROC,2); // TRD online gain table of a ROC