During simulation: fill STU region w/ non null time sums
[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////////////////////////////////////////////////////////////////////////////
b4caed64 8// AliTPCROCVoltError3D class //
c9cbd2f2 9// Authors: Jim Thomas, Stefan Rossegger //
10////////////////////////////////////////////////////////////////////////////
11
12#include "AliTPCCorrection.h"
13#include "TH2F.h"
14
15
16class AliTPCROCVoltError3D : public AliTPCCorrection {
17public:
18 AliTPCROCVoltError3D();
19 virtual ~AliTPCROCVoltError3D();
20
21 // initialization and update functions
22 virtual void Init();
23 virtual void Update(const TTimeStamp &timeStamp);
24
25 // common setters and getters for tangled ExB effect
26 virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
27 fT1=t1; fT2=t2;
28 const Double_t wt0=t2*omegaTau; fC0=1./(1.+wt0*wt0);
29 const Double_t wt1=t1*omegaTau; fC1=wt1/(1.+wt1*wt1);
30 };
31 void SetC0C1(Float_t c0,Float_t c1) {fC0=c0;fC1=c1;} // CAUTION: USE WITH CARE
32 Float_t GetC0() const {return fC0;}
33 Float_t GetC1() const {return fC1;}
acf5907b 34 void SetROCData(TMatrixD * matrix);
c9cbd2f2 35 // setters and getters
acf5907b 36 void SetROCDataFileName(const char * fname);
37 const Char_t* GetROCDataFileName() const {return fROCDataFileName.Data();}
c9cbd2f2 38
39 // flag to wheter or not include the z aligment in the dz calculation
40 // if FALSE, the dz offset is purely due to the electric field change
7a348589 41 void SetROCDisplacement(Bool_t flag) {
42 if (flag!=fROCdisplacement) { fROCdisplacement = flag; fInitLookUp=kFALSE; }
43 }
c9cbd2f2 44 Bool_t GetROCDisplacement() const { return fROCdisplacement; }
7a348589 45
46 // flag on wheter to consider the difference in the electron arrival between IROC and OROC
47 // due to the different position of the Anode wires
48 void SetElectronArrivalCorrection(Bool_t flag) {
49 if (flag!=fElectronArrivalCorrection) { fElectronArrivalCorrection = flag; fInitLookUp=kFALSE; }
50 }
51 Bool_t GetElectronArrivalCorrection() const { return fElectronArrivalCorrection; }
c9cbd2f2 52
53
54 void InitROCVoltError3D(); // Fill the lookup tables
2bf29b72 55 void ForceInitROCVoltError3D() { fInitLookUp=kFALSE; InitROCVoltError3D(); };
c9cbd2f2 56
57 Float_t GetROCVoltOffset(Int_t side, Float_t r0, Float_t phi0);
7a348589 58 TH2F* CreateHistoOfZAlignment(Int_t side, Int_t nx=250, Int_t ny=250);
c9cbd2f2 59
60 virtual void Print(const Option_t* option="") const;
f2efa2c7 61 TMatrixD *GetMatrix() const {return fdzDataLinFit;} // Linear fits of dz survey points (each sector=72) (z0,slopeX,slopeY)
c9cbd2f2 62
63protected:
64 virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
65
66private:
67
68 AliTPCROCVoltError3D(const AliTPCROCVoltError3D &); // not implemented
69 AliTPCROCVoltError3D &operator=(const AliTPCROCVoltError3D &); // not implemented
70
71 Float_t fC0; // coefficient C0 (compare Jim Thomas's notes for definitions)
72 Float_t fC1; // coefficient C1 (compare Jim Thomas's notes for definitions)
73
74 Bool_t fROCdisplacement; // flag on wheter to consider the ROC displacement
75 // when calculating the z distortions
7a348589 76 Bool_t fElectronArrivalCorrection; // flag on wheter to consider the difference
77 // in the electron arrival between IROC and OROC
78 // due to the different position of the Anode wires
7a348589 79
c9cbd2f2 80 Bool_t fInitLookUp; // flag to check it the Look Up table was created (SUM)
81
2bf29b72 82 TMatrixF *fLookUpErOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
83 TMatrixF *fLookUpEphiOverEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
84 TMatrixF *fLookUpDeltaEz[kNPhi]; // Array to store electric field integral (int Er/Ez)
c9cbd2f2 85
acf5907b 86 TString fROCDataFileName; // filename of the survey data containing the lin Fit values
c9cbd2f2 87 TMatrixD *fdzDataLinFit; // Linear fits of dz survey points (each sector=72) (z0,slopeX,slopeY)
88
89 // basic numbers for the poisson relaxation //can be set individually in each class
90 enum {kRows =257}; // grid size in r direction used in the poisson relaxation // ( 2**n + 1 ) eg. 65, 129, 257 etc.
91 enum {kColumns=129}; // grid size in z direction used in the poisson relaxation // ( 2**m + 1 ) eg. 65, 129, 257 etc.
8847ede1 92 enum {kPhiSlicesPerSector=10}; // phi slices per sector
c9cbd2f2 93 enum {kPhiSlices = 18*kPhiSlicesPerSector }; // number of points in phi for the basic lookup tables
94 enum {kIterations=100}; // Number of iterations within the poisson relaxation
95
2bf29b72 96 ClassDef(AliTPCROCVoltError3D,2);
c9cbd2f2 97};
98
99#endif