]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Transform.h
e6917680176793a08aa6b98e6246728ae0838555
[u/mrichter/AliRoot.git] / HLT / src / AliL3Transform.h
1 #ifndef ALIL3TRANSFORM_H
2 #define ALIL3TRANSFORM_H
3
4 #include "AliL3RootTypes.h"
5 class TFile;
6
7 class AliL3Transform {
8  private:
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;
22   Double_t fNRotShift;
23   Double_t fCos[36]; //fill this following Init
24   Double_t fSin[36]; //fill this following Init
25   Double_t fX[176];  //fill this following Init
26   Int_t fNPads[176]; //fill this following Init
27   Int_t fVersion; //flags which version one is using
28   void Init(); //old init used by Anders for AliRoot <= 3.06
29  public:
30   AliL3Transform();
31   AliL3Transform(const char *pathname);
32   virtual ~AliL3Transform();
33   Int_t getVersion(){return fVersion;}
34   void Init(const Char_t* path); //new init for all AliRoot versions
35
36   Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
37   Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
38   Double_t GetPadPitchWidth(Int_t patch) {if(patch<=2) return fPadPitchWidthLow; else return fPadPitchWidthUp;}
39   Double_t GetZWidth() {return fZWidth;}
40   
41   Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t &sector, Int_t &row) const;
42
43   Bool_t Sector2Slice(Int_t &slice, Int_t sector) const;
44   Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row) const;
45   
46   Double_t Row2X(Int_t slicerow);
47   Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
48   Int_t GetNTimeBins(){return fNTimeBins;}
49
50   Double_t GetEta(Float_t *xyz);
51   Double_t GetEta(Int_t row, Int_t pad, Int_t time);
52   Double_t GetPhi(Float_t *xyz);
53   Double_t GetMaxY(Int_t slicerow);
54   void Local2Global(Float_t *xyz, Int_t slice);
55   void Local2GlobalAngle(Float_t *angle, Int_t slice);
56   void Global2LocalAngle(Float_t *angle, Int_t slice);
57
58   void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
59   void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
60   void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
61   void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
62   void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
63   void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
64   
65   ClassDef(AliL3Transform,1) //Transformation class for ALICE TPC
66 };
67
68
69 #endif
70
71
72
73
74