108615fc |
1 | #ifndef ALIL3TRANSFORM_H |
2 | #define ALIL3TRANSFORM_H |
3 | |
108615fc |
4 | #include "AliL3RootTypes.h" |
5 | class TFile; |
6 | |
7 | class AliL3Transform { |
8 | private: |
108615fc |
9 | Int_t fNTimeBins; |
10 | Int_t fNRowLow; |
11 | Int_t fNRowUp; |
12 | Int_t fNSectorLow; |
13 | Int_t fNSectorUp; |
14 | Double_t fPadPitchWidthLow; |
15 | Double_t fPadPitchWidthUp; |
16 | Double_t fZWidth; |
17 | Double_t fZSigma; |
18 | Int_t fNSector; |
19 | Int_t fNSlice; |
20 | Int_t fNRow; |
21 | Double_t fPi; |
a4e75a99 |
22 | Double_t fNRotShift; |
740da2a6 |
23 | Double_t fZLength; |
24 | Double_t fZOffset; |
a4e75a99 |
25 | Double_t fCos[36]; //fill this following Init |
26 | Double_t fSin[36]; //fill this following Init |
27 | Double_t fX[176]; //fill this following Init |
28 | Int_t fNPads[176]; //fill this following Init |
89693986 |
29 | Int_t fVersion; //flags which version one is using |
30 | void Init(); //old init used by Anders for AliRoot <= 3.06 |
108615fc |
31 | public: |
32 | AliL3Transform(); |
a4e75a99 |
33 | AliL3Transform(const char *pathname); |
108615fc |
34 | virtual ~AliL3Transform(); |
740da2a6 |
35 | Int_t GetVersion(){return fVersion;} |
f59eed2d |
36 | void Init(const Char_t* path); //new init for all AliRoot versions |
108615fc |
37 | |
38 | Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;} |
39 | Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;} |
95a00d93 |
40 | Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;} |
41 | Double_t GetZWidth() {return fZWidth;} |
1727f1c9 |
42 | Double_t GetZLength() {return fZLength;} |
43 | Double_t GetZOffset() {return fZOffset;} |
44 | Int_t GetNSectorLow() {return fNSectorLow;} |
45 | Int_t GetNSectorUp() {return fNSectorUp;} |
95a00d93 |
46 | |
a4e75a99 |
47 | Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t §or, Int_t &row) const; |
a4e75a99 |
48 | Bool_t Sector2Slice(Int_t &slice, Int_t sector) const; |
49 | Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row) const; |
1727f1c9 |
50 | |
a4982538 |
51 | Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;} |
108615fc |
52 | Int_t GetNTimeBins(){return fNTimeBins;} |
1727f1c9 |
53 | Double_t Row2X(Int_t slicerow); |
54 | Double_t GetMaxY(Int_t slicerow); |
108615fc |
55 | Double_t GetEta(Float_t *xyz); |
a4e75a99 |
56 | Double_t GetEta(Int_t row, Int_t pad, Int_t time); |
108615fc |
57 | Double_t GetPhi(Float_t *xyz); |
1727f1c9 |
58 | |
740da2a6 |
59 | void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz); |
a4e75a99 |
60 | void Local2Global(Float_t *xyz, Int_t slice); |
61 | void Local2GlobalAngle(Float_t *angle, Int_t slice); |
62 | void Global2LocalAngle(Float_t *angle, Int_t slice); |
108615fc |
63 | |
a4e75a99 |
64 | void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time); |
65 | void Local2Global(Float_t *xyz, Int_t sector, Int_t row); |
66 | void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE); |
67 | void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time); |
68 | void Local2Raw(Float_t *xyz, Int_t sector, Int_t row); |
69 | void Global2Raw(Float_t *xyz, Int_t sector, Int_t row); |
108615fc |
70 | |
b661165c |
71 | ClassDef(AliL3Transform,1) //Transformation class for ALICE TPC |
108615fc |
72 | }; |
108615fc |
73 | #endif |
a4e75a99 |
74 | |
89693986 |
75 | |
76 | |
77 | |
78 | |