]>
Commit | Line | Data |
---|---|---|
0116859c | 1 | #ifndef ALI_TPC_CORRECTION_H |
2 | #define ALI_TPC_CORRECTION_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 | // AliTPCCorrection class // | |
10 | // // | |
11 | // This class provides a general framework to deal with space point // | |
12 | // distortions. An correction class which inherits from here is for example // | |
13 | // AliTPCExBBShape or AliTPCExBTwist // | |
14 | // // | |
15 | // General functions are (for example): // | |
16 | // CorrectPoint(x,roc) where x is the vector of inital positions in // | |
17 | // cartesian coordinates and roc represents the Read Out chamber number // | |
18 | // according to the offline naming convention. The vector x is overwritten // | |
19 | // with the corrected coordinates. // | |
20 | // // | |
21 | // An alternative usage would be CorrectPoint(x,roc,dx), which leaves the // | |
22 | // vector x untouched, put returns the distortions via the vector dx // | |
23 | // // | |
24 | // The class allows "effective Omega Tau" corrections to be shifted to the // | |
25 | // single distortion classes. // | |
26 | // // | |
27 | // Note: This class is normally used via the class AliTPCComposedCorrection // | |
28 | // // | |
29 | // date: 27/04/2010 // | |
30 | // Authors: Magnus Mager, Stefan Rossegger, Jim Thomas // | |
31 | //////////////////////////////////////////////////////////////////////////////// | |
32 | ||
33 | ||
34 | #include <TNamed.h> | |
35 | class TH2F; | |
e527a1b9 | 36 | class TTimeStamp; |
0116859c | 37 | class TCollection; |
cf5b0aa0 | 38 | class TTreeSRedirector; |
39 | class AliExternalTrackParam; | |
0116859c | 40 | |
41 | class AliTPCCorrection : public TNamed { | |
42 | public: | |
43 | enum CompositionType {kParallel,kQueue}; | |
44 | ||
45 | AliTPCCorrection(); | |
46 | AliTPCCorrection(const char *name,const char *title); | |
47 | virtual ~AliTPCCorrection(); | |
48 | ||
49 | ||
50 | // functions to correct a space point | |
51 | void CorrectPoint ( Float_t x[],const Short_t roc); | |
52 | void CorrectPoint (const Float_t x[],const Short_t roc,Float_t xp[]); | |
53 | virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]); | |
54 | ||
55 | // functions to distort a space point | |
56 | void DistortPoint ( Float_t x[],const Short_t roc); | |
57 | void DistortPoint (const Float_t x[],const Short_t roc,Float_t xp[]); | |
58 | virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]); | |
59 | ||
e527a1b9 | 60 | // initialization and update functions |
0116859c | 61 | virtual void Init(); |
e527a1b9 | 62 | virtual void Update(const TTimeStamp &timeStamp); |
0116859c | 63 | |
64 | // convenience functions | |
65 | virtual void Print(Option_t* option="") const; | |
66 | ||
67 | TH2F* CreateHistoDRinXY (Float_t z=10.,Int_t nx=100,Int_t ny=100); | |
68 | TH2F* CreateHistoDRPhiinXY(Float_t z=10.,Int_t nx=100,Int_t nphi=100); | |
69 | TH2F* CreateHistoDRinZR (Float_t phi=0.,Int_t nZ=100,Int_t nR=100); | |
70 | TH2F* CreateHistoDRPhiinZR(Float_t phi=0.,Int_t nZ=100,Int_t nR=100); | |
71 | ||
72 | // normally called directly in the correction classes which inherit from this class | |
73 | virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2); | |
cf5b0aa0 | 74 | AliExternalTrackParam * FitDistortedTrack(const AliExternalTrackParam * trackIn, Double_t refX, Int_t dir,TTreeSRedirector *pcstream); |
0116859c | 75 | |
76 | protected: | |
77 | TH2F* CreateTH2F(const char *name,const char *title, | |
78 | const char *xlabel,const char *ylabel,const char *zlabel, | |
79 | Int_t nbinsx,Double_t xlow,Double_t xup, | |
80 | Int_t nbinsy,Double_t ylow,Double_t yup); | |
81 | ||
82 | static const Double_t fgkTPC_Z0; // nominal gating grid position | |
83 | static const Double_t fgkIFCRadius; // Mean Radius of the Inner Field Cage ( 82.43 min, 83.70 max) (cm) | |
84 | static const Double_t fgkOFCRadius; // Mean Radius of the Outer Field Cage (252.55 min, 256.45 max) (cm) | |
85 | static const Double_t fgkZOffSet; // Offset from CE: calculate all distortions closer to CE as if at this point | |
86 | static const Double_t fgkCathodeV; // Cathode Voltage (volts) | |
87 | static const Double_t fgkGG; // Gating Grid voltage (volts) | |
88 | ||
89 | enum {kNR= 92}; // Number of R points in the table for interpolating distortion data | |
90 | enum {kNZ= 270}; // Number of Z points in the table for interpolating distortion data | |
91 | static const Double_t fgkRList[kNR]; | |
92 | static const Double_t fgkZList[kNZ]; | |
93 | ||
94 | // Simple Interpolation functions: e.g. with tricubic interpolation (not yet in TH3) | |
95 | Int_t fJLow; | |
96 | Int_t fKLow; | |
97 | void Interpolate2DEdistortion( const Int_t order, const Double_t r, const Double_t z, | |
98 | const Double_t er[kNZ][kNR], Double_t &er_value ); | |
99 | Double_t Interpolate( const Double_t xArray[], const Double_t yArray[], | |
100 | const Int_t order, const Double_t x ); | |
101 | void Search( const Int_t n, const Double_t xArray[], const Double_t x, Int_t &low ); | |
102 | ||
103 | ||
104 | ||
105 | ClassDef(AliTPCCorrection,1); | |
106 | }; | |
107 | ||
108 | #endif |