]>
Commit | Line | Data |
---|---|---|
05da1b4e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
7d855b04 | 4 | /// \class AliTPCCorrectionLookupTable |
5 | /// \brief AliTPCCorrectionLookupTable class | |
6 | /// | |
7 | /// \author Jens Wiechula | |
05da1b4e | 8 | |
9 | #include "AliTPCCorrection.h" | |
10 | #include <TVectorD.h> | |
11 | #include <TMatrixFfwd.h> | |
fef4baf6 | 12 | #include <THn.h> |
05da1b4e | 13 | |
14 | class AliTPCCorrectionLookupTable : public AliTPCCorrection { | |
15 | ||
16 | public: | |
17 | AliTPCCorrectionLookupTable(); | |
18 | virtual ~AliTPCCorrectionLookupTable(); | |
19 | ||
05da1b4e | 20 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); |
21 | virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]); | |
22 | ||
8d79bbb7 | 23 | void SetupDefaultLimits(); |
2d4e971f | 24 | void CreateLookupTable(AliTPCCorrection &tpcCorr, Float_t stepSize=5.); |
8d79bbb7 | 25 | void CreateLookupTableSinglePhi(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize=5.); |
26 | ||
fef4baf6 | 27 | void CreateLookupTableFromResidualDistortion(THn &resDist); |
637ba19a | 28 | void CreateResidual(AliTPCCorrection *distortion, AliTPCCorrection* correction); |
7d855b04 | 29 | |
8d79bbb7 | 30 | void MergePhiTables(const char* files); |
05da1b4e | 31 | |
fd245273 | 32 | void SetFillCorrection(Bool_t fill) { fFillCorrection=fill; } |
33 | Bool_t GetFillCorrection() const { return fFillCorrection; } | |
34 | void BuildExactInverse(); | |
35 | ||
8d79bbb7 | 36 | Int_t GetNR() const { return fNR; } |
37 | Int_t GetNPhi() const { return fNPhi; } | |
38 | Int_t GetNZ() const { return fNZ; } | |
05da1b4e | 39 | |
8d79bbb7 | 40 | const TVectorD& GetLimitsR() const { return fLimitsR; } |
41 | const TVectorD& GetLimitsPhi() const { return fLimitsPhi; } | |
42 | const TVectorD& GetLimitsZ() const { return fLimitsZ; } | |
7d855b04 | 43 | |
862220e2 | 44 | void SetCorrScaleFactor(Float_t val) { fCorrScaleFactor = val; } |
45 | Float_t GetCorrScaleFactor() const { return fCorrScaleFactor; } | |
7d855b04 | 46 | |
2d4e971f | 47 | private: |
05da1b4e | 48 | |
49 | // sizes of lookup tables | |
531a1f0b | 50 | // TODO: Remove, since it will be stored in the TVectorD anyhow? |
7d855b04 | 51 | Int_t fNR; ///< number of rows (r) used for lookup table |
52 | Int_t fNPhi; ///< number of phi slices used for lookup table | |
53 | Int_t fNZ; ///< number of columns (z) used for lookup table | |
54 | ||
55 | Float_t fCorrScaleFactor; ///< overall scaling factor for the correction | |
862220e2 | 56 | |
7d855b04 | 57 | Bool_t fFillCorrection; ///< whether to also fill the correction tables |
05da1b4e | 58 | // |
7d855b04 | 59 | TVectorD fLimitsR; ///< bin limits in row direction |
60 | TVectorD fLimitsPhi; ///< bin limits in phi direction | |
61 | TVectorD fLimitsZ; ///< bin limits in z direction | |
05da1b4e | 62 | // for distortion |
7d855b04 | 63 | /// Array to store electric field integral (int Er/Ez) |
64 | TMatrixF **fLookUpDxDist; //[fNPhi] | |
65 | /// Array to store electric field integral (int Er/Ez) | |
66 | TMatrixF **fLookUpDyDist; //[fNPhi] | |
67 | /// Array to store electric field integral (int Er/Ez) | |
68 | TMatrixF **fLookUpDzDist; //[fNPhi] | |
05da1b4e | 69 | |
70 | // for correction | |
7d855b04 | 71 | /// Array to store electric field integral (int Er/Ez) |
72 | TMatrixF **fLookUpDxCorr; //[fNPhi] | |
73 | /// Array to store electric field integral (int Er/Ez) | |
74 | TMatrixF **fLookUpDyCorr; //[fNPhi] | |
75 | /// Array to store electric field integral (int Er/Ez) | |
76 | TMatrixF **fLookUpDzCorr; //[fNPhi] | |
05da1b4e | 77 | |
78 | void InitTables(); | |
8d79bbb7 | 79 | void InitTableArrays(); |
80 | void InitTablesPhiBin(Int_t iPhi); | |
7d855b04 | 81 | |
05da1b4e | 82 | void ResetTables(); |
8d79bbb7 | 83 | void ResetLimits(); |
7d855b04 | 84 | |
05da1b4e | 85 | void GetInterpolation(const Float_t x[],const Short_t roc,Float_t dx[], |
2d4e971f | 86 | TMatrixF **mR, TMatrixF **mPhi, TMatrixF **mZ); |
05da1b4e | 87 | |
8d79bbb7 | 88 | void CreateLookupTablePhiBin(AliTPCCorrection &tpcCorr, Int_t iPhi, Float_t stepSize); |
fd245273 | 89 | |
90 | void FindClosestPosition(const Int_t binR, const Int_t binZ, const Int_t binPhi, | |
91 | const Float_t xref[3], Float_t xret[3]); | |
05da1b4e | 92 | AliTPCCorrectionLookupTable(const AliTPCCorrectionLookupTable &corr); |
93 | AliTPCCorrectionLookupTable& operator= (const AliTPCCorrectionLookupTable &corr); | |
7d855b04 | 94 | |
95 | /// \cond CLASSIMP | |
32d2109a | 96 | ClassDef(AliTPCCorrectionLookupTable,3); // TPC corrections dumped into a lookup table |
7d855b04 | 97 | /// \endcond |
05da1b4e | 98 | }; |
99 | ||
100 |