1 #ifndef ALIL3TRANSFORM_H
2 #define ALIL3TRANSFORM_H
4 #include "AliL3RootTypes.h"
9 const static Double_t fBFACT;
11 static Double_t fBField;
12 static Int_t fBFieldFactor;
13 static Int_t fNTimeBins;
14 static Int_t fNRowLow;
16 static Int_t fNRowUp1;
17 static Int_t fNRowUp2;
18 static Int_t fNSectorLow;
19 static Int_t fNSectorUp;
20 static Double_t fPadPitchWidthLow;
21 static Double_t fPadPitchWidthUp;
22 static Double_t fZWidth;
23 static Double_t fZSigma;
24 static Int_t fNSector;
28 static Double_t fNRotShift;
29 static Double_t fZLength;
30 static Double_t fZOffset;
31 static Int_t fNPads[159]; //fill this following Init
32 static Double_t fX[159]; //fill this following Init
33 static Int_t fVersion; //flags the version
34 static Int_t fRows[6][2];
35 static Int_t fNRows[6];
36 static Int_t fNPatches;
37 static Double_t fDiffT; //Transversal diffusion constant
38 static Double_t fDiffL; //Longitudinal diffusion constant
39 static Double_t fAnodeWireSpacing;
40 static Double_t fInnerPadLength;
41 static Double_t fOuter1PadLength;
42 static Double_t fOuter2PadLength;
43 static Double_t fInnerPRFSigma;
44 static Double_t fOuter1PRFSigma;
45 static Double_t fOuter2PRFSigma;
46 static Double_t fTimeSigma; //Minimal longitudinal width
50 static void Init(Char_t* path,Bool_t UseAliTPCParam=kFALSE); //new init for all AliRoot versions
51 static void MakeInitFile(Char_t *filename,Char_t *path);
52 static void ReadInit(Char_t *path);
53 static void SetBField(Double_t f) {fBField = f;}
55 static Int_t GetFirstRow(Int_t patch) {return fRows[patch][0];}
56 static Int_t GetLastRow(Int_t patch) {return fRows[patch][1];}
57 static Int_t GetNRows(Int_t patch) {return fNRows[patch];}
58 static Int_t GetNRows() {return fNRow;}
59 static Int_t GetNPatches() {return fNPatches;}
60 static Double_t GetBField() {return fBField;}
61 static Double_t GetBFact() {return fBFACT;}
62 static Double_t GetBFieldValue() {return (fBField*fBFACT);}
63 static Double_t Pi() {return fPi;}
64 static Int_t GetVersion(){return fVersion;}
65 static Double_t GetPadPitchWidthLow() {return fPadPitchWidthLow;}
66 static Double_t GetPadPitchWidthUp() {return fPadPitchWidthUp;}
67 static Double_t GetPadPitchWidth(Int_t patch) {return patch < 2 ? fPadPitchWidthLow : fPadPitchWidthUp;}
68 static Double_t GetZWidth() {return fZWidth;}
69 static Double_t GetZLength() {return fZLength;}
70 static Double_t GetZOffset() {return fZOffset;}
71 static Double_t GetDiffT() {return fDiffT;}
72 static Double_t GetDiffL() {return fDiffL;}
73 static Double_t GetAnodeWireSpacing() {return fAnodeWireSpacing;}
74 static Double_t GetPadLength(Int_t padrow);
75 static Double_t GetPRFSigma(Int_t padrow);
76 static Double_t GetTimeSigma() {return fTimeSigma;}
77 static Int_t GetNSectorLow() {return fNSectorLow;}
78 static Int_t GetNSectorUp() {return fNSectorUp;}
80 static Bool_t Slice2Sector(Int_t slice, Int_t slicerow, Int_t §or, Int_t &row);
81 static Bool_t Sector2Slice(Int_t &slice, Int_t sector);
82 static Bool_t Sector2Slice(Int_t &slice, Int_t &slicerow, Int_t sector, Int_t row);
84 static Int_t GetNPads(Int_t row){return (row<fNRow)?fNPads[row]:0;}
85 static Int_t GetNTimeBins(){return fNTimeBins;}
86 static Double_t Row2X(Int_t slicerow);
87 static Double_t GetMaxY(Int_t slicerow);
88 static Double_t GetEta(Float_t *xyz);
89 static Double_t GetEta(Int_t row, Int_t pad, Int_t time);
90 static Double_t GetPhi(Float_t *xyz);
92 static void XYZtoRPhiEta(Float_t *rpe, Float_t *xyz);
93 static void Local2Global(Float_t *xyz, Int_t slice);
94 static void Local2GlobalAngle(Float_t *angle, Int_t slice);
95 static void Global2LocalAngle(Float_t *angle, Int_t slice);
97 static void Raw2Local(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
98 static void Local2Global(Float_t *xyz, Int_t sector, Int_t row);
99 static void Global2Local(Float_t *xyz, Int_t sector, Bool_t isSlice=kFALSE);
100 static void Raw2Global(Float_t *xyz, Int_t sector, Int_t row, Float_t pad, Float_t time);
101 static void Local2Raw(Float_t *xyz, Int_t sector, Int_t row);
102 static void Global2Raw(Float_t *xyz, Int_t sector, Int_t row);
104 ClassDef(AliL3Transform,1)