Project
Loading...
Searching...
No Matches
TimeFrame.cxx
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.
15
16#include <numeric>
17
18#include "Framework/Logger.h"
27
28namespace
29{
30struct ClusterHelper {
31 float phi;
32 float r;
33 int bin;
34 int ind;
35};
36} // namespace
37
38namespace o2::its
39{
40
45
46template <int NLayers>
48{
49 mPrimaryVertices.emplace_back(vert);
50 if (!isBeamPositionOverridden) {
51 const float w = vert.getNContributors();
52 mBeamPos[0] = (mBeamPos[0] * mBeamPosWeight + vert.getX() * w) / (mBeamPosWeight + w);
53 mBeamPos[1] = (mBeamPos[1] * mBeamPosWeight + vert.getY() * w) / (mBeamPosWeight + w);
54 mBeamPosWeight += w;
55 }
56}
57
58template <int NLayers>
59void TimeFrame<NLayers>::loadROFrameData(gsl::span<const o2::itsmft::ROFRecord> rofs,
60 gsl::span<const itsmft::CompClusterExt> clusters,
61 gsl::span<const unsigned char>::iterator& pattIt,
63 int layer,
65{
68 resetROFrameData(layer);
69 prepareROFrameData(clusters, layer);
70
71 // check for missing/empty/unset rofs
72 // the code requires consistent monotonically increasing input without gaps
73 const auto& timing = mROFOverlapTableView.getLayer(layer >= 0 ? layer : 0);
74 if (timing.mNROFsTF != rofs.size()) {
75 LOGP(fatal, "Received inconsistent number of rofs on layer:{} expected:{} received:{}", layer, timing.mNROFsTF, rofs.size());
76 }
77
78 for (int32_t iRof{0}; iRof < rofs.size(); ++iRof) {
79 const auto& rof = rofs[iRof];
80 for (int clusterId{rof.getFirstEntry()}; clusterId < rof.getFirstEntry() + rof.getNEntries(); ++clusterId) {
81 const auto& c = clusters[clusterId];
82 int lay = geom->getLayer(c.getSensorID());
83 auto pattID = c.getPatternID();
85 float sigmaY2 = DefClusError2Row, sigmaZ2 = DefClusError2Col, sigmaYZ = 0; // Dummy COG errors (about half pixel size)
86 unsigned int clusterSize{0};
88 sigmaY2 = dict->getErr2X(pattID);
89 sigmaZ2 = dict->getErr2Z(pattID);
90 if (!dict->isGroup(pattID)) {
91 locXYZ = dict->getClusterCoordinates(c);
92 clusterSize = dict->getNpixels(pattID);
93 } else {
95 locXYZ = dict->getClusterCoordinates(c, patt);
96 clusterSize = patt.getNPixels();
97 }
98 } else {
99 o2::itsmft::ClusterPattern patt(pattIt);
100 locXYZ = dict->getClusterCoordinates(c, patt, false);
101 clusterSize = patt.getNPixels();
102 }
103 mClusterSize[layer >= 0 ? layer : 0][clusterId] = std::clamp(clusterSize, 0u, 255u);
104 auto sensorID = c.getSensorID();
105 // Inverse transformation to the local --> tracking
106 auto trkXYZ = geom->getMatrixT2L(sensorID) ^ locXYZ;
107 // Transformation to the local --> global
108 auto gloXYZ = geom->getMatrixL2G(sensorID) * locXYZ;
109 addTrackingFrameInfoToLayer(lay, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), trkXYZ.x(), geom->getSensorRefAlpha(sensorID),
110 std::array<float, 2>{trkXYZ.y(), trkXYZ.z()},
111 std::array<float, 3>{sigmaY2, sigmaYZ, sigmaZ2});
113 addClusterToLayer(lay, gloXYZ.x(), gloXYZ.y(), gloXYZ.z(), mUnsortedClusters[lay].size());
114 addClusterExternalIndexToLayer(lay, clusterId);
115 }
116 // effectively calculating an exclusive sum
117 if (layer >= 0) {
118 mROFramesClusters[layer][iRof + 1] = mUnsortedClusters[layer].size();
119 } else {
120 for (unsigned int iL{0}; iL < mUnsortedClusters.size(); ++iL) {
121 mROFramesClusters[iL][iRof + 1] = mUnsortedClusters[iL].size();
122 }
123 }
124 }
125
126 if (layer == 1 || layer == -1) {
127 for (auto i = 0; i < mNTrackletsPerCluster.size(); ++i) {
128 mNTrackletsPerCluster[i].resize(mUnsortedClusters[1].size());
129 mNTrackletsPerClusterSum[i].resize(mUnsortedClusters[1].size() + 1);
130 }
131 }
132
133 if (mcLabels != nullptr) {
134 mClusterLabels[layer >= 0 ? layer : 0] = mcLabels;
135 } else {
136 mClusterLabels[layer >= 0 ? layer : 0] = nullptr;
137 }
138}
139
140template <int NLayers>
142{
143 if (layer >= 0) {
144 deepVectorClear(mUnsortedClusters[layer], getMaybeFrameworkHostResource());
145 deepVectorClear(mTrackingFrameInfo[layer], getMaybeFrameworkHostResource());
146 deepVectorClear(mClusterExternalIndices[layer], mMemoryPool.get());
147 clearResizeBoundedVector(mROFramesClusters[layer], mROFOverlapTableView.getLayer(layer).mNROFsTF + 1, getMaybeFrameworkHostResource());
148 } else {
149 for (int iLayer{0}; iLayer < NLayers; ++iLayer) {
150 deepVectorClear(mUnsortedClusters[iLayer], getMaybeFrameworkHostResource());
151 deepVectorClear(mTrackingFrameInfo[iLayer], getMaybeFrameworkHostResource());
152 deepVectorClear(mClusterExternalIndices[iLayer], mMemoryPool.get());
153 clearResizeBoundedVector(mROFramesClusters[iLayer], mROFOverlapTableView.getLayer(iLayer).mNROFsTF + 1, getMaybeFrameworkHostResource());
154 }
155 }
156}
157
158template <int NLayers>
159void TimeFrame<NLayers>::prepareROFrameData(gsl::span<const itsmft::CompClusterExt> clusters, int layer)
160{
161 if (layer >= 0) {
162 mUnsortedClusters[layer].reserve(clusters.size());
163 mTrackingFrameInfo[layer].reserve(clusters.size());
164 mClusterExternalIndices[layer].reserve(clusters.size());
165 clearResizeBoundedVector(mClusterSize[layer], clusters.size(), mMemoryPool.get());
166 } else {
167 auto* geom = GeometryTGeo::Instance();
168 clearResizeBoundedVector(mClusterSize[0], clusters.size(), mMemoryPool.get());
169 std::array<size_t, NLayers> clusterCountPerLayer{0};
170 for (const auto& cls : clusters) {
171 ++clusterCountPerLayer[geom->getLayer(cls.getChipID())];
172 }
173 for (int iLayer{0}; iLayer < NLayers; ++iLayer) {
174 mUnsortedClusters[iLayer].reserve(clusterCountPerLayer[iLayer]);
175 mTrackingFrameInfo[iLayer].reserve(clusterCountPerLayer[iLayer]);
176 mClusterExternalIndices[iLayer].reserve(clusterCountPerLayer[iLayer]);
177 }
178 }
179}
180
181template <int NLayers>
182void TimeFrame<NLayers>::prepareClusters(const TrackingParameters& trkParam, const int maxLayers)
183{
184 const int numBins{trkParam.PhiBins * trkParam.ZBins};
185 const int stride{numBins + 1};
186 bounded_vector<ClusterHelper> cHelper(mMemoryPool.get());
187 bounded_vector<int> clsPerBin(numBins, 0, mMemoryPool.get());
188 bounded_vector<int> lutPerBin(numBins, 0, mMemoryPool.get());
189 for (int iLayer{0}, stopLayer = std::min(trkParam.NLayers, maxLayers); iLayer < stopLayer; ++iLayer) {
190 for (int rof{0}; rof < getNrof(iLayer); ++rof) {
191 if (!mROFMaskView.isROFEnabled(iLayer, rof)) {
192 continue;
193 }
194 const auto& unsortedClusters{getUnsortedClustersOnLayer(rof, iLayer)};
195 const int clustersNum{static_cast<int>(unsortedClusters.size())};
196 auto* tableBase = mIndexTables[iLayer].data() + rof * stride;
197
198 cHelper.resize(clustersNum);
199
200 for (int iCluster{0}; iCluster < clustersNum; ++iCluster) {
201 const Cluster& c = unsortedClusters[iCluster];
202 ClusterHelper& h = cHelper[iCluster];
203
204 const float x = c.xCoordinate - mBeamPos[0];
205 const float y = c.yCoordinate - mBeamPos[1];
206 const float z = c.zCoordinate;
207
208 float phi = math_utils::computePhi(x, y);
209 int zBin{mIndexTableUtils.getZBinIndex(iLayer, z)};
210 if (zBin < 0 || zBin >= trkParam.ZBins) {
211 zBin = std::clamp(zBin, 0, trkParam.ZBins - 1);
212 mBogusClusters[iLayer]++;
213 }
214 int bin = mIndexTableUtils.getBinIndex(zBin, mIndexTableUtils.getPhiBinIndex(phi));
215 h.phi = phi;
216 h.r = math_utils::hypot(x, y);
217 mMinR[iLayer] = o2::gpu::GPUCommonMath::Min(h.r, mMinR[iLayer]);
218 mMaxR[iLayer] = o2::gpu::GPUCommonMath::Max(h.r, mMaxR[iLayer]);
219 h.bin = bin;
220 h.ind = clsPerBin[bin]++;
222 std::exclusive_scan(clsPerBin.begin(), clsPerBin.end(), lutPerBin.begin(), 0);
223
224 auto clusters2beSorted{getClustersOnLayer(rof, iLayer)};
225 for (int iCluster{0}; iCluster < clustersNum; ++iCluster) {
226 const ClusterHelper& h = cHelper[iCluster];
227 Cluster& c = clusters2beSorted[lutPerBin[h.bin] + h.ind];
228
229 c = unsortedClusters[iCluster];
230 c.phi = h.phi;
231 c.radius = h.r;
232 c.indexTableBinIndex = h.bin;
233 }
234 std::copy_n(lutPerBin.data(), clsPerBin.size(), tableBase);
235 std::fill_n(tableBase + clsPerBin.size(), stride - clsPerBin.size(), clustersNum);
236
237 std::fill(clsPerBin.begin(), clsPerBin.end(), 0);
238 cHelper.clear();
239 }
240 }
241}
242
243template <int NLayers>
244void TimeFrame<NLayers>::initialise(const int iteration, const TrackingParameters& trkParam, const int maxLayers, bool resetVertices)
245{
246 if (iteration == 0) {
247 deepVectorClear(mTracks);
248 deepVectorClear(mTracksLabel);
249 deepVectorClear(mLines);
250 deepVectorClear(mLinesLabels);
251 if (resetVertices) {
252 deepVectorClear(mPrimaryVertices);
253 deepVectorClear(mPrimaryVerticesLabels);
254 }
255 clearResizeBoundedVector(mLinesLabels, getNrof(1), mMemoryPool.get());
256 clearResizeBoundedVector(mCells, trkParam.CellsPerRoad(), mMemoryPool.get());
257 clearResizeBoundedVector(mCellsLookupTable, trkParam.CellsPerRoad() - 1, mMemoryPool.get());
258 clearResizeBoundedVector(mCellsNeighbours, trkParam.CellsPerRoad() - 1, mMemoryPool.get());
259 clearResizeBoundedVector(mCellsNeighboursLUT, trkParam.CellsPerRoad() - 1, mMemoryPool.get());
260 clearResizeBoundedVector(mCellLabels, trkParam.CellsPerRoad(), mMemoryPool.get());
261 clearResizeBoundedVector(mTracklets, std::min(trkParam.TrackletsPerRoad(), maxLayers - 1), mMemoryPool.get());
262 clearResizeBoundedVector(mTrackletLabels, trkParam.TrackletsPerRoad(), mMemoryPool.get());
263 clearResizeBoundedVector(mTrackletsLookupTable, trkParam.TrackletsPerRoad(), mMemoryPool.get());
264 mIndexTableUtils.setTrackingParameters(trkParam);
265 clearResizeBoundedVector(mPositionResolution, trkParam.NLayers, mMemoryPool.get());
266 clearResizeBoundedVector(mBogusClusters, trkParam.NLayers, mMemoryPool.get());
267 deepVectorClear(mTrackletClusters);
268 for (unsigned int iLayer{0}; iLayer < std::min((int)mClusters.size(), maxLayers); ++iLayer) {
269 clearResizeBoundedVector(mClusters[iLayer], mUnsortedClusters[iLayer].size(), getMaybeFrameworkHostResource(maxLayers != NLayers));
270 clearResizeBoundedVector(mUsedClusters[iLayer], mUnsortedClusters[iLayer].size(), getMaybeFrameworkHostResource(maxLayers != NLayers));
271 mPositionResolution[iLayer] = o2::gpu::CAMath::Sqrt((0.5f * (trkParam.SystErrorZ2[iLayer] + trkParam.SystErrorY2[iLayer])) + (trkParam.LayerResolution[iLayer] * trkParam.LayerResolution[iLayer]));
272 }
273 clearResizeBoundedVector(mLines, getNrof(1), mMemoryPool.get());
274 clearResizeBoundedVector(mTrackletClusters, getNrof(1), mMemoryPool.get());
275
276 for (int iLayer{0}; iLayer < NLayers; ++iLayer) {
277 clearResizeBoundedVector(mIndexTables[iLayer], getNrof(iLayer) * ((trkParam.ZBins * trkParam.PhiBins) + 1), getMaybeFrameworkHostResource());
278 }
279 for (int iLayer{0}; iLayer < trkParam.NLayers; ++iLayer) {
280 if (trkParam.SystErrorY2[iLayer] > 0.f || trkParam.SystErrorZ2[iLayer] > 0.f) {
281 for (auto& tfInfo : mTrackingFrameInfo[iLayer]) {
283 tfInfo.covarianceTrackingFrame[0] += trkParam.SystErrorY2[iLayer];
284 tfInfo.covarianceTrackingFrame[2] += trkParam.SystErrorZ2[iLayer];
285 }
286 }
287 }
288
289 mMinR.fill(std::numeric_limits<float>::max());
290 mMaxR.fill(std::numeric_limits<float>::min());
291 }
292 mNTrackletsPerROF.resize(2);
293 for (auto& v : mNTrackletsPerROF) {
294 v = bounded_vector<int>(getNrof(1) + 1, 0, mMemoryPool.get());
295 }
296 if (iteration == 0 || iteration == 3) {
297 prepareClusters(trkParam, maxLayers);
298 }
299 mTotalTracklets = {0, 0};
300 if (maxLayers < trkParam.NLayers) { // Vertexer only, but in both iterations
301 for (size_t iLayer{0}; iLayer < maxLayers; ++iLayer) {
302 deepVectorClear(mUsedClusters[iLayer]);
303 clearResizeBoundedVector(mUsedClusters[iLayer], mUnsortedClusters[iLayer].size(), mMemoryPool.get());
304 }
305 }
306
307 mMSangles.resize(trkParam.NLayers);
308 mPhiCuts.resize(mClusters.size() - 1, 0.f);
309 float oneOverR{0.001f * 0.3f * std::abs(mBz) / trkParam.TrackletMinPt};
310 for (unsigned int iLayer{0}; iLayer < NLayers; ++iLayer) {
311 mMSangles[iLayer] = math_utils::MSangle(0.14f, trkParam.TrackletMinPt, trkParam.LayerxX0[iLayer]);
312 mPositionResolution[iLayer] = o2::gpu::CAMath::Sqrt((0.5f * (trkParam.SystErrorZ2[iLayer] + trkParam.SystErrorY2[iLayer])) + (trkParam.LayerResolution[iLayer] * trkParam.LayerResolution[iLayer]));
313 if (iLayer < mClusters.size() - 1) {
314 const float& r1 = trkParam.LayerRadii[iLayer];
315 const float& r2 = trkParam.LayerRadii[iLayer + 1];
316 oneOverR = (0.5 * oneOverR >= 1.f / r2) ? (2.f / r2) - o2::constants::math::Almost0 : oneOverR;
317 const float res1 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer]);
318 const float res2 = o2::gpu::CAMath::Hypot(trkParam.PVres, mPositionResolution[iLayer + 1]);
319 const float cosTheta1half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r1 * oneOverR));
320 const float cosTheta2half = o2::gpu::CAMath::Sqrt(1.f - math_utils::Sq(0.5f * r2 * oneOverR));
321 float x = (r2 * cosTheta1half) - (r1 * cosTheta2half);
322 float delta = o2::gpu::CAMath::Sqrt(1.f / (1.f - 0.25f * math_utils::Sq(x * oneOverR)) * (math_utils::Sq((0.25f * r1 * r2 * math_utils::Sq(oneOverR) / cosTheta2half) + cosTheta1half) * math_utils::Sq(res1) + math_utils::Sq((0.25f * r1 * r2 * math_utils::Sq(oneOverR) / cosTheta1half) + cosTheta2half) * math_utils::Sq(res2)));
324 mPhiCuts[iLayer] = std::min(o2::gpu::CAMath::ASin(0.5f * x * oneOverR) + 2.f * mMSangles[iLayer] + delta, o2::constants::math::PI * 0.5f);
325 }
326 }
327
328 for (int iLayer{0}; iLayer < std::min((int)mTracklets.size(), maxLayers); ++iLayer) {
329 deepVectorClear(mTracklets[iLayer]);
330 deepVectorClear(mTrackletLabels[iLayer]);
331 if (iLayer < (int)mCells.size()) {
332 deepVectorClear(mCells[iLayer]);
333 deepVectorClear(mTrackletsLookupTable[iLayer]);
334 mTrackletsLookupTable[iLayer].resize(mClusters[iLayer + 1].size() + 1, 0);
335 deepVectorClear(mCellLabels[iLayer]);
336 }
337
338 if (iLayer < (int)mCells.size() - 1) {
339 deepVectorClear(mCellsLookupTable[iLayer]);
340 deepVectorClear(mCellsNeighbours[iLayer]);
341 deepVectorClear(mCellsNeighboursLUT[iLayer]);
342 }
343 }
344}
345
346template <int NLayers>
348{
349 unsigned long size{0};
350 for (const auto& trkl : mTracklets) {
351 size += sizeof(Tracklet) * trkl.size();
352 }
353 for (const auto& cells : mCells) {
354 size += sizeof(CellSeed) * cells.size();
355 }
356 for (const auto& cellsN : mCellsNeighbours) {
357 size += sizeof(int) * cellsN.size();
358 }
359 return size;
360}
361
362template <int NLayers>
364{
365 LOGP(info, "TimeFrame: Artefacts occupy {:.2f} MB", getArtefactsMemory() / constants::MB);
366}
367
368template <int NLayers>
370{
371 for (ushort iLayer = 0; iLayer < 2; ++iLayer) {
372 for (unsigned int iRof{0}; iRof < getNrof(1); ++iRof) {
373 if (mROFMaskView.isROFEnabled(1, iRof)) {
374 mTotalTracklets[iLayer] += mNTrackletsPerROF[iLayer][iRof];
375 }
376 }
377 std::exclusive_scan(mNTrackletsPerROF[iLayer].begin(), mNTrackletsPerROF[iLayer].end(), mNTrackletsPerROF[iLayer].begin(), 0);
378 std::exclusive_scan(mNTrackletsPerCluster[iLayer].begin(), mNTrackletsPerCluster[iLayer].end(), mNTrackletsPerClusterSum[iLayer].begin(), 0);
379 }
380}
381
382template <int NLayers>
383void TimeFrame<NLayers>::setMemoryPool(std::shared_ptr<BoundedMemoryResource> pool)
384{
385 mMemoryPool = pool;
386
387 auto initVector = [&]<typename T>(bounded_vector<T>& vec, bool useExternal = false) {
388 std::pmr::memory_resource* mr = (useExternal) ? mExtMemoryPool.get() : mMemoryPool.get();
389 deepVectorClear(vec, mr);
390 };
391
392 auto initContainers = [&]<typename Container>(Container& container, bool useExternal = false) {
393 for (auto& v : container) {
394 initVector(v, useExternal);
395 }
396 };
397
398 // these will only reside on the host for the cpu part
399 initContainers(mClusterExternalIndices);
400 initContainers(mNTrackletsPerCluster);
401 initContainers(mNTrackletsPerClusterSum);
402 initContainers(mNClustersPerROF);
403 initVector(mPrimaryVertices);
404 initVector(mMSangles);
405 initVector(mPhiCuts);
406 initVector(mPositionResolution);
407 initContainers(mClusterSize);
408 initVector(mPValphaX);
409 initVector(mBogusClusters);
410 initContainers(mTrackletsIndexROF);
411 initVector(mTracks);
412 initContainers(mTracklets);
413 initContainers(mCells);
414 initContainers(mCellsNeighbours);
415 initContainers(mCellsLookupTable);
416 // MC info (we don't know if we have MC)
417 initVector(mPrimaryVerticesLabels);
418 initContainers(mLinesLabels);
419 initContainers(mTrackletLabels);
420 initContainers(mCellLabels);
421 initVector(mTracksLabel);
422 // these will use possibly an externally provided allocator
423 initContainers(mClusters, hasFrameworkAllocator());
424 initContainers(mUsedClusters, hasFrameworkAllocator());
425 initContainers(mUnsortedClusters, hasFrameworkAllocator());
426 initContainers(mIndexTables, hasFrameworkAllocator());
427 initContainers(mTrackingFrameInfo, hasFrameworkAllocator());
428 initContainers(mROFramesClusters, hasFrameworkAllocator());
429}
430
431template <int NLayers>
433{
434 mExternalAllocator = ext;
435 mExtMemoryPool = std::make_shared<BoundedMemoryResource>(mExternalAllocator);
436}
437
438template <int NLayers>
440{
441 deepVectorClear(mTracks);
442 deepVectorClear(mTracklets);
443 deepVectorClear(mCells);
444 deepVectorClear(mCellsNeighbours);
445 deepVectorClear(mCellsLookupTable);
446 deepVectorClear(mPrimaryVertices);
447 deepVectorClear(mTrackletsLookupTable);
448 deepVectorClear(mClusterExternalIndices);
449 deepVectorClear(mNTrackletsPerCluster);
450 deepVectorClear(mNTrackletsPerClusterSum);
451 deepVectorClear(mNClustersPerROF);
452 deepVectorClear(mMSangles);
453 deepVectorClear(mPhiCuts);
454 deepVectorClear(mPositionResolution);
455 deepVectorClear(mClusterSize);
456 deepVectorClear(mPValphaX);
457 deepVectorClear(mBogusClusters);
458 deepVectorClear(mTrackletsIndexROF);
459 deepVectorClear(mTrackletClusters);
460 deepVectorClear(mLines);
461 // if we use the external host allocator then the assumption is that we
462 // don't clear the memory ourself
463 if (!hasFrameworkAllocator()) {
464 deepVectorClear(mClusters);
465 deepVectorClear(mUsedClusters);
466 deepVectorClear(mUnsortedClusters);
467 deepVectorClear(mIndexTables);
468 deepVectorClear(mTrackingFrameInfo);
469 deepVectorClear(mROFramesClusters);
470 }
471 // only needed to clear if we have MC info
472 if (hasMCinformation()) {
473 deepVectorClear(mLinesLabels);
474 deepVectorClear(mPrimaryVerticesLabels);
475 deepVectorClear(mTrackletLabels);
476 deepVectorClear(mCellLabels);
477 deepVectorClear(mTracksLabel);
478 }
479}
480
481template class TimeFrame<7>;
482// ALICE3 upgrade
483#ifdef ENABLE_UPGRADES
484template class TimeFrame<11>;
485#endif
486
487} // namespace o2::its
Definition of the ITSMFT compact cluster.
Definition of the ClusterTopology class.
int32_t i
Definition of the GeometryTGeo class.
Definition of the ITSMFT ROFrame (trigger) record.
uint32_t c
Definition RawData.h:2
Definition of the SegmentationAlpide class.
int clusterSize
Class for time synchronization of RawReader instances.
A container to hold and manage MC truth information/labels.
const Mat3D & getMatrixL2G(int sensID) const
HMPID cluster implementation.
Definition Cluster.h:27
CellSeed: connections of three clusters.
Definition Cell.h:68
const Mat3D & getMatrixT2L(int lay, int hba, int sta, int det) const
float getSensorRefAlpha(int isn) const
static GeometryTGeo * Instance()
int getLayer(int index) const final
Get chip layer, from 0.
void fillMatrixCache(int mask) override
static constexpr unsigned short InvalidPatternID
Definition CompCluster.h:46
static constexpr float PitchCol
static constexpr float PitchRow
math_utils::Point3D< T > getClusterCoordinates(const CompCluster &cl) const
float getErr2X(int n) const
Returns the error^2 on the x position of the COG for the n_th element.
int getNpixels(int n) const
Returns the number of fired pixels of the n_th element.
bool isGroup(int n) const
Returns true if the element corresponds to a group of rare topologies.
float getErr2Z(int n) const
Returns the error^2 on the z position of the COG for the n_th element.
GLint GLenum GLint x
Definition glcorearb.h:403
GLsizeiptr size
Definition glcorearb.h:659
GLuint GLuint end
Definition glcorearb.h:469
const GLdouble * v
Definition glcorearb.h:832
GLint GLenum GLboolean GLsizei stride
Definition glcorearb.h:867
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLboolean r
Definition glcorearb.h:1233
GLubyte GLubyte GLubyte GLubyte w
Definition glcorearb.h:852
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
constexpr float Almost0
constexpr float PI
constexpr float MB
Definition Constants.h:29
void deepVectorClear(std::vector< T > &vec)
std::pmr::vector< T > bounded_vector
constexpr float DefClusError2Col
Definition TimeFrame.cxx:44
constexpr float DefClusError2Row
Definition TimeFrame.cxx:43
constexpr float DefClusErrorRow
Definition TimeFrame.cxx:41
constexpr float DefClusErrorCol
Definition TimeFrame.cxx:42
void clearResizeBoundedVector(bounded_vector< T > &vec, size_t sz, std::pmr::memory_resource *mr=nullptr, T def=T())
void prepareClusters(const TrackingParameters &trkParam, const int maxLayers=NLayers)
void setMemoryPool(std::shared_ptr< BoundedMemoryResource > pool)
memory management
void printArtefactsMemory() const
void setFrameworkAllocator(ExternalAllocator *ext)
void prepareROFrameData(gsl::span< const itsmft::CompClusterExt > clusters, int layer)
void computeTrackletsPerROFScans()
void addPrimaryVertex(const Vertex &vertex)
Definition TimeFrame.cxx:47
void loadROFrameData(gsl::span< const o2::itsmft::ROFRecord > rofs, gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char >::iterator &pattIt, const itsmft::TopologyDictionary *dict, int layer, const dataformats::MCTruthContainer< MCCompLabel > *mcLabels=nullptr)
Definition TimeFrame.cxx:59
void resetROFrameData(int iLayer)
void initialise(const int iteration, const TrackingParameters &trkParam, const int maxLayers=NLayers, bool resetVertices=true)
virtual void wipe()
unsigned long getArtefactsMemory() const
std::vector< float > LayerRadii
std::vector< float > SystErrorY2
std::vector< float > SystErrorZ2
float TrackletMinPt
Trackleting cuts.
std::vector< float > LayerResolution
std::vector< float > LayerxX0
int CellsPerRoad() const noexcept
int TrackletsPerRoad() const noexcept
static constexpr int L2G
Definition Cartesian.h:54
static constexpr int T2L
Definition Cartesian.h:55
std::vector< o2::ctf::BufferType > vec
std::vector< Cluster > clusters
std::vector< Cell > cells