]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/HWCFemulator/AliHLTTPCHWCFDataTypes.h
Updated SNM Glauber fit
[u/mrichter/AliRoot.git] / HLT / TPCLib / HWCFemulator / AliHLTTPCHWCFDataTypes.h
1 // $Id$
2 #ifndef ALIHLTTPCHWCFDATATYPES_H
3 #define ALIHLTTPCHWCFDATATYPES_H
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                               *
7
8 //  @file   AliHLTTPCHWCFDataTypes.h
9 //  @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
10 //  @author Torsten Alt <talt@cern.ch> 
11 //  @brief  Data types for FPGA ClusterFinder Emulator for TPC
12 //  @brief  ( see AliHLTTPCHWCFEmulator class )
13 //  @note
14
15 #include "AliHLTDataTypes.h"
16 #include "AliHLTTPCClusterMCData.h"
17 #include <vector>
18
19
20 struct AliHLTTPCHWCFDefinitions
21 {
22   static const unsigned int kMaxNTimeBins = 1024+10; // max N time bins
23   static const int kFixedPoint = 12; // N bits after fixed point 
24                                      // for fixed point operations
25 };
26
27 typedef struct AliHLTTPCHWCFDefinitions AliHLTTPCHWCFDefinitions;
28
29 struct AliHLTTPCHWCFDigit
30 {
31   //* constructor **/
32   AliHLTTPCHWCFDigit(): fQ(0), fTime(0), fPeak(0), fMC()
33   {}
34
35   AliHLTUInt32_t fQ;    // charge
36   AliHLTUInt32_t fTime; // timebin
37   AliHLTUInt32_t fPeak;  // peak flag: 0:flat, 1:peak, 2: local minimum
38   AliHLTTPCClusterMCLabel fMC; // mc label
39 };
40 typedef struct AliHLTTPCHWCFDigit AliHLTTPCHWCFDigit;
41
42 struct AliHLTTPCHWCFBunch
43 {
44   //* constructor **/
45   AliHLTTPCHWCFBunch(): fFlag(0), fRow(0), fPad(0), fBranch(0), fBorder(0),
46                         fGain(0), fData()
47   {}
48
49   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
50   AliHLTUInt32_t fRow;  // row number
51   AliHLTUInt32_t fPad;  // pad number
52   bool fBranch;         // 0  - pad belongs to branch A, 1 - pad belongs to branch B
53   bool fBorder;         // is the pad at the border of its branch
54   AliHLTUInt64_t fGain; // gain correction factor 
55                         //   (fixed point integer with kFixedPoint bits after the point)
56   std::vector<AliHLTTPCHWCFDigit> fData;      // signals
57 };
58 typedef struct AliHLTTPCHWCFBunch AliHLTTPCHWCFBunch;
59
60 struct AliHLTTPCHWCFClusterFragment
61 {
62   //* constructor **/
63   AliHLTTPCHWCFClusterFragment():  fFlag(0), fRow(0), fPad(0), fBranch(0), fBorder(0),
64        fQmax(0), fQ(0), fT(0), fP(0), fT2(0), fP2(0), fTMean(0),fLastQ(0), fSlope(0), fMC()
65   {}
66
67   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
68   AliHLTUInt32_t fRow;  // row number
69   AliHLTUInt32_t fPad;  // pad number
70   bool fBranch;         // 0  - pad belongs to branch A, 1 - pad belongs to branch B
71   bool fBorder;         // is the pad at the border of its branch
72   AliHLTUInt64_t fQmax; // total charge, fixed point integer
73   AliHLTUInt64_t fQ;    // total charge, fixed point integer
74   AliHLTUInt64_t fT;    // sum of time*charge , fixed point integer
75   AliHLTUInt64_t fP;    // sum of pad*charge  , fixed point integer
76   AliHLTUInt64_t fT2;   // sum of time^2*charge , fixed point integer
77   AliHLTUInt64_t fP2;   // sum of pad^2*charge  , fixed point integer
78   AliHLTUInt64_t fTMean;// mean time, used for merging neighbouring pads
79   AliHLTUInt64_t fLastQ; // for merged fragments, charge of the last (highest pad value)
80                          //    fragment bein merged, needed for deconvolution
81   bool fSlope;           // for merged fragments, ==1 if fLastQ decreases
82                          //   ( needed for deconvolution )
83   std::vector<AliHLTTPCClusterMCLabel> fMC; // mc labels
84 };
85 typedef struct AliHLTTPCHWCFClusterFragment AliHLTTPCHWCFClusterFragment;
86
87 struct AliHLTTPCHWCFCluster
88 {
89   //* constructor **/
90   AliHLTTPCHWCFCluster(): fFlag(0), fRowQ(0), fQ(0), fT(0), fP(0), fT2(0), fP2(0), fMC()
91   {}
92
93   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
94   AliHLTUInt32_t fRowQ; // bits 30-31 = 0x3
95                         // bits 24-29 = row number
96                         // bits 0 -23 = max adc value as fixed point integer,
97                         //              with 12 bits after the point
98   AliHLTUInt32_t fQ;    // total charge as fixed point integer, 12 bits after the point
99   AliHLTUInt32_t fT;    // mean time, 32-bit float stored as 32-bit integer
100   AliHLTUInt32_t fP;    // mean pad,  32-bit float stored as 32-bit integer
101   AliHLTUInt32_t fT2;   // mean time^2, 32-bit float stored as 32-bit integer
102   AliHLTUInt32_t fP2;   // mean pad^2,  32-bit float stored as 32-bit integer
103
104   AliHLTTPCClusterMCLabel fMC; // mc label
105 };
106 typedef struct AliHLTTPCHWCFCluster AliHLTTPCHWCFCluster;
107
108 #endif