1 #ifndef ALITRDCALONLINEGAINTABLE_H
2 #define ALITRDCALONLINEGAINTABLE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 #include "AliTRDCalOnlineGainTableROC.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 //////////////////////////////////////////////////////////////////////////////////////////////
29 class AliTRDCalOnlineGainTable: public TObject
33 AliTRDCalOnlineGainTable();
34 AliTRDCalOnlineGainTable(const AliTRDCalOnlineGainTable& other);
35 AliTRDCalOnlineGainTable& operator=(const AliTRDCalOnlineGainTable& other);
36 ~AliTRDCalOnlineGainTable();
38 Float_t GetGainCorrectionFactor(Int_t det, Int_t row, Int_t col) const;
39 Float_t GetGainCorrectionFactor(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col) const;
41 Short_t GetAdcdac(Int_t det, Int_t row, Int_t col);
42 Short_t GetAdcdac(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col);
44 Float_t GetMCMGain(Int_t det, Int_t row, Int_t col);
45 Float_t GetMCMGain(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col);
47 Short_t GetFGAN(Int_t det, Int_t row, Int_t col);
48 Short_t GetFGAN(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col);
50 Short_t GetFGFN(Int_t det, Int_t row, Int_t col);
51 Short_t GetFGFN(Int_t sector, Int_t stack, Int_t layer, Int_t row, Int_t col);
53 void AllocateGainTableROC(Int_t det);
55 AliTRDCalOnlineGainTableROC *GetGainTableROC(Int_t det) const
57 // returns the Gain Table for the given detector
58 return fROCGainTables[det];
61 AliTRDCalOnlineGainTableROC *GetGainTableROC(Int_t sector, Int_t stack, Int_t layer) const
63 // returns the Gain Table for the given detector
64 return GetGainTableROC(sector*30 + stack*6 + layer);
67 static const Float_t UnDef;
71 AliTRDCalOnlineGainTableROC* fROCGainTables[540]; // Array of gain tables for all ROCs
73 ClassDef(AliTRDCalOnlineGainTable,2); // TRD online gain tables