Minor updates (and bugfixes) to allow an efficient fitting of the physical
[u/mrichter/AliRoot.git] / TPC / AliTPCFCVoltError3D.h
CommitLineData
c9cbd2f2 1#ifndef ALITPCFCVOLTERROR3D_H
2#define ALITPCFCVOLTERROR3D_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////////
8// //
9// AliTPCFCVoltError3D class //
10// date: 01/06/2010 //
11// Authors: Jim Thomas, Stefan Rossegger //
12////////////////////////////////////////////////////////////////////////////
13
14#include "AliTPCCorrection.h"
15
16
17class AliTPCFCVoltError3D : public AliTPCCorrection {
18public:
19 AliTPCFCVoltError3D();
20 virtual ~AliTPCFCVoltError3D();
21
22 // initialization and update functions
23 virtual void Init();
24 virtual void Update(const TTimeStamp &timeStamp);
25
26 // common setters and getters for tangled ExB effect
27 virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
28 fT1=t1; fT2=t2;
29 const Double_t wt0=t2*omegaTau; fC0=1./(1.+wt0*wt0);
30 const Double_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1);
31 };
32 void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE
33 Float_t GetC0() const {return fC0;}
34 Float_t GetC1() const {return fC1;}
35
36 // setters and getters
37
38 // Set rod shift in Voltage equivalents (40V ~ 1mm)
39 // rod numbers: 0-17 (IFC), 18-35 (OFC)
40 // note: strips move accordingly
41 void SetRodVoltShiftA(Int_t rod, Float_t voltOffset) {fRodVoltShiftA[rod]=voltOffset; fInitLookUp=kFALSE;}
42 void SetRodVoltShiftC(Int_t rod, Float_t voltOffset) {fRodVoltShiftC[rod]=voltOffset; fInitLookUp=kFALSE;}
43 Float_t GetRodVoltShiftA(Int_t i) const {return fRodVoltShiftA[i];}// 0-17: IFC, 18-35; OFC
44 Float_t GetRodVoltShiftC(Int_t i) const {return fRodVoltShiftC[i];}// 0-17: IFC, 18-35; OFC
45
46 // Set rotated clip (just at High Voltage RODs) in Voltage equivalents (40V ~ 1mm)
47 // rod number: 0 (IFC), 1 (OFC)
48 void SetRotatedClipVoltA(Int_t rod, Float_t voltOffset) {fRotatedClipVoltA[rod]=voltOffset; fInitLookUp=kFALSE;}
49 void SetRotatedClipVoltC(Int_t rod, Float_t voltOffset) {fRotatedClipVoltC[rod]=voltOffset; fInitLookUp=kFALSE;}
50 Float_t GetRotatedClipVoltA(Int_t i) const {return fRotatedClipVoltA[i];}// (0,1):(IFC,OFC)
51 Float_t GetRotatedClipVoltC(Int_t i) const {return fRotatedClipVoltC[i];}// (0,1):(IFC,OFC)
52
53 // Set rod shift in Voltage equivalents (40V ~ 1mm)
54 // rod numbers: 0-17 (OFC)
55 // note: strips DO NOT move, only the copper rods do ...
56 void SetOFCRodShiftA(Int_t rod, Float_t voltOffset) {fOFCRodShiftA[rod]=voltOffset; fInitLookUp=kFALSE;}
57 void SetOFCRodShiftC(Int_t rod, Float_t voltOffset) {fOFCRodShiftC[rod]=voltOffset; fInitLookUp=kFALSE;}
58 Float_t GetOFCRodShiftA(Int_t i) const {return fOFCRodShiftA[i];}// 0-17: OFC
59 Float_t GetOFCRodShiftC(Int_t i) const {return fOFCRodShiftC[i];}// 0-17: OFC
60
61
62 void InitFCVoltError3D(); // Fill the lookup tables
63
64 virtual void Print(const Option_t* option="") const;
65
66protected:
67 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
68
69private:
70
71 AliTPCFCVoltError3D(const AliTPCFCVoltError3D &); // not implemented
72 AliTPCFCVoltError3D &operator=(const AliTPCFCVoltError3D &); // not implemented
73
74 Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions)
75 Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions)
76 Float_t fRodVoltShiftA[36]; // Rod (&strips) shift in Volt (40V~1mm)
77 Float_t fRodVoltShiftC[36]; // Rod (&strips) shift in Volt (40V~1mm)
78 Float_t fRotatedClipVoltA[2]; // rotated clips at HV rod
79 Float_t fRotatedClipVoltC[2]; // rotated clips at HV rod
8847ede1 80 Float_t fOFCRodShiftA[18]; // only Rod shift on OFC
81 Float_t fOFCRodShiftC[18]; // only Rod shift on OFC
c9cbd2f2 82
83 Bool_t fInitLookUp; // flag to check it the Look Up table was created (SUM)
84 Bool_t fInitLookUpBasic[5]; // flag if the basic lookup was created (shifted Rod (IFC,OFC) or rotated clip (IFC,OFC))
85
86
87 TMatrixD *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
88 TMatrixD *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
89 TMatrixD *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
90
91 // basic numbers for the poisson relaxation //can be set individually in each class
92 enum {kRows =257}; // grid size in r direction used in the poisson relaxation // ( 2**n + 1 ) eg. 65, 129, 257 etc.
93 enum {kColumns=129}; // grid size in z direction used in the poisson relaxation // ( 2**m + 1 ) eg. 65, 129, 257 etc.
94 enum {kPhiSlicesPerSector = 10 }; // number of points in phi slices
95 enum {kPhiSlices = 1+kPhiSlicesPerSector*3 }; // number of points in phi for the basic lookup tables
96 enum {kIterations=100}; // Number of iterations within the poisson relaxation
97
98 // ugly way to store "partial" look up tables
99 // needed for the faster calculation of the final distortion table
100
101 // for Rod and Strip shift
102 TMatrixD *fLookUpBasic1ErOverEz[kPhiSlices]; // Array to store electric field integral (int Er/Ez)
103 TMatrixD *fLookUpBasic1EphiOverEz[kPhiSlices]; // Array to store electric field integral (int Ephi/Ez)
104 TMatrixD *fLookUpBasic1DeltaEz[kPhiSlices]; // Array to store electric field integral (int Ez)
105
106 TMatrixD *fLookUpBasic2ErOverEz[kPhiSlices]; // Array to store electric field integral
107 TMatrixD *fLookUpBasic2EphiOverEz[kPhiSlices]; // Array to store electric field integral
108 TMatrixD *fLookUpBasic2DeltaEz[kPhiSlices]; // Array to store electric field integral
109
110 // for rotated clips
111 TMatrixD *fLookUpBasic3ErOverEz[kPhiSlices]; // Array to store electric field integral
112 TMatrixD *fLookUpBasic3EphiOverEz[kPhiSlices]; // Array to store electric field integral
113 TMatrixD *fLookUpBasic3DeltaEz[kPhiSlices]; // Array to store electric field integral
114
115 TMatrixD *fLookUpBasic4ErOverEz[kPhiSlices]; // Array to store electric field integral
116 TMatrixD *fLookUpBasic4EphiOverEz[kPhiSlices]; // Array to store electric field integral
117 TMatrixD *fLookUpBasic4DeltaEz[kPhiSlices]; // Array to store electric field integral
118
119 // for (only rod) shift (just OFC since they are copper plated)
120 TMatrixD *fLookUpBasic5ErOverEz[kPhiSlices]; // Array to store electric field integral
121 TMatrixD *fLookUpBasic5EphiOverEz[kPhiSlices]; // Array to store electric field integral
122 TMatrixD *fLookUpBasic5DeltaEz[kPhiSlices]; // Array to store electric field integral
123
124
8847ede1 125 ClassDef(AliTPCFCVoltError3D,1); //
c9cbd2f2 126};
127
128#endif