]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Transform.h
Added getter GetNRows()
[u/mrichter/AliRoot.git] / HLT / src / AliL3Transform.h
1 #ifndef ALIL3TRANSFORM_H
2 #define ALIL3TRANSFORM_H
3
4 #include "AliL3RootTypes.h"
5
6 class AliL3Transform {
7
8  private:
9   
10   static Double_t fBField;
11   static Int_t fBFieldFactor;
12   static Int_t fNTimeBins;
13   static Int_t fNRowLow;
14   static Int_t fNRowUp;
15   static Int_t fNSectorLow;
16   static Int_t fNSectorUp;
17   static Double_t fPadPitchWidthLow;
18   static Double_t fPadPitchWidthUp;
19   static Double_t fZWidth;
20   static Double_t fZSigma;
21   static Int_t fNSector;
22   static Int_t fNSlice;
23   static Int_t fNRow;
24   static Double_t fPi;
25   static Double_t fNRotShift;
26   static Double_t fZLength;
27   static Double_t fZOffset;
28   static Int_t fNPads[176]; //fill this following Init
29   static Double_t fX[176];  //fill this following Init
30   static Int_t fVersion; //flags which version one is using
31   static Int_t fRows[6][2];
32   static Int_t fNRows[6];
33   static Int_t fNPatches;
34   
35   static Double_t fDiffT; //Transversal diffusion constant
36   static Double_t fDiffL; //Longitudinal diffusion constant
37   static Double_t fAnodeWireSpacing; 
38   static Double_t fInnerPadLength;
39   static Double_t fOuterPadLength;
40   static Double_t fInnerPRFSigma;
41   static Double_t fOuterPRFSigma;
42   static Double_t fTimeSigma; //Minimal longitudinal width
43
44  public:
45   
46   static void Init(const Char_t* path); //new init for all AliRoot versions
47   
48   static void SetBField(Double_t f) {fBField = f;}
49   static Int_t GetFirstRow(Int_t patch) {return fRows[patch][0];}
50   static Int_t GetLastRow(Int_t patch) {return fRows[patch][1];}
51   static Int_t GetNRows(Int_t patch) {return fNRows[patch];}
52   static Int_t GetNRows() {return fNRow;}
53   static Int_t GetNPatches() {return fNPatches;}
54   static Double_t GetBField() {return fBField;}
55   static Double_t Pi() {return fPi;}
56   static Int_t GetVersion(){return fVersion;}
57   static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
58   static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
59   static Double_t GetPadPitchWidth(Int_t patch) {return patch < 2 ? fPadPitchWidthLow : fPadPitchWidthUp;}  
60   static Double_t GetZWidth() {return fZWidth;}
61   static Double_t GetZLength() {return fZLength;}
62   static Double_t GetZOffset() {return fZOffset;}
63   static Double_t GetDiffT() {return fDiffT;}
64   static Double_t GetDiffL() {return fDiffL;}
65   static Double_t GetAnodeWireSpacing() {return fAnodeWireSpacing;}
66   static Double_t GetPadLength(Int_t patch) {return patch < 2 ? fInnerPadLength : fOuterPadLength;}
67   static Double_t GetPRFSigma(Int_t patch) {return patch < 2 ? fInnerPRFSigma : fOuterPRFSigma;}
68   static Double_t GetTimeSigma() {return fTimeSigma;}
69   static Int_t GetNSectorLow() {return fNSectorLow;}
70   static Int_t GetNSectorUp() {return fNSectorUp;}
71   
72   static Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t &sector, Int_t &row);
73   static Bool_t Sector2Slice(Int_t &slice, Int_t sector);
74   static Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row);
75
76   static Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
77   static Int_t GetNTimeBins(){return fNTimeBins;}
78   static Double_t Row2X(Int_t slicerow);
79   static Double_t GetMaxY(Int_t slicerow);
80   static Double_t GetEta(Float_t *xyz);
81   static Double_t GetEta(Int_t row, Int_t pad, Int_t time);
82   static Double_t GetPhi(Float_t *xyz);
83
84   static void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
85   static void Local2Global(Float_t *xyz, Int_t slice);
86   static void Local2GlobalAngle(Float_t *angle, Int_t slice);
87   static void Global2LocalAngle(Float_t *angle, Int_t slice);
88
89   static void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
90   static void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
91   static void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
92   static void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
93   static void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
94   static void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
95   
96   ClassDef(AliL3Transform,1) //Transformation class for ALICE TPC
97 };
98 #endif
99
100
101
102
103