Fixed a bug :)
[u/mrichter/AliRoot.git] / TPC / AliTPCROCVoltError3D.h
CommitLineData
c9cbd2f2 1#ifndef ALITPCROCVOLTERROR3D_H
2#define ALITPCROCVOLTERROR3D_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// AliTPCROCVoltError3D class //
10// date: 01/06/2010 //
11// Authors: Jim Thomas, Stefan Rossegger //
12////////////////////////////////////////////////////////////////////////////
13
14#include "AliTPCCorrection.h"
15#include "TH2F.h"
16
17
18class AliTPCROCVoltError3D : public AliTPCCorrection {
19public:
20 AliTPCROCVoltError3D();
21 virtual ~AliTPCROCVoltError3D();
22
23 // initialization and update functions
24 virtual void Init();
25 virtual void Update(const TTimeStamp &timeStamp);
26
27 // common setters and getters for tangled ExB effect
28 virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
29 fT1=t1; fT2=t2;
30 const Double_t wt0=t2*omegaTau; fC0=1./(1.+wt0*wt0);
31 const Double_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1);
32 };
33 void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE
34 Float_t GetC0() const {return fC0;}
35 Float_t GetC1() const {return fC1;}
36
37 // setters and getters
38 void SetROCDataFileName(char *const fname);
39 char* GetROCDataFileName() const {return fROCDataFileName;}
40
41 // flag to wheter or not include the z aligment in the dz calculation
42 // if FALSE, the dz offset is purely due to the electric field change
43 void SetROCDisplacement(Bool_t flag) { fROCdisplacement = flag; fInitLookUp=kFALSE;}
44 Bool_t GetROCDisplacement() const { return fROCdisplacement; }
45
46
47 void InitROCVoltError3D(); // Fill the lookup tables
48
49 Float_t GetROCVoltOffset(Int_t side, Float_t r0, Float_t phi0);
50 TH2F* CreateHistoOfZSurvey(Int_t side, Int_t nx=250, Int_t ny=250);
51
52 virtual void Print(const Option_t* option="") const;
53
54protected:
55 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
56
57private:
58
59 AliTPCROCVoltError3D(const AliTPCROCVoltError3D &); // not implemented
60 AliTPCROCVoltError3D &operator=(const AliTPCROCVoltError3D &); // not implemented
61
62 Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions)
63 Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions)
64
65 Bool_t fROCdisplacement; // flag on wheter to consider the ROC displacement
66 // when calculating the z distortions
67 Bool_t fInitLookUp; // flag to check it the Look Up table was created (SUM)
68
69 TMatrixD *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
70 TMatrixD *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
71 TMatrixD *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
72
73 char *fROCDataFileName; // filename of the survey data containing the lin Fit values
74 TMatrixD *fdzDataLinFit; // Linear fits of dz survey points (each sector=72) (z0,slopeX,slopeY)
75
76 // basic numbers for the poisson relaxation //can be set individually in each class
77 enum {kRows =257}; // grid size in r direction used in the poisson relaxation // ( 2**n + 1 ) eg. 65, 129, 257 etc.
78 enum {kColumns=129}; // grid size in z direction used in the poisson relaxation // ( 2**m + 1 ) eg. 65, 129, 257 etc.
79 enum {kPhiSlicesPerSector=6}; // phi slices per sector
80 enum {kPhiSlices = 18*kPhiSlicesPerSector }; // number of points in phi for the basic lookup tables
81 enum {kIterations=100}; // Number of iterations within the poisson relaxation
82
83 ClassDef(AliTPCROCVoltError3D,0);
84};
85
86#endif