]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/Base/AliTPCCorrectionLookupTable.h
Changing the class version after modifications of the class layout in previous revisions.
[u/mrichter/AliRoot.git] / TPC / Base / AliTPCCorrectionLookupTable.h
CommitLineData
05da1b4e 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
13class AliTPCCorrectionLookupTable : public AliTPCCorrection {
14
15public:
16 AliTPCCorrectionLookupTable();
17 virtual ~AliTPCCorrectionLookupTable();
18
05da1b4e 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
8d79bbb7 22 void SetupDefaultLimits();
2d4e971f 23 void CreateLookupTable(AliTPCCorrection &tpcCorr, Float_t stepSize=5.);
8d79bbb7 24 void CreateLookupTableSinglePhi(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize=5.);
25
26 void MergePhiTables(const char* files);
05da1b4e 27
fd245273 28 void SetFillCorrection(Bool_t fill) { fFillCorrection=fill; }
29 Bool_t GetFillCorrection() const { return fFillCorrection; }
30 void BuildExactInverse();
31
8d79bbb7 32 Int_t GetNR() const { return fNR; }
33 Int_t GetNPhi() const { return fNPhi; }
34 Int_t GetNZ() const { return fNZ; }
05da1b4e 35
8d79bbb7 36 const TVectorD& GetLimitsR() const { return fLimitsR; }
37 const TVectorD& GetLimitsPhi() const { return fLimitsPhi; }
38 const TVectorD& GetLimitsZ() const { return fLimitsZ; }
39
862220e2 40 void SetCorrScaleFactor(Float_t val) { fCorrScaleFactor = val; }
41 Float_t GetCorrScaleFactor() const { return fCorrScaleFactor; }
42
2d4e971f 43private:
05da1b4e 44
45 // sizes of lookup tables
531a1f0b 46 // TODO: Remove, since it will be stored in the TVectorD anyhow?
2d4e971f 47 Int_t fNR; // number of rows (r) used for lookup table
05da1b4e 48 Int_t fNPhi; // number of phi slices used for lookup table
49 Int_t fNZ; // number of columns (z) used for lookup table
862220e2 50
51 Float_t fCorrScaleFactor; // overall scaling factor for the correction
52
fd245273 53 Bool_t fFillCorrection; // whether to also fill the correction tables
05da1b4e 54 //
531a1f0b 55 TVectorD fLimitsR; // bin limits in row direction
56 TVectorD fLimitsPhi; // bin limits in phi direction
57 TVectorD fLimitsZ; // bin limits in z direction
05da1b4e 58 // for distortion
59 TMatrixF **fLookUpDxDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
2d4e971f 60 TMatrixF **fLookUpDyDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
61 TMatrixF **fLookUpDzDist; //[fNPhi] Array to store electric field integral (int Er/Ez)
05da1b4e 62
63 // for correction
64 TMatrixF **fLookUpDxCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
2d4e971f 65 TMatrixF **fLookUpDyCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
66 TMatrixF **fLookUpDzCorr; //[fNPhi] Array to store electric field integral (int Er/Ez)
05da1b4e 67
68 void InitTables();
8d79bbb7 69 void InitTableArrays();
70 void InitTablesPhiBin(Int_t iPhi);
71
05da1b4e 72 void ResetTables();
8d79bbb7 73 void ResetLimits();
74
05da1b4e 75 void GetInterpolation(const Float_t x[],const Short_t roc,Float_t dx[],
2d4e971f 76 TMatrixF **mR, TMatrixF **mPhi, TMatrixF **mZ);
05da1b4e 77
8d79bbb7 78 void CreateLookupTablePhiBin(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize);
fd245273 79
80 void FindClosestPosition(const Int_t binR, const Int_t binZ, const Int_t binPhi,
81 const Float_t xref[3], Float_t xret[3]);
05da1b4e 82 AliTPCCorrectionLookupTable(const AliTPCCorrectionLookupTable &corr);
83 AliTPCCorrectionLookupTable& operator= (const AliTPCCorrectionLookupTable &corr);
32d2109a 84
85 ClassDef(AliTPCCorrectionLookupTable,3); // TPC corrections dumped into a lookup table
05da1b4e 86};
87
88