]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/comp/AliHLTTPCCompDataCompressorHelper.h
adding publishing of histograms, by default all histograms are sent as separate objec...
[u/mrichter/AliRoot.git] / HLT / TPCLib / comp / AliHLTTPCCompDataCompressorHelper.h
CommitLineData
7e914051 1// XEmacs -*-C++-*-
2// $Id$
ff2f0f94 3
892210c7 4//* This file is property of and copyright by the ALICE HLT Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* See cxx source for full Copyright notice *
ff2f0f94 7
8/** @file AliHLTTPCCompDataCompressorHelper.h
9 @author Anders Vestbo
10 @date 30-11-2006
11 @brief The Data Compressor helper for the Vestbo-compression for the TPC
12*/
13
14#ifndef AliHLTTPCComp_DataCompressorHelper
15#define AliHLTTPCComp_DataCompressorHelper
16
17#include "AliHLTTPCRootTypes.h"
18
19/** @class AliHLTTPCCompDataCompressorHelper
892210c7 20 @brief Class to implement compression functions that will be used in
21 Vestbo-compression.
ff2f0f94 22*/
23class AliHLTTPCCompDataCompressorHelper {
24
25 public:
26
27 /** function to set numbers of bits for compression model
28 * @param pad integer to define pad
29 * @param time integer to define time bin
30 * @param charge integer to define total charge of the cluster
31 * @param shape integer to define shape of the cluster
32 */
33 static void SetBitNumbers(Int_t pad,Int_t time,Int_t charge,Int_t shape);
34
35 /** function to define transverse resolutions
36 * @param res1 float to define first resolution
37 * @param res2 float to define second resolution
38 * @param res3 float to define third resolution
39 * @param width float to define width (set to 0.005 if nothing is specified)
40 */
41 static void SetTransverseResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width=0.005);
42
43 /** function to define longitudinal resolutions
44 * @param res1 float to define first resolution
45 * @param res2 float to define second resolution
46 * @param res3 float to define third resolution
47 * @param width float to define width (set to 0.005 if nothing is specified)
48 */
49 static void SetLongitudinalResolutions(Float_t res1,Float_t res2,Float_t res3,Float_t width=0.005);
50
51 /** function to set number of bits for remaining clusters
52 * @param pad integer to define pad
53 * @param time integer to define time bin
54 * @param shape integer to define shape of the cluster
55 */
56 static void SetRemainingBitNumbers(Int_t pad,Int_t time,Int_t shape);
57
58 /** function to get number of pad bits
59 * @return fgNumPadBits integer for number of pad bits
60 */
61 static Int_t GetNPadBits() {return fgNumPadBits;}
62
63 /** function to get number of time bits
64 * @return fgNumTimeBits integer for number of time bin bits
65 */
66 static Int_t GetNTimeBits() {return fgNumTimeBits;}
67
68 /** function to get number of charge bits (total charge)
69 * @return fgNumChargeBits integer for number of charge bits
70 */
71 static Int_t GetNChargeBits() {return fgNumChargeBits;}
72
73 /** function to get number of shape bits
74 * @return fgNumShapeBits integer for number of shape bits
75 */
76 static Int_t GetNShapeBits() {return fgNumShapeBits;}
77
78 /** function to get detector xy width step
79 * @return fgXYWidthStep float for the x-y-width-step
80 */
81 static Float_t GetXYWidthStep() {return fgXYWidthStep;}
82
83 /** function to get detector z width step
84 * @return fgZWidthStep float for the z-width-step
85 */
86 static Float_t GetZWidthStep() {return fgZWidthStep;}
87
88 /** function to get the total charge of the cluster
89 * @return fgClusterCharge integer for the total charge of the cluster
90 */
91 static Int_t GetClusterCharge() {return fgClusterCharge;}
92
93 /** function to get detector xy residual step
94 * @param row integer to define the pad row
95 * @return fgXYResidualStepX float for the x-y-residual-step (X stands for 1 to 3, depending on the step)
96 */
97 static Float_t GetXYResidualStep(Int_t row);
98
99 /** function to get detector z residual step
100 * @param row integer to define the pad row
101 * @return fgZResidualStepX float for the z-residual-step (X stands for 1 to 3, depending on the step)
102 */
103 static Float_t GetZResidualStep(Int_t row);
104
105 /** function to get the number of bits for pads from remaining clusters
106 * @return fgNumPadBitsRemaining integer for the number of bits for pads from remaining clusters
107 */
108 static Int_t GetNPadBitsRemaining() {return fgNumPadBitsRemaining;}
109
110 /** function to get the number of bits for time bins from remaining clusters
111 * @return fgNumTimeBitsRemaining integer for the number of bits for time bins from remaining clusters
112 */
113 static Int_t GetNTimeBitsRemaining() {return fgNumTimeBitsRemaining;}
114
115 /** function to get the number of bits for shapes of remaining clusters
116 * @return fgNumShapeBitsRemaining integer for the number of bits for shapes of remaining clusters
117 */
118 static Int_t GetNShapeBitsRemaining() {return fgNumShapeBitsRemaining;}
119
120 /** function to get pad precision factor
121 * @return float that defines the number of bits (-> precision)
122 */
123 static Float_t GetPadPrecisionFactor();
124
125 /** function to get time precision factor
126 * @return float that defines the number of bits (-> precision)
127 */
128 static Float_t GetTimePrecisionFactor();
129
130 //taken from TMath:
131
132 /** function to convert double to int
133 * @param x double value to be converted
134 * @return integer created from double value
135 */
136 static Int_t Nint(Double_t x);
137
138 /** function to calculate the absolute of an integer
139 * @param d integer to be taken absolute value from
140 * @return positive integer
141 */
142 static Int_t Abs(Int_t d) { return (d > 0) ? d : -d; }
143
144 /** function to calculate the absolute of a double
145 * @param d double to be taken absolute value from
146 * @return positive double
147 */
148 static Double_t Abs(Double_t d) { return (d > 0) ? d : -d; }
149
150 private:
151
152 /** standard constructor */
7e914051 153 AliHLTTPCCompDataCompressorHelper();
ff2f0f94 154
155 /** standard destructor */
156 virtual ~AliHLTTPCCompDataCompressorHelper() {};
157
158 /** number of pad bits */
159 static Int_t fgNumPadBits; // Number of pad bits
160 /** number of time bits */
161 static Int_t fgNumTimeBits; // Number of time bits
162 /** number of charge bits */
163 static Int_t fgNumChargeBits; // Number of charge bits
164 /** number of shape bits */
165 static Int_t fgNumShapeBits; // Number of shape bits
166 /** number of remaining pad bits */
167 static Int_t fgNumPadBitsRemaining; // Number of remaining pad bits
168 /** number of remaining time bits */
169 static Int_t fgNumTimeBitsRemaining; // Number of remaining time bits
170 /** number of remaining shape bits */
171 static Int_t fgNumShapeBitsRemaining; // Number of remaining shape bits
172
173 /** xy residual at step 1 */
174 static Float_t fgXYResidualStep1; // XY residual at step 1
175 /** xy residual at step 2 */
176 static Float_t fgXYResidualStep2; // XY residual at step 2
177 /** xy residual at step 3 */
178 static Float_t fgXYResidualStep3; // XY residual at step 3
179 /** z residual at step 1 */
180 static Float_t fgZResidualStep1; // Z residual at step 1
181 /** z residual at step 2 */
182 static Float_t fgZResidualStep2; // Z residual at step 2
183 /** z residual at step 3 */
184 static Float_t fgZResidualStep3; // Z residual at step 3
185 /** width of xy step */
186 static Float_t fgXYWidthStep; // Width of XY step
187 /** width of z step */
188 static Float_t fgZWidthStep; // Width of Z step
189 /** cluster charge */
190 static Int_t fgClusterCharge; // Cluster charge
191
192
193 ClassDef(AliHLTTPCCompDataCompressorHelper,1)
194
195};
196
197#endif