]>
Commit | Line | Data |
---|---|---|
1f1942b8 | 1 | // @(#) $Id$ |
2 | ||
3 | // Author: Anders Vestbo <mailto:vestbo@fi.uib.no> | |
4 | //*-- Copyright © ALICE HLT Group | |
5 | ||
6 | #include "AliL3StandardIncludes.h" | |
7 | ||
8 | #include "AliL3RootTypes.h" | |
9 | #include "AliL3Transform.h" | |
10 | ||
11 | #include "AliL3DataCompressorHelper.h" | |
12 | ||
13 | #if GCCVERSION == 3 | |
14 | using namespace std; | |
15 | #endif | |
16 | ||
17 | //_____________________________________________________________ | |
18 | // | |
19 | // AliL3DataCompression | |
20 | // | |
21 | // Interface class; binary <-> AliROOT handling of TPC data compression classes. | |
22 | // | |
23 | ||
24 | ||
25 | ClassImp(AliL3DataCompressorHelper) | |
26 | ||
27 | ||
28 | Int_t AliL3DataCompressorHelper::fNumTimeBits = 12; | |
29 | Int_t AliL3DataCompressorHelper::fNumPadBits = 12; | |
30 | Int_t AliL3DataCompressorHelper::fNumChargeBits = 14; | |
31 | Int_t AliL3DataCompressorHelper::fNumShapeBits = 14; | |
32 | Float_t AliL3DataCompressorHelper::fXYResidualStep1 = 0.03; | |
33 | Float_t AliL3DataCompressorHelper::fXYResidualStep2 = 0.03; | |
34 | Float_t AliL3DataCompressorHelper::fXYResidualStep3 = 0.03; | |
35 | Float_t AliL3DataCompressorHelper::fZResidualStep1 = 0.05; | |
36 | Float_t AliL3DataCompressorHelper::fZResidualStep2 = 0.05; | |
37 | Float_t AliL3DataCompressorHelper::fZResidualStep3 = 0.05; | |
38 | Float_t AliL3DataCompressorHelper::fXYWidthStep = 0.005; | |
39 | Float_t AliL3DataCompressorHelper::fZWidthStep = 0.005; | |
40 | Int_t AliL3DataCompressorHelper::fClusterCharge = 100; | |
41 | ||
42 | ||
43 | void AliL3DataCompressorHelper::SetBitNumbers(Int_t pad,Int_t time,Int_t charge,Int_t shape) | |
44 | { | |
45 | fNumPadBits = pad; | |
46 | fNumTimeBits = time; | |
47 | fNumChargeBits = charge; | |
48 | fNumShapeBits = shape; | |
49 | } | |
50 | ||
51 | void AliL3DataCompressorHelper::SetTransverseResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width) | |
52 | { | |
53 | fXYResidualStep1 = res1; | |
54 | fXYResidualStep2 = res2; | |
55 | fXYResidualStep3 = res3; | |
56 | fXYWidthStep = width; | |
57 | } | |
58 | ||
59 | void AliL3DataCompressorHelper::SetLongitudinalResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width) | |
60 | { | |
61 | fZResidualStep1 = res1; | |
62 | fZResidualStep2 = res2; | |
63 | fZResidualStep3 = res3; | |
64 | fZWidthStep = width; | |
65 | } | |
66 | ||
67 | const Float_t AliL3DataCompressorHelper::GetXYResidualStep(Int_t row) | |
68 | { | |
69 | if(row < AliL3Transform::GetNRowLow()) | |
70 | return fXYResidualStep1; | |
71 | else if(row < AliL3Transform::GetNRowLow() + AliL3Transform::GetNRowUp1()) | |
72 | return fXYResidualStep2; | |
73 | else if(row < AliL3Transform::GetNRowLow() + AliL3Transform::GetNRowUp1() + AliL3Transform::GetNRowUp2()) | |
74 | return fXYResidualStep3; | |
75 | else | |
76 | { | |
77 | cerr<<"AliL3DataCompressorHelper::GetXYResidualStep : Wrong row number "<<row<<endl; | |
78 | return -1; | |
79 | } | |
80 | } | |
81 | ||
82 | const Float_t AliL3DataCompressorHelper::GetZResidualStep(Int_t row) | |
83 | { | |
84 | if(row < AliL3Transform::GetNRowLow()) | |
85 | return fZResidualStep1; | |
86 | else if(row < AliL3Transform::GetNRowLow() + AliL3Transform::GetNRowUp1()) | |
87 | return fZResidualStep2; | |
88 | else if(row < AliL3Transform::GetNRowLow() + AliL3Transform::GetNRowUp1() + AliL3Transform::GetNRowUp2()) | |
89 | return fZResidualStep3; | |
90 | else | |
91 | { | |
92 | cerr<<"AliL3DataCompressorHelper::GetXYResidualStep : Wrong row number "<<row<<endl; | |
93 | return -1; | |
94 | } | |
95 | } |