]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/Base/AliTPCCorrectionLookupTable.h
Small modifications:
[u/mrichter/AliRoot.git] / TPC / Base / AliTPCCorrectionLookupTable.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 ////////////////////////////////////////////////////////////////////////////
5 // AliTPCCorrectionLookupTable class                                              //
6 // Authors: Jens Wiechula                                            //
7 ////////////////////////////////////////////////////////////////////////////
8
9 #include "AliTPCCorrection.h"
10 #include <TVectorD.h>
11 #include <TMatrixFfwd.h>
12
13 class AliTPCCorrectionLookupTable : public AliTPCCorrection {
14
15 public:
16   AliTPCCorrectionLookupTable();
17   virtual ~AliTPCCorrectionLookupTable();
18
19   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
20   virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
21
22   void SetupDefaultLimits();
23   void CreateLookupTable(AliTPCCorrection &tpcCorr, Float_t stepSize=5.);
24   void CreateLookupTableSinglePhi(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize=5.);
25
26   void MergePhiTables(const char* files);
27
28   Int_t GetNR()   const { return fNR;   }
29   Int_t GetNPhi() const { return fNPhi; }
30   Int_t GetNZ()   const { return fNZ;   }
31
32   const TVectorD& GetLimitsR()   const { return fLimitsR; }
33   const TVectorD& GetLimitsPhi() const { return fLimitsPhi; }
34   const TVectorD& GetLimitsZ()   const { return fLimitsZ; }
35   
36 private:
37
38   // sizes of lookup tables
39   // TODO: Remove, since it will be stored in the TVectorD anyhow?
40   Int_t     fNR;                   // number of rows (r) used for lookup table
41   Int_t     fNPhi;                 // number of phi slices used for lookup table
42   Int_t     fNZ;                   // number of columns (z) used for lookup table
43   //
44   TVectorD  fLimitsR;              // bin limits in row direction
45   TVectorD  fLimitsPhi;            // bin limits in phi direction
46   TVectorD  fLimitsZ;              // bin limits in z direction
47   // for distortion
48   TMatrixF **fLookUpDxDist;        //[fNPhi] Array to store electric field integral (int Er/Ez)
49   TMatrixF **fLookUpDyDist;        //[fNPhi] Array to store electric field integral (int Er/Ez)
50   TMatrixF **fLookUpDzDist;        //[fNPhi] Array to store electric field integral (int Er/Ez)
51
52   // for correction
53   TMatrixF **fLookUpDxCorr;        //[fNPhi] Array to store electric field integral (int Er/Ez)
54   TMatrixF **fLookUpDyCorr;        //[fNPhi] Array to store electric field integral (int Er/Ez)
55   TMatrixF **fLookUpDzCorr;        //[fNPhi] Array to store electric field integral (int Er/Ez)
56
57   void InitTables();
58   void InitTableArrays();
59   void InitTablesPhiBin(Int_t iPhi);
60   
61   void ResetTables();
62   void ResetLimits();
63   
64   void GetInterpolation(const Float_t x[],const Short_t roc,Float_t dx[],
65                         TMatrixF **mR, TMatrixF **mPhi, TMatrixF **mZ);
66
67   void CreateLookupTablePhiBin(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize);
68   
69   AliTPCCorrectionLookupTable(const AliTPCCorrectionLookupTable &corr);
70   AliTPCCorrectionLookupTable& operator= (const AliTPCCorrectionLookupTable &corr);
71   ClassDef(AliTPCCorrectionLookupTable,1);  // TPC corrections dumped into a lookup table
72 };
73
74