]>
Commit | Line | Data |
---|---|---|
71d7c760 | 1 | // $Id$ |
2 | ||
3 | /************************************************************************** | |
9be2600f | 4 | * This file is property of and copyright by the ALICE HLT Project * |
5 | * ALICE Experiment at CERN, All rights reserved. * | |
71d7c760 | 6 | * * |
9be2600f | 7 | * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> * |
8 | * Timm Steinbeck <timm@kip.uni-heidelberg.de> * | |
9 | * for The ALICE HLT Project. * | |
71d7c760 | 10 | * * |
11 | * Permission to use, copy, modify and distribute this software and its * | |
12 | * documentation strictly for non-commercial purposes is hereby granted * | |
13 | * without fee, provided that the above copyright notice appears in all * | |
14 | * copies and that both the copyright notice and this permission notice * | |
15 | * appear in the supporting documentation. The authors make no claims * | |
16 | * about the suitability of this software for any purpose. It is * | |
17 | * provided "as is" without express or implied warranty. * | |
18 | **************************************************************************/ | |
19 | ||
20 | /////////////////////////////////////////////////////////////////////////////// | |
21 | // // | |
22 | // Definitions for the HLT TPC components // | |
23 | // // | |
24 | /////////////////////////////////////////////////////////////////////////////// | |
25 | ||
26 | #include "AliHLTTPCDefinitions.h" | |
27 | ||
28 | ||
96bda103 | 29 | /** ROOT macro for the implementation of ROOT specific class methods */ |
71d7c760 | 30 | ClassImp(AliHLTTPCDefinitions) |
31 | ||
e5c0542d | 32 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkDDLEncodedEntropyRawDataType = AliHLTComponentDataTypeInitializer("DDLENCEN", kAliHLTDataOriginTPC); |
69347e0d | 33 | |
e5c0542d | 34 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkPackedRawDataType = AliHLTComponentDataTypeInitializer("RAWPAKED", kAliHLTDataOriginTPC); |
35 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkUnpackedRawDataType = AliHLTComponentDataTypeInitializer("RAWUNPAK", kAliHLTDataOriginTPC); | |
36 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkClustersDataType = AliHLTComponentDataTypeInitializer("CLUSTERS", kAliHLTDataOriginTPC); | |
5e75f4e0 | 37 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkRawClustersDataType = AliHLTComponentDataTypeInitializer("CLUSTRAW", kAliHLTDataOriginTPC); |
6af4f584 | 38 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkHWClustersDataType = AliHLTComponentDataTypeInitializer("HWCLUST1", kAliHLTDataOriginTPC); |
491d6af5 | 39 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkAlterClustersDataType = AliHLTComponentDataTypeInitializer("HWCL_ALT", kAliHLTDataOriginTPC); |
e5c0542d | 40 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkVertexDataType = AliHLTComponentDataTypeInitializer("VERTEX ", kAliHLTDataOriginTPC); |
41 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTrackSegmentsDataType = AliHLTComponentDataTypeInitializer("TRAKSEGS", kAliHLTDataOriginTPC); | |
42 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkTracksDataType = AliHLTComponentDataTypeInitializer("TRACKS ", kAliHLTDataOriginTPC); | |
ff2f0f94 | 43 | |
e5c0542d | 44 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkClusterTracksModelDataType = AliHLTComponentDataTypeInitializer("CLSTRKMD", kAliHLTDataOriginTPC); |
45 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkRemainingClustersModelDataType = AliHLTComponentDataTypeInitializer("REMCLSMD", kAliHLTDataOriginTPC); | |
46 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkClusterTracksCompressedDataType = AliHLTComponentDataTypeInitializer("CLSTRKCM", kAliHLTDataOriginTPC); | |
47 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkRemainingClustersCompressedDataType = AliHLTComponentDataTypeInitializer("REMCLSCM", kAliHLTDataOriginTPC); | |
69347e0d | 48 | |
4f82526d | 49 | const AliHLTComponentDataType& AliHLTTPCDefinitions::DDLEncodedEntropyRawDataType() { |
50 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("DDLENCEN", kAliHLTDataOriginTPC); | |
51 | return dt; | |
52 | } | |
53 | const AliHLTComponentDataType& AliHLTTPCDefinitions::PackedRawDataType() { | |
54 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("RAWPAKED", kAliHLTDataOriginTPC); | |
55 | return dt; | |
56 | } | |
57 | const AliHLTComponentDataType& AliHLTTPCDefinitions::UnpackedRawDataType() { | |
58 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("RAWUNPAK", kAliHLTDataOriginTPC); | |
59 | return dt; | |
60 | } | |
61 | const AliHLTComponentDataType& AliHLTTPCDefinitions::ClustersDataType() { | |
62 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CLUSTERS", kAliHLTDataOriginTPC); | |
63 | return dt; | |
64 | } | |
65 | const AliHLTComponentDataType& AliHLTTPCDefinitions::RawClustersDataType() { | |
66 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CLUSTRAW", kAliHLTDataOriginTPC); | |
67 | return dt; | |
68 | } | |
69 | const AliHLTComponentDataType& AliHLTTPCDefinitions::HWClustersDataType() { | |
70 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("HWCLUST1", kAliHLTDataOriginTPC); | |
71 | return dt; | |
72 | } | |
73 | const AliHLTComponentDataType& AliHLTTPCDefinitions::AlterClustersDataType() { | |
74 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("HWCL_ALT", kAliHLTDataOriginTPC); | |
75 | return dt; | |
76 | } | |
77 | const AliHLTComponentDataType& AliHLTTPCDefinitions::VertexDataType() { | |
78 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("VERTEX ", kAliHLTDataOriginTPC); | |
79 | return dt; | |
80 | } | |
81 | const AliHLTComponentDataType& AliHLTTPCDefinitions::TrackSegmentsDataType() { | |
82 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("TRAKSEGS", kAliHLTDataOriginTPC); | |
83 | return dt; | |
84 | } | |
85 | const AliHLTComponentDataType& AliHLTTPCDefinitions::TracksDataType() { | |
86 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("TRACKS ", kAliHLTDataOriginTPC); | |
87 | return dt; | |
88 | } | |
89 | ||
90 | const AliHLTComponentDataType& AliHLTTPCDefinitions::ClusterTracksModelDataType() { | |
91 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CLSTRKMD", kAliHLTDataOriginTPC); | |
92 | return dt; | |
93 | } | |
94 | const AliHLTComponentDataType& AliHLTTPCDefinitions::RemainingClustersModelDataType() { | |
95 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("REMCLSMD", kAliHLTDataOriginTPC); | |
96 | return dt; | |
97 | } | |
98 | const AliHLTComponentDataType& AliHLTTPCDefinitions::ClusterTracksCompressedDataType() { | |
99 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CLSTRKCM", kAliHLTDataOriginTPC); | |
100 | return dt; | |
101 | } | |
102 | const AliHLTComponentDataType& AliHLTTPCDefinitions::RemainingClustersCompressedDataType() { | |
103 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("REMCLSCM", kAliHLTDataOriginTPC); | |
104 | return dt; | |
105 | } | |
106 | ||
d3dbc486 | 107 | const AliHLTComponentDataType& AliHLTTPCDefinitions::CalibPedestalDataType() { |
108 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CAL_PED ", kAliHLTDataOriginTPC); | |
109 | return dt; | |
110 | } | |
111 | const AliHLTComponentDataType& AliHLTTPCDefinitions::CalibPulserDataType() { | |
112 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CAL_PULS", kAliHLTDataOriginTPC); | |
113 | return dt; | |
114 | } | |
115 | const AliHLTComponentDataType& AliHLTTPCDefinitions::CalibCEDataType() { | |
116 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CAL_CE ", kAliHLTDataOriginTPC); | |
117 | return dt; | |
118 | } | |
119 | ||
120 | const AliHLTComponentDataType& AliHLTTPCDefinitions::OfflineCalibAlignDataType() { | |
121 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CALALIGN", kAliHLTDataOriginTPC); | |
122 | return dt; | |
123 | } | |
124 | const AliHLTComponentDataType& AliHLTTPCDefinitions::OfflineCalibTracksDataType() { | |
125 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CALTRACK", kAliHLTDataOriginTPC); | |
126 | return dt; | |
127 | } | |
128 | ||
129 | const AliHLTComponentDataType& AliHLTTPCDefinitions::OfflineCalibTracksGainDataType() { | |
130 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CALGAIN ", kAliHLTDataOriginTPC); | |
131 | return dt; | |
132 | } | |
133 | ||
4f82526d | 134 | const AliHLTComponentDataType& AliHLTTPCDefinitions::AliHLTDataTypeClusterMCInfo() { |
135 | static AliHLTComponentDataType dt = AliHLTComponentDataTypeInitializer("CLMCINFO", kAliHLTDataOriginTPC); | |
136 | return dt; | |
137 | } | |
deba5d85 | 138 | const AliHLTComponentDataType AliHLTTPCDefinitions::fgkAliHLTDataTypeClusterMCInfo = AliHLTComponentDataTypeInitializer("CLMCINFO", kAliHLTDataOriginTPC); |
139 | ||
e642ae99 | 140 | |
71300445 | 141 | const AliHLTTPCDefinitions::AliClusterParameter AliHLTTPCDefinitions::fgkClusterParameterDefinitions[]= { |
61e66346 | 142 | {AliHLTTPCDefinitions::kPadRow, "padrow", 6, 1, 1}, // difference of rows, mostly 0 or 1 |
b97434b7 | 143 | {AliHLTTPCDefinitions::kPad, "pad", 14, 12, 60}, // <100um for 6mm pads |
144 | {AliHLTTPCDefinitions::kTime, "time", 15, 13, 25}, // <100um for 2.5 mm timebin pitch | |
71300445 | 145 | {AliHLTTPCDefinitions::kSigmaY2, "sigmaY2", 8, 5, 25}, |
146 | {AliHLTTPCDefinitions::kSigmaZ2, "sigmaZ2", 8, 5, 10}, | |
147 | {AliHLTTPCDefinitions::kCharge, "charge", 16, 9, 1}, | |
b97434b7 | 148 | {AliHLTTPCDefinitions::kQMax, "qmax", 10, 6, 1}, |
149 | {AliHLTTPCDefinitions::kResidualPad, "respad", 9, 4, 60}, // <100um for 6mm pads, sign stored in separate bit | |
150 | {AliHLTTPCDefinitions::kResidualTime,"restime", 8, 4, 25}, // <100um for 2.5 mm timebin pitch, separate bit for sign | |
151 | {AliHLTTPCDefinitions::kPadrowFlag, "clustonpadrow", 1, 1, 1}, // 0 no cluster, 1 cluster on that row | |
152 | {AliHLTTPCDefinitions::kClusterCount,"clustercount", 6, 3, 1} // number of clusters on that row | |
71300445 | 153 | }; |
154 | ||
155 | unsigned AliHLTTPCDefinitions::GetNumberOfClusterParameterDefinitions() | |
156 | { | |
157 | return sizeof(fgkClusterParameterDefinitions)/sizeof(AliClusterParameter); | |
158 | } | |
159 | ||
b97434b7 | 160 | // NOTE! those values are related to the number of bits in |
161 | // fgkClusterParameterDefinitions | |
162 | const unsigned AliHLTTPCDefinitions::fgkMaxClusterDeltaPad=8; | |
163 | const unsigned AliHLTTPCDefinitions::fgkMaxClusterDeltaTime=10; | |
164 | ||
2a083ac4 | 165 | AliHLTTPCDefinitions::AliHLTTPCDefinitions() |
166 | { | |
96bda103 | 167 | // see header file for class documentation |
168 | // or | |
169 | // refer to README to build package | |
170 | // or | |
171 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
2a083ac4 | 172 | } |
173 | ||
174 | AliHLTTPCDefinitions::~AliHLTTPCDefinitions() | |
175 | { | |
96bda103 | 176 | // see header file for class documentation |
2a083ac4 | 177 | } |
178 | ||
625b072f | 179 | bool AliHLTTPCDefinitions::DDLIdToSlicePatch(AliHLTInt32_t ddlid, AliHLTUInt8_t& slice, AliHLTUInt8_t& patch) |
180 | { | |
181 | // Convert DDL ID to patch and slice numbers. | |
182 | ||
183 | if ((AliHLTUInt32_t(ddlid) >> 8) != 0x3) return false; // Check that detector is TPC. | |
184 | AliHLTUInt32_t ddl = (AliHLTUInt32_t(ddlid) & 0xFF); | |
185 | if (ddl > 215) return false; | |
186 | if (ddl < 72) | |
187 | { | |
188 | slice = ddl / 2; | |
189 | patch = ddl % 2; | |
190 | } | |
191 | else | |
192 | { | |
193 | ddl -= 72; | |
194 | slice = ddl / 4; | |
195 | patch = ddl % 4 + 2; | |
196 | } | |
197 | return true; | |
198 | } | |
71d7c760 | 199 |