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