Project
Loading...
Searching...
No Matches
CTFCoder.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
15
16#ifndef O2_ITSMFT_CTFCODER_H
17#define O2_ITSMFT_CTFCODER_H
18
19#include <algorithm>
20#include <iterator>
21#include <string>
32
33//#define _CHECK_INCREMENTES_ // Uncoment this the check the incremements being non-negative
34
35class TTree;
36
37namespace o2
38{
39namespace itsmft
40{
41
43{
44 public:
45 using PMatrix = std::array<std::array<bool, ClusterPattern::MaxRowSpan + 2>, ClusterPattern::MaxColSpan + 2>;
46 using RowColBuff = std::vector<PixelData>;
47
49 ~CTFCoder() final = default;
50
52 template <typename VEC>
53 o2::ctf::CTFIOSize encode(VEC& buff, const gsl::span<const ROFRecord>& rofRecVec, const gsl::span<const CompClusterExt>& cclusVec,
54 const gsl::span<const unsigned char>& pattVec, const LookUp& clPattLookup, int strobeLength);
55
57 template <typename VROF, typename VCLUS, typename VPAT>
58 o2::ctf::CTFIOSize decode(const CTF::base& ec, VROF& rofRecVec, VCLUS& cclusVec, VPAT& pattVec, const NoiseMap* noiseMap, const LookUp& clPattLookup);
59
61 template <typename VROF, typename VDIG>
62 o2::ctf::CTFIOSize decode(const CTF::base& ec, VROF& rofRecVec, VDIG& digVec, const NoiseMap* noiseMap, const LookUp& clPattLookup);
63
64 void createCoders(const std::vector<char>& bufVec, o2::ctf::CTFCoderBase::OpType op) final;
65
66 private:
67 CompressedClusters decodeCompressedClusters(const CTF::base& ec, o2::ctf::CTFIOSize& sz);
68
70 void compress(CompressedClusters& compCl, const gsl::span<const ROFRecord>& rofRecVec, const gsl::span<const CompClusterExt>& cclusVec,
71 const gsl::span<const unsigned char>& pattVec, const LookUp& clPattLookup, int strobeLength);
72 size_t estimateCompressedSize(const CompressedClusters& compCl);
73
75 template <typename VROF, typename VCLUS, typename VPAT>
76 void decompress(const CompressedClusters& compCl, VROF& rofRecVec, VCLUS& cclusVec, VPAT& pattVec, const NoiseMap* noiseMap, const LookUp& clPattLookup);
77
79 template <typename VROF, typename VDIG>
80 void decompress(const CompressedClusters& compCl, VROF& rofRecVec, VDIG& digVec, const NoiseMap* noiseMap, const LookUp& clPattLookup);
81
82 void appendToTree(TTree& tree, CTF& ec);
83 void readFromTree(TTree& tree, int entry, std::vector<ROFRecord>& rofRecVec, std::vector<CompClusterExt>& cclusVec, std::vector<unsigned char>& pattVec, const NoiseMap* noiseMap, const LookUp& clPattLookup);
84};
85
87template <typename VEC>
88o2::ctf::CTFIOSize CTFCoder::encode(VEC& buff, const gsl::span<const ROFRecord>& rofRecVec, const gsl::span<const CompClusterExt>& cclusVec,
89 const gsl::span<const unsigned char>& pattVec, const LookUp& clPattLookup, int strobeLength)
90{
92 // what to do which each field: see o2::ctd::Metadata explanation
93 constexpr MD optField[CTF::getNBlocks()] = {
94 MD::EENCODE_OR_PACK, // BLCfirstChipROF
95 MD::EENCODE_OR_PACK, // BLCbcIncROF
96 MD::EENCODE_OR_PACK, // BLCorbitIncROF
97 MD::EENCODE_OR_PACK, // BLCnclusROF
98 MD::EENCODE_OR_PACK, // BLCchipInc
99 MD::EENCODE_OR_PACK, // BLCchipMul
100 MD::EENCODE_OR_PACK, // BLCrow
101 MD::EENCODE_OR_PACK, // BLCcolInc
102 MD::EENCODE_OR_PACK, // BLCpattID
103 MD::EENCODE_OR_PACK // BLCpattMap
104 };
105 CompressedClusters compCl;
106 compress(compCl, rofRecVec, cclusVec, pattVec, clPattLookup, strobeLength);
107 // book output size with some margin
108 auto szIni = estimateCompressedSize(compCl);
109 buff.resize(szIni);
110
111 auto ec = CTF::create(buff);
112 using ECB = CTF::base;
113
114 ec->setHeader(compCl.header);
115 assignDictVersion(static_cast<o2::ctf::CTFDictHeader&>(ec->getHeader()));
116 ec->setANSHeader(mANSVersion);
117 // at every encoding the buffer might be autoexpanded, so we don't work with fixed pointer ec
118 o2::ctf::CTFIOSize iosize;
119#define ENCODEITSMFT(part, slot, bits) CTF::get(buff.data())->encode(part, int(slot), bits, optField[int(slot)], &buff, mCoders[int(slot)], getMemMarginFactor());
120 // clang-format off
121 iosize += ENCODEITSMFT(compCl.firstChipROF, CTF::BLCfirstChipROF, 0);
122 iosize += ENCODEITSMFT(compCl.bcIncROF, CTF::BLCbcIncROF, 0);
123 iosize += ENCODEITSMFT(compCl.orbitIncROF, CTF::BLCorbitIncROF, 0);
124 iosize += ENCODEITSMFT(compCl.nclusROF, CTF::BLCnclusROF, 0);
125 //
126 iosize += ENCODEITSMFT(compCl.chipInc, CTF::BLCchipInc, 0);
127 iosize += ENCODEITSMFT(compCl.chipMul, CTF::BLCchipMul, 0);
128 iosize += ENCODEITSMFT(compCl.row, CTF::BLCrow, 0);
129 iosize += ENCODEITSMFT(compCl.colInc, CTF::BLCcolInc, 0);
130 iosize += ENCODEITSMFT(compCl.pattID, CTF::BLCpattID, 0);
131 iosize += ENCODEITSMFT(compCl.pattMap, CTF::BLCpattMap, 0);
132 // clang-format on
133 //CTF::get(buff.data())->print(getPrefix());
134 iosize.rawIn = rofRecVec.size() * sizeof(ROFRecord) + cclusVec.size() * sizeof(CompClusterExt) + pattVec.size() * sizeof(unsigned char);
135 return iosize;
136}
137
139template <typename VROF, typename VCLUS, typename VPAT>
140o2::ctf::CTFIOSize CTFCoder::decode(const CTF::base& ec, VROF& rofRecVec, VCLUS& cclusVec, VPAT& pattVec, const NoiseMap* noiseMap, const LookUp& clPattLookup)
141{
142 o2::ctf::CTFIOSize iosize;
143 auto compCl = decodeCompressedClusters(ec, iosize);
144 decompress(compCl, rofRecVec, cclusVec, pattVec, noiseMap, clPattLookup);
145 iosize.rawIn = rofRecVec.size() * sizeof(ROFRecord) + cclusVec.size() * sizeof(CompClusterExt) + pattVec.size() * sizeof(unsigned char);
146 return iosize;
147}
148
150template <typename VROF, typename VDIG>
151o2::ctf::CTFIOSize CTFCoder::decode(const CTF::base& ec, VROF& rofRecVec, VDIG& digVec, const NoiseMap* noiseMap, const LookUp& clPattLookup)
152{
153 o2::ctf::CTFIOSize iosize;
154 auto compCl = decodeCompressedClusters(ec, iosize);
155 decompress(compCl, rofRecVec, digVec, noiseMap, clPattLookup);
156 iosize.rawIn += rofRecVec.size() * sizeof(ROFRecord) + digVec.size() * sizeof(Digit);
157 return iosize;
158}
159
161template <typename VROF, typename VCLUS, typename VPAT>
162void CTFCoder::decompress(const CompressedClusters& compCl, VROF& rofRecVec, VCLUS& cclusVec, VPAT& pattVec, const NoiseMap* noiseMap, const LookUp& clPattLookup)
163{
164 PMatrix pmat{};
165 RowColBuff firedPixBuff{}, maskedPixBuff{};
166 rofRecVec.resize(compCl.header.nROFs);
167 cclusVec.clear();
168 cclusVec.reserve(compCl.header.nClusters);
169 pattVec.clear();
170 pattVec.reserve(compCl.header.nPatternBytes);
172 uint32_t clCount = 0, chipCount = 0;
173 auto pattIt = compCl.pattMap.begin();
174 auto pattItStored = pattIt;
175
176 // >> ====== Helper functions for reclusterization after masking some pixels in decoded clusters ======
177 // clusterize the pmat matrix holding pixels of the single cluster after masking the noisy ones
178
179 auto clusterize = [&](uint16_t chipID, int16_t row, int16_t col, int leftFired) {
180#ifdef _ALLOW_DIAGONAL_ALPIDE_CLUSTERS_
181 const std::array<int16_t, 8> walkRow = {1, -1, 0, 0, 1, 1, -1, -1};
182 const std::array<int16_t, 8> walkCol = {0, 0, -1, 1, 1, -1, 1, 1};
183#else
184 const std::array<int16_t, 4> walkRow = {1, -1, 0, 0};
185 const std::array<int16_t, 4> walkCol = {0, 0, -1, 1};
186#endif
187 Clusterer::BBox bbox(chipID);
188 // check and add to new cluster seed fired pixels around ir1, ic1, return true if there are still fired pixels left
189 std::function<bool(int16_t, int16_t)> checkPixelAndNeighbours = [&](int16_t ir1, int16_t ic1) {
190 // if pixel in pmat is fired, add it to new cluster seed and adjust the BBox, decreasing the number of fired pixels left
191 auto checkPixel = [&](int16_t ir1, int16_t ic1) {
192 if (pmat[ir1][ic1]) {
193 pmat[ir1][ic1] = false;
194 uint16_t r = row + ir1 - 1, c = col + ic1 - 1;
195 firedPixBuff.emplace_back(r, c);
196 bbox.adjust(r, c);
197 leftFired--;
198 return true;
199 }
200 return false;
201 };
202 // check and add to new cluster seed fired pixels at and around ir1, ic1, return true if there are still fired pixels left
203 if (checkPixel(ir1, ic1) && leftFired) {
204 uint16_t iw = 0;
205 while (checkPixelAndNeighbours(ir1 + walkRow[iw], ic1 + walkCol[iw]) && ++iw < walkRow.size()) {
206 }
207 }
208 return leftFired;
209 };
210 // true will be returned if after incremental check of neighbours fired pixels are still left
211
212 firedPixBuff.clear(); // start new cluster seed
213 for (auto s : maskedPixBuff) { // we start checking from the holes remaining from the masked pixels
214 uint16_t iw = 0;
215 do {
216 checkPixelAndNeighbours(s.getRowDirect() + walkRow[iw], s.getCol() + walkCol[iw]);
217 if (!firedPixBuff.empty()) {
218 bbox.chipID = chipID;
219 Clusterer::streamCluster(firedPixBuff, nullptr, bbox, clPattLookup, &cclusVec, &pattVec, nullptr, 0);
220 firedPixBuff.clear();
221 bbox.clear();
222 }
223 } while (leftFired && ++iw < walkRow.size());
224 if (!leftFired) {
225 break;
226 }
227 }
228 };
229
230 auto reclusterize = [&]() {
231 auto clus = cclusVec.back(); // original newly added cluster
232 // acquire pattern
234 auto pattItPrev = pattIt;
235 maskedPixBuff.clear();
236 int rowRef = clus.getRow(), colRef = clus.getCol();
237 if (clPattLookup.size() == 0 && clus.getPatternID() != o2::itsmft::CompCluster::InvalidPatternID) {
238 throw std::runtime_error("Clusters contain pattern IDs, but no dictionary is provided...");
239 }
240 if (clus.getPatternID() == o2::itsmft::CompCluster::InvalidPatternID) {
241 patt.acquirePattern(pattIt);
242 } else if (clPattLookup.isGroup(clus.getPatternID())) {
243 patt.acquirePattern(pattIt);
244 float xCOG = 0, zCOG = 0;
245 patt.getCOG(xCOG, zCOG); // for grouped patterns the reference pixel is at COG
246 rowRef -= round(xCOG);
247 colRef -= round(zCOG);
248 } else {
249 patt = clPattLookup.getPattern(clus.getPatternID());
250 }
251 int rowSpan = patt.getRowSpan(), colSpan = patt.getColumnSpan(), nMasked = 0;
252 if (rowSpan == 1 && colSpan == 1) { // easy case: 1 pixel cluster
253 if (noiseMap->isNoisy(clus.getChipID(), rowRef, colRef)) { // just kill the cluster
254 std::copy(pattItStored, pattItPrev, back_inserter(pattVec)); // save patterns from after last saved to the one before killing this
255 pattItStored = pattIt; // advance to the head of the pattern iterator
256 cclusVec.pop_back();
257 }
258 // otherwise do nothing: cluster was already added, eventual patterns will be copied in large block at next modified cluster writing
259 } else {
260 int rowSpan = patt.getRowSpan(), colSpan = patt.getColumnSpan(), nMasked = 0, nPixels = 0; // apply noise and fill hits matrix
261 for (int ir = 0; ir < rowSpan; ir++) {
262 int row = rowRef + ir;
263 for (int ic = 0; ic < colSpan; ic++) {
264 if (patt.isSet(ir, ic)) {
265 if (noiseMap->isNoisy(clus.getChipID(), row, colRef + ic)) {
266 maskedPixBuff.emplace_back(ir + 1, ic + 1);
267 pmat[ir + 1][ic + 1] = false; // reset since might be left from prev cluster
268 nMasked++;
269 } else {
270 pmat[ir + 1][ic + 1] = true;
271 nPixels++;
272 }
273 } else {
274 pmat[ir + 1][ic + 1] = false; // reset since might be left from prev cluster
275 }
276 }
277 }
278
279 if (nMasked) {
280 cclusVec.pop_back(); // remove added cluster
281 std::copy(pattItStored, pattItPrev, back_inserter(pattVec)); // save patterns from after last saved to the one before killing this
282 pattItStored = pattIt; // advance to the head of the pattern iterator
283 if (nPixels) { // need to reclusterize remaining pixels
284 clusterize(clus.getChipID(), rowRef, colRef, nPixels);
285 }
286 }
287 }
288 };
289 // << ====== Helper functions for reclusterization after masking some pixels in decoded clusters ======
290
291 for (uint32_t irof = 0; irof < compCl.header.nROFs; irof++) {
292 // restore ROFRecord
293 auto& rofRec = rofRecVec[irof];
294 if (compCl.orbitIncROF[irof]) { // new orbit
295 prevIR.bc = compCl.bcIncROF[irof]; // bcInc has absolute meaning
296 prevIR.orbit += compCl.orbitIncROF[irof];
297 } else {
298 prevIR.bc += compCl.bcIncROF[irof];
299 }
300 rofRec.setBCData(prevIR);
301 rofRec.setFirstEntry(cclusVec.size());
302
303 // resrore chips data
304 auto chipID = compCl.firstChipROF[irof];
305 uint16_t col = 0;
306 int inChip = 0;
307 for (uint32_t icl = 0; icl < compCl.nclusROF[irof]; icl++) {
308 auto& clus = cclusVec.emplace_back();
309 if (inChip++ < compCl.chipMul[chipCount]) { // still the same chip
310 clus.setCol((col += compCl.colInc[clCount]));
311 } else { // new chip starts
312 chipID += compCl.chipInc[++chipCount];
313 inChip = 1;
314 clus.setCol((col = compCl.colInc[clCount])); // colInc has abs. col meaning
315 }
316 clus.setRow(compCl.row[clCount]);
317 clus.setPatternID(compCl.pattID[clCount]);
318 clus.setChipID(chipID);
319 if (noiseMap) { // noise masking was requested
320 reclusterize();
321 }
322 clCount++;
323 }
324 if (compCl.nclusROF[irof]) {
325 chipCount++; // since next chip for sure will be new and inChip will be 0...
326 }
327 rofRec.setNEntries(cclusVec.size() - rofRec.getFirstEntry());
328 }
329 if (noiseMap) { // reclusterization was requested
330 if (pattItStored != pattIt) { // copy unsaved patterns
331 std::copy(pattItStored, pattIt, back_inserter(pattVec));
332 }
333 } else { // copy decoded patterns as they are
334 pattVec.resize(compCl.header.nPatternBytes);
335 memcpy(pattVec.data(), compCl.pattMap.data(), compCl.header.nPatternBytes);
336 }
337 assert(chipCount == compCl.header.nChips);
338
339 if (clCount != compCl.header.nClusters) {
340 LOG(error) << "expected " << compCl.header.nClusters << " but counted " << clCount << " in ROFRecords";
341 throw std::runtime_error("mismatch between expected and counter number of clusters");
342 }
343}
344
346template <typename VROF, typename VDIG>
347void CTFCoder::decompress(const CompressedClusters& compCl, VROF& rofRecVec, VDIG& digVec, const NoiseMap* noiseMap, const LookUp& clPattLookup)
348{
349 rofRecVec.resize(compCl.header.nROFs);
350 digVec.reserve(compCl.header.nClusters * 2);
351 o2::InteractionRecord prevIR(compCl.header.firstBC, compCl.header.firstOrbit);
352 uint32_t clCount = 0, chipCount = 0;
353 auto pattIt = compCl.pattMap.begin();
355 for (uint32_t irof = 0; irof < compCl.header.nROFs; irof++) {
356 size_t chipStartNDig = digVec.size();
357 // restore ROFRecord
358 auto& rofRec = rofRecVec[irof];
359 if (compCl.orbitIncROF[irof]) { // new orbit
360 prevIR.bc = compCl.bcIncROF[irof]; // bcInc has absolute meaning
361 prevIR.orbit += compCl.orbitIncROF[irof];
362 } else {
363 prevIR.bc += compCl.bcIncROF[irof];
364 }
365 rofRec.setBCData(prevIR);
366 rofRec.setFirstEntry(digVec.size());
367
368 // resrore chips data
369 uint16_t chipID = compCl.firstChipROF[irof], col = 0;
370 int inChip = 0;
371 for (uint32_t icl = 0; icl < compCl.nclusROF[irof]; icl++) {
372 if (inChip++ < compCl.chipMul[chipCount]) { // still the same chip
373 col += compCl.colInc[clCount];
374 } else { // new chip starts
375 // sort digits of previous chip in col/row
376 auto added = digVec.size() - chipStartNDig;
377 if (added > 1) { // we need to sort digits in colums and in rows within a column
378 std::sort(digVec.end() - added, digVec.end(),
379 [](Digit& a, Digit& b) { return a.getColumn() < b.getColumn() || (a.getColumn() == b.getColumn() && a.getRow() < b.getRow()); });
380 }
381 chipStartNDig = digVec.size();
382 chipID += compCl.chipInc[++chipCount];
383#ifdef _CHECK_INCREMENTES_
384 if (int16_t(compCl.chipInc[chipCount]) < 0) {
385 LOG(warning) << "Negative chip increment " << int16_t(compCl.chipInc[chipCount]) << " -> " << chipID;
386 }
387#endif
388 inChip = 1;
389 col = compCl.colInc[clCount]; // colInc has abs. col meaning
390 }
391 uint16_t rowRef = compCl.row[clCount], colRef = col;
392 auto pattID = compCl.pattID[clCount];
394 patt.acquirePattern(pattIt);
395 } else {
396 if (clPattLookup.size() == 0) {
397 throw std::runtime_error("Clusters contain pattern IDs, but no dictionary is provided...");
398 }
400 patt.acquirePattern(pattIt);
401 } else if (clPattLookup.isGroup(pattID)) {
402 patt.acquirePattern(pattIt);
403 float xCOG = 0., zCOG = 0.;
404 patt.getCOG(xCOG, zCOG); // for grouped patterns the reference pixel is at COG
405 rowRef -= round(xCOG);
406 colRef -= round(zCOG);
407 } else {
408 patt = clPattLookup.getPattern(pattID);
409 }
410 }
411 clCount++;
412
413 auto fillRowCol = [&digVec, chipID, rowRef, colRef, noiseMap](int r, int c) {
414 r += rowRef;
415 c += colRef;
416 if (noiseMap && noiseMap->isNoisy(chipID, r, c)) {
417 return;
418 }
419 digVec.emplace_back(chipID, uint16_t(r), uint16_t(c));
420 };
421 patt.process(fillRowCol);
422 }
423 auto added = digVec.size() - chipStartNDig;
424 if (added > 1) { // Last chip of the ROF: we need to sort digits in colums and in rows within a column
425 std::sort(digVec.end() - added, digVec.end(),
426 [](Digit& a, Digit& b) { return a.getColumn() < b.getColumn() || (a.getColumn() == b.getColumn() && a.getRow() < b.getRow()); });
427 }
428
429 if (compCl.nclusROF[irof]) {
430 chipCount++; // since next chip for sure will be new and incChip will be 0...
431 }
432 rofRec.setNEntries(digVec.size() - rofRec.getFirstEntry());
433 }
434 // explicit patterns
435 assert(pattIt == compCl.pattMap.end());
436 assert(chipCount == compCl.header.nChips);
437
438 if (clCount != compCl.header.nClusters) {
439 LOG(error) << "expected " << compCl.header.nClusters << " but counted " << clCount << " in ROFRecords";
440 throw std::runtime_error("mismatch between expected and counter number of clusters");
441 }
442}
443
444} // namespace itsmft
445} // namespace o2
446
447#endif // O2_ITSMFT_CTFCODER_H
Declarations for CTFCoderBase class (support of external dictionaries)
Definition of the ITSMFT compact cluster.
Definition of the ITSMFT digit.
uint32_t op
Definitions for ITS/MFT CTF data.
Definition of the ITSMFT ROFrame (trigger) record.
#define ENCODEITSMFT(part, slot, bits)
Definition of the ITS cluster finder.
Definition of the LookUp class.
Definition of the ITSMFT NoiseMap.
Transient data classes for single pixel and set of pixels from current chip.
uint32_t col
Definition RawData.h:4
uint32_t c
Definition RawData.h:2
ctf::ANSHeader mANSVersion
virtual void assignDictVersion(CTFDictHeader &h) const
<<======================== Auxiliary classes =======================<<
EncodedBlocks< CTFHeader, N, uint32_t > base
static auto create(void *head, size_t sz)
create container from arbitrary buffer of predefined size (in bytes!!!). Head is supposed to respect ...
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
std::vector< PixelData > RowColBuff
Definition CTFCoder.h:46
std::array< std::array< bool, ClusterPattern::MaxRowSpan+2 >, ClusterPattern::MaxColSpan+2 > PMatrix
Definition CTFCoder.h:45
void createCoders(const std::vector< char > &bufVec, o2::ctf::CTFCoderBase::OpType op) final
Definition CTFCoder.cxx:194
o2::ctf::CTFIOSize encode(VEC &buff, const gsl::span< const ROFRecord > &rofRecVec, const gsl::span< const CompClusterExt > &cclusVec, const gsl::span< const unsigned char > &pattVec, const LookUp &clPattLookup, int strobeLength)
entropy-encode clusters to buffer with CTF
Definition CTFCoder.h:88
o2::ctf::CTFIOSize decode(const CTF::base &ec, VROF &rofRecVec, VCLUS &cclusVec, VPAT &pattVec, const NoiseMap *noiseMap, const LookUp &clPattLookup)
entropy decode clusters from buffer with CTF
Definition CTFCoder.h:140
CTFCoder(o2::ctf::CTFCoderBase::OpType op, o2::detectors::DetID det)
Definition CTFCoder.h:48
~CTFCoder() final=default
int getRowSpan() const
Returns the number of rows.
void acquirePattern(iterator &pattIt)
int getColumnSpan() const
Returns the number of columns.
static int getCOG(int rowSpan, int colSpan, const unsigned char patt[MaxPatternBytes], float &xCOG, float &zCOG)
Static: Compute pattern's COG position. Returns the number of fired pixels.
void process(Processor procRowCol)
bool isSet(int row, int col) const
const std::array< unsigned char, kExtendedPatternBytes > & getPattern() const
Returns the pattern.
static constexpr uint8_t MaxColSpan
static void streamCluster(const std::vector< PixelData > &pixbuf, const std::array< Label, MaxLabels > *lblBuff, const BBox &bbox, const LookUp &pattIdConverter, VCLUS *compClusPtr, VPAT *patternsPtr, MCTruth *labelsClusPtr, int nlab, bool isHuge=false)
Definition Clusterer.h:267
static constexpr unsigned short InvalidPatternID
Definition CompCluster.h:46
Digit class for the ITS.
Definition Digit.h:30
NoiseMap class for the ITS and MFT.
Definition NoiseMap.h:39
bool isNoisy(int chip, int row, int col) const
Definition NoiseMap.h:151
GLuint entry
Definition glcorearb.h:5735
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLboolean r
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
Detector header base.
uint32_t nChips
number of clusters in TF
Definition CTF.h:35
uint32_t nPatternBytes
number of fired chips in TF : this is for the version with chipInc stored once per new chip
Definition CTF.h:36
uint32_t firstOrbit
number of bytes for explict patterns
Definition CTF.h:37
uint16_t firstBC
1st orbit of TF
Definition CTF.h:38
uint32_t nClusters
number of ROFrame in TF
Definition CTF.h:34
uint32_t nROFs
Definition CTF.h:33
wrapper for the Entropy-encoded clusters of the TF
Definition CTF.h:69
@ BLCnclusROF
Definition CTF.h:75
@ BLCfirstChipROF
Definition CTF.h:72
@ BLCbcIncROF
Definition CTF.h:73
@ BLCorbitIncROF
Definition CTF.h:74
Compressed but not yet entropy-encoded clusters.
Definition CTF.h:43
std::vector< int16_t > chipInc
number of clusters in ROF
Definition CTF.h:54
std::vector< int16_t > bcIncROF
1st chip ID in the ROF
Definition CTF.h:49
std::vector< int32_t > orbitIncROF
increment of ROF BC wrt BC of previous ROF
Definition CTF.h:50
std::vector< uint16_t > pattID
increment of pixel column wrt that of prev. pixel (sometimes can be slightly negative)
Definition CTF.h:58
std::vector< uint16_t > firstChipROF
Definition CTF.h:48
std::vector< uint32_t > nclusROF
increment of ROF orbit wrt orbit of previous ROF
Definition CTF.h:51
std::vector< uint8_t > pattMap
cluster pattern ID
Definition CTF.h:59
std::vector< uint16_t > row
clusters in chip
Definition CTF.h:56
std::vector< int16_t > colInc
row of fired pixel
Definition CTF.h:57
std::vector< uint16_t > chipMul
increment of chipID wrt that of prev. chip
Definition CTF.h:55
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
o2::InteractionRecord ir(0, 0)
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))
LookUp clPattLookup
std::vector< int > row
std::vector< unsigned char > pattVec
std::vector< CompClusterExt > cclusVec