Project
Loading...
Searching...
No Matches
Tracker.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 "ITStracking/Tracker.h"
17
18#include "ITStracking/Cell.h"
25
27#include <cassert>
28#include <iostream>
29#include <dlfcn.h>
30#include <cstdlib>
31#include <string>
32#include <climits>
33
34namespace o2
35{
36namespace its
37{
39
41{
43 mTrkParams.resize(1);
44 mTraits = traits;
45}
46
47Tracker::~Tracker() = default;
48
49void Tracker::clustersToTracks(std::function<void(std::string s)> logger, std::function<void(std::string s)> error)
50{
51 double total{0};
52 mTraits->UpdateTrackingParameters(mTrkParams);
53 int maxNvertices{-1};
54 if (mTrkParams[0].PerPrimaryVertexProcessing) {
55 for (int iROF{0}; iROF < mTimeFrame->getNrof(); ++iROF) {
56 maxNvertices = std::max(maxNvertices, (int)mTimeFrame->getPrimaryVertices(iROF).size());
57 }
58 }
59
60 bool dropTF = false;
61 for (int iteration = 0; iteration < (int)mTrkParams.size(); ++iteration) {
62 if (iteration == 3 && mTrkParams[0].DoUPCIteration) {
63 mTimeFrame->swapMasks();
64 }
65 logger(fmt::format("ITS Tracking iteration {} summary:", iteration));
66 double timeTracklets{0.}, timeCells{0.}, timeNeighbours{0.}, timeRoads{0.};
67 int nTracklets{0}, nCells{0}, nNeighbours{0}, nTracks{-static_cast<int>(mTimeFrame->getNumberOfTracks())};
68
69 total += evaluateTask(&Tracker::initialiseTimeFrame, "Timeframe initialisation", logger, iteration);
70 int nROFsIterations = mTrkParams[iteration].nROFsPerIterations > 0 ? mTimeFrame->getNrof() / mTrkParams[iteration].nROFsPerIterations + bool(mTimeFrame->getNrof() % mTrkParams[iteration].nROFsPerIterations) : 1;
71 int iVertex{std::min(maxNvertices, 0)};
72
73 do {
74 for (int iROFs{0}; iROFs < nROFsIterations; ++iROFs) {
75 timeTracklets += evaluateTask(
76 &Tracker::computeTracklets, "Tracklet finding", [](std::string) {}, iteration, iROFs, iVertex);
77 nTracklets += mTraits->getTFNumberOfTracklets();
78 if (!mTimeFrame->checkMemory(mTrkParams[iteration].MaxMemory)) {
79 mTimeFrame->printSliceInfo(iROFs, mTrkParams[iteration].nROFsPerIterations);
80 error(fmt::format("Too much memory used during trackleting in iteration {} in ROF span {}-{}: {:.2f} GB. Current limit is {:.2f} GB, check the detector status and/or the selections.",
81 iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, mTimeFrame->getArtefactsMemory() / GB, mTrkParams[iteration].MaxMemory / GB));
82 if (mTrkParams[iteration].DropTFUponFailure) {
83 dropTF = true;
84 }
85 break;
86 }
87 float trackletsPerCluster = mTraits->getTFNumberOfClusters() > 0 ? float(mTraits->getTFNumberOfTracklets()) / mTraits->getTFNumberOfClusters() : 0.f;
88 if (trackletsPerCluster > mTrkParams[iteration].TrackletsPerClusterLimit) {
89 error(fmt::format("Too many tracklets per cluster ({}) in iteration {} in ROF span {}-{}:, check the detector status and/or the selections. Current limit is {}",
90 trackletsPerCluster, iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, mTrkParams[iteration].TrackletsPerClusterLimit));
91 break;
92 }
93
94 timeCells += evaluateTask(
95 &Tracker::computeCells, "Cell finding", [](std::string) {}, iteration);
96 nCells += mTraits->getTFNumberOfCells();
97 if (!mTimeFrame->checkMemory(mTrkParams[iteration].MaxMemory)) {
98 mTimeFrame->printSliceInfo(iROFs, mTrkParams[iteration].nROFsPerIterations);
99 error(fmt::format("Too much memory used during cell finding in iteration {} in ROF span {}-{}: {:.2f} GB. Current limit is {:.2f} GB, check the detector status and/or the selections.",
100 iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, mTimeFrame->getArtefactsMemory() / GB, mTrkParams[iteration].MaxMemory / GB));
101 if (mTrkParams[iteration].DropTFUponFailure) {
102 dropTF = true;
103 }
104 break;
105 }
106 float cellsPerCluster = mTraits->getTFNumberOfClusters() > 0 ? float(mTraits->getTFNumberOfCells()) / mTraits->getTFNumberOfClusters() : 0.f;
107 if (cellsPerCluster > mTrkParams[iteration].CellsPerClusterLimit) {
108 error(fmt::format("Too many cells per cluster ({}) in iteration {} in ROF span {}-{}, check the detector status and/or the selections. Current limit is {}",
109 cellsPerCluster, iteration, iROFs, iROFs + mTrkParams[iteration].nROFsPerIterations, mTrkParams[iteration].CellsPerClusterLimit));
110 break;
111 }
112
113 timeNeighbours += evaluateTask(
114 &Tracker::findCellsNeighbours, "Neighbour finding", [](std::string) {}, iteration);
115 nNeighbours += mTimeFrame->getNumberOfNeighbours();
116 timeRoads += evaluateTask(
117 &Tracker::findRoads, "Road finding", [](std::string) {}, iteration);
118 }
119 iVertex++;
120 } while (iVertex < maxNvertices && !dropTF);
121 logger(fmt::format(" - Tracklet finding: {} tracklets found in {:.2f} ms", nTracklets, timeTracklets));
122 logger(fmt::format(" - Cell finding: {} cells found in {:.2f} ms", nCells, timeCells));
123 logger(fmt::format(" - Neighbours finding: {} neighbours found in {:.2f} ms", nNeighbours, timeNeighbours));
124 logger(fmt::format(" - Track finding: {} tracks found in {:.2f} ms", nTracks + mTimeFrame->getNumberOfTracks(), timeRoads));
125 total += timeTracklets + timeCells + timeNeighbours + timeRoads;
126 if (mTrkParams[iteration].UseTrackFollower) {
127 int nExtendedTracks{-mTimeFrame->mNExtendedTracks}, nExtendedClusters{-mTimeFrame->mNExtendedUsedClusters};
128 auto timeExtending = evaluateTask(&Tracker::extendTracks, "Extending tracks", [](const std::string&) {}, iteration);
129 total += timeExtending;
130 logger(fmt::format(" - Extending Tracks: {} extended tracks using {} clusters found in {:.2f} ms", nExtendedTracks + mTimeFrame->mNExtendedTracks, nExtendedClusters + mTimeFrame->mNExtendedUsedClusters, timeExtending));
131 }
132 if (dropTF) {
133 error(fmt::format("...Dropping Timeframe..."));
134 mTimeFrame->dropTracks();
135 break; // breaking out the iterations loop
136 }
137 }
138
139 total += evaluateTask(&Tracker::findShortPrimaries, "Short primaries finding", logger);
140
141 std::stringstream sstream;
142 if constexpr (constants::DoTimeBenchmarks) {
143 sstream << std::setw(2) << " - "
144 << "Timeframe " << mTimeFrameCounter++ << " processing completed in: " << total << "ms using " << mTraits->getNThreads() << " threads.";
145 }
146 logger(sstream.str());
147
148 if (mTimeFrame->hasMCinformation()) {
149 computeTracksMClabels();
150 }
151 rectifyClusterIndices();
152 mNumberOfRuns++;
153}
154
155void Tracker::clustersToTracksHybrid(std::function<void(std::string s)> logger, std::function<void(std::string s)> error)
156{
157 double total{0.};
158 mTraits->UpdateTrackingParameters(mTrkParams);
159 int maxNvertices{-1};
160 if (mTrkParams[0].PerPrimaryVertexProcessing) {
161 for (int iROF{0}; iROF < mTimeFrame->getNrof(); ++iROF) {
162 maxNvertices = std::max(maxNvertices, (int)mTimeFrame->getPrimaryVertices(iROF).size());
163 }
164 }
165
166 for (int iteration = 0; iteration < (int)mTrkParams.size(); ++iteration) {
167 int nROFsIterations = mTrkParams[iteration].nROFsPerIterations > 0 ? mTimeFrame->getNrof() / mTrkParams[iteration].nROFsPerIterations + bool(mTimeFrame->getNrof() % mTrkParams[iteration].nROFsPerIterations) : 1;
168 logger(fmt::format("=========== ITS Hybrid Tracking iteration {} summary ===========", iteration, nROFsIterations, maxNvertices));
169 double timeTracklets{0.}, timeCells{0.}, timeNeighbours{0.}, timeRoads{0.};
170 int nTracklets{0}, nCells{0}, nNeighbours{0}, nTracks{-static_cast<int>(mTimeFrame->getNumberOfTracks())};
171
172 total += evaluateTask(&Tracker::initialiseTimeFrameHybrid, "Hybrid Timeframe initialisation", logger, iteration);
173 int iVertex{std::min(maxNvertices, 0)};
174
175 do {
176 for (int iROFs{0}; iROFs < nROFsIterations; ++iROFs) {
177 timeTracklets += evaluateTask(
178 &Tracker::computeTrackletsHybrid, "Tracklet finding", [](std::string) {}, iteration, iROFs, iVertex);
179 nTracklets += mTraits->getTFNumberOfTracklets();
180 if (!mTimeFrame->checkMemory(mTrkParams[iteration].MaxMemory)) {
181 error(fmt::format("Too much memory used during trackleting in iteration {}, check the detector status and/or the selections.", iteration));
182 break;
183 }
184 float trackletsPerCluster = mTraits->getTFNumberOfClusters() > 0 ? float(mTraits->getTFNumberOfTracklets()) / mTraits->getTFNumberOfClusters() : 0.f;
185 if (trackletsPerCluster > mTrkParams[iteration].TrackletsPerClusterLimit) {
186 error(fmt::format("Too many tracklets per cluster ({}) in iteration {}, check the detector status and/or the selections. Current limit is {}", trackletsPerCluster, iteration, mTrkParams[iteration].TrackletsPerClusterLimit));
187 break;
188 }
189
190 timeCells += evaluateTask(
191 &Tracker::computeCellsHybrid, "Cell finding", [](std::string) {}, iteration);
192 nCells += mTraits->getTFNumberOfCells();
193 if (!mTimeFrame->checkMemory(mTrkParams[iteration].MaxMemory)) {
194 error(fmt::format("Too much memory used during cell finding in iteration {}, check the detector status and/or the selections.", iteration));
195 break;
196 }
197 float cellsPerCluster = mTraits->getTFNumberOfClusters() > 0 ? float(mTraits->getTFNumberOfCells()) / mTraits->getTFNumberOfClusters() : 0.f;
198 if (cellsPerCluster > mTrkParams[iteration].CellsPerClusterLimit) {
199 error(fmt::format("Too many cells per cluster ({}) in iteration {}, check the detector status and/or the selections. Current limit is {}", cellsPerCluster, iteration, mTrkParams[iteration].CellsPerClusterLimit));
200 break;
201 }
202
203 timeNeighbours += evaluateTask(
204 &Tracker::findCellsNeighboursHybrid, "Neighbour finding", [](std::string) {}, iteration);
205 nNeighbours += mTimeFrame->getNumberOfNeighbours();
206 timeRoads += evaluateTask(
207 &Tracker::findRoads, "Road finding", [](std::string) {}, iteration);
208 }
209 iVertex++;
210 } while (iVertex < maxNvertices);
211 logger(fmt::format(" - Hybrid tracklet finding: {} tracklets found in {:.2f} ms", nTracklets, timeTracklets));
212 logger(fmt::format(" - Hybrid cell finding: {} cells found in {:.2f} ms", nCells, timeCells));
213 logger(fmt::format(" - Hybrid neighbours finding: {} neighbours found in {:.2f} ms", nNeighbours, timeNeighbours));
214 logger(fmt::format(" - Hybrid track finding: {} tracks found in {:.2f} ms", nTracks + mTimeFrame->getNumberOfTracks(), timeRoads));
215 total += timeTracklets + timeCells + timeNeighbours + timeRoads;
216 // total += evaluateTask(&Tracker::extendTracks, "Hybrid extending tracks", logger, iteration);
217 }
218
219 // total += evaluateTask(&Tracker::findShortPrimaries, "Hybrid short primaries finding", logger);
220
221 std::stringstream sstream;
222 if constexpr (constants::DoTimeBenchmarks) {
223 sstream << std::setw(2) << " - "
224 << "Timeframe " << mTimeFrameCounter++ << " processing completed in: " << total << "ms using " << mTraits->getNThreads() << " threads.";
225 }
226 logger(sstream.str());
227
228 if (mTimeFrame->hasMCinformation()) {
229 computeTracksMClabels();
230 }
231 rectifyClusterIndices();
232 mNumberOfRuns++;
233}
234
235void Tracker::initialiseTimeFrame(int& iteration)
236{
237 mTraits->initialiseTimeFrame(iteration);
238}
239
240void Tracker::computeTracklets(int& iteration, int& iROFslice, int& iVertex)
241{
242 mTraits->computeLayerTracklets(iteration, iROFslice, iVertex);
243}
244
245void Tracker::computeCells(int& iteration)
246{
247 mTraits->computeLayerCells(iteration);
248}
249
250void Tracker::findCellsNeighbours(int& iteration)
251{
252 mTraits->findCellsNeighbours(iteration);
253}
254
255void Tracker::findRoads(int& iteration)
256{
257 mTraits->findRoads(iteration);
258}
259
260void Tracker::initialiseTimeFrameHybrid(int& iteration)
261{
262 mTraits->initialiseTimeFrameHybrid(iteration);
263}
264
265void Tracker::computeTrackletsHybrid(int& iteration, int& iROFslice, int& iVertex)
266{
267 mTraits->computeTrackletsHybrid(iteration, iROFslice, iVertex); // placeholder for the proper ROF/vertex slicing
268}
269
270void Tracker::computeCellsHybrid(int& iteration)
271{
272 mTraits->computeCellsHybrid(iteration);
273}
274
275void Tracker::findCellsNeighboursHybrid(int& iteration)
276{
277 mTraits->findCellsNeighboursHybrid(iteration);
278}
279
280void Tracker::findRoadsHybrid(int& iteration)
281{
282 mTraits->findRoadsHybrid(iteration);
283}
284
285void Tracker::findTracksHybrid(int& iteration)
286{
287 mTraits->findTracksHybrid(iteration);
288}
289
290void Tracker::findTracks()
291{
292 mTraits->findTracks();
293}
294
295void Tracker::extendTracks(int& iteration)
296{
297 mTraits->extendTracks(iteration);
298}
299
300void Tracker::findShortPrimaries()
301{
302 mTraits->findShortPrimaries();
303}
304
305void Tracker::computeRoadsMClabels()
306{
308 if (!mTimeFrame->hasMCinformation()) {
309 return;
310 }
311
312 mTimeFrame->initialiseRoadLabels();
313
314 int roadsNum{static_cast<int>(mTimeFrame->getRoads().size())};
315
316 for (int iRoad{0}; iRoad < roadsNum; ++iRoad) {
317
318 Road<5>& currentRoad{mTimeFrame->getRoads()[iRoad]};
319 std::vector<std::pair<MCCompLabel, size_t>> occurrences;
320 bool isFakeRoad{false};
321 bool isFirstRoadCell{true};
322
323 for (int iCell{0}; iCell < mTrkParams[0].CellsPerRoad(); ++iCell) {
324 const int currentCellIndex{currentRoad[iCell]};
325
326 if (currentCellIndex == constants::its::UnusedIndex) {
327 if (isFirstRoadCell) {
328 continue;
329 } else {
330 break;
331 }
332 }
333
334 const CellSeed& currentCell{mTimeFrame->getCells()[iCell][currentCellIndex]};
335
336 if (isFirstRoadCell) {
337
338 const int cl0index{mTimeFrame->getClusters()[iCell][currentCell.getFirstClusterIndex()].clusterId};
339 auto cl0labs{mTimeFrame->getClusterLabels(iCell, cl0index)};
340 bool found{false};
341 for (size_t iOcc{0}; iOcc < occurrences.size(); ++iOcc) {
342 std::pair<o2::MCCompLabel, size_t>& occurrence = occurrences[iOcc];
343 for (auto& label : cl0labs) {
344 if (label == occurrence.first) {
345 ++occurrence.second;
346 found = true;
347 // break; // uncomment to stop to the first hit
348 }
349 }
350 }
351 if (!found) {
352 for (auto& label : cl0labs) {
353 occurrences.emplace_back(label, 1);
354 }
355 }
356
357 const int cl1index{mTimeFrame->getClusters()[iCell + 1][currentCell.getSecondClusterIndex()].clusterId};
358
359 const auto& cl1labs{mTimeFrame->getClusterLabels(iCell + 1, cl1index)};
360 found = false;
361 for (size_t iOcc{0}; iOcc < occurrences.size(); ++iOcc) {
362 std::pair<o2::MCCompLabel, size_t>& occurrence = occurrences[iOcc];
363 for (auto& label : cl1labs) {
364 if (label == occurrence.first) {
365 ++occurrence.second;
366 found = true;
367 // break; // uncomment to stop to the first hit
368 }
369 }
370 }
371 if (!found) {
372 for (auto& label : cl1labs) {
373 occurrences.emplace_back(label, 1);
374 }
375 }
376
377 isFirstRoadCell = false;
378 }
379
380 const int cl2index{mTimeFrame->getClusters()[iCell + 2][currentCell.getThirdClusterIndex()].clusterId};
381 const auto& cl2labs{mTimeFrame->getClusterLabels(iCell + 2, cl2index)};
382 bool found{false};
383 for (size_t iOcc{0}; iOcc < occurrences.size(); ++iOcc) {
384 std::pair<o2::MCCompLabel, size_t>& occurrence = occurrences[iOcc];
385 for (auto& label : cl2labs) {
386 if (label == occurrence.first) {
387 ++occurrence.second;
388 found = true;
389 // break; // uncomment to stop to the first hit
390 }
391 }
392 }
393 if (!found) {
394 for (auto& label : cl2labs) {
395 occurrences.emplace_back(label, 1);
396 }
397 }
398 }
399
400 std::sort(occurrences.begin(), occurrences.end(), [](auto e1, auto e2) {
401 return e1.second > e2.second;
402 });
403
404 auto maxOccurrencesValue = occurrences[0].first;
405 mTimeFrame->setRoadLabel(iRoad, maxOccurrencesValue.getRawValue(), isFakeRoad);
406 }
407}
408
409void Tracker::computeTracksMClabels()
410{
411 for (int iROF{0}; iROF < mTimeFrame->getNrof(); ++iROF) {
412 for (auto& track : mTimeFrame->getTracks(iROF)) {
413 std::vector<std::pair<MCCompLabel, size_t>> occurrences;
414 occurrences.clear();
415
416 for (int iCluster = 0; iCluster < TrackITSExt::MaxClusters; ++iCluster) {
417 const int index = track.getClusterIndex(iCluster);
419 continue;
420 }
421 auto labels = mTimeFrame->getClusterLabels(iCluster, index);
422 bool found{false};
423 for (size_t iOcc{0}; iOcc < occurrences.size(); ++iOcc) {
424 std::pair<o2::MCCompLabel, size_t>& occurrence = occurrences[iOcc];
425 for (auto& label : labels) {
426 if (label == occurrence.first) {
427 ++occurrence.second;
428 found = true;
429 // break; // uncomment to stop to the first hit
430 }
431 }
432 }
433 if (!found) {
434 for (auto& label : labels) {
435 occurrences.emplace_back(label, 1);
436 }
437 }
438 }
439 std::sort(std::begin(occurrences), std::end(occurrences), [](auto e1, auto e2) {
440 return e1.second > e2.second;
441 });
442
443 auto maxOccurrencesValue = occurrences[0].first;
444 uint32_t pattern = track.getPattern();
445 // set fake clusters pattern
446 for (int ic{TrackITSExt::MaxClusters}; ic--;) {
447 auto clid = track.getClusterIndex(ic);
448 if (clid != constants::its::UnusedIndex) {
449 auto labelsSpan = mTimeFrame->getClusterLabels(ic, clid);
450 for (auto& currentLabel : labelsSpan) {
451 if (currentLabel == maxOccurrencesValue) {
452 pattern |= 0x1 << (16 + ic); // set bit if correct
453 break;
454 }
455 }
456 }
457 }
458 track.setPattern(pattern);
459 if (occurrences[0].second < track.getNumberOfClusters()) {
460 maxOccurrencesValue.setFakeFlag();
461 }
462 mTimeFrame->getTracksLabel(iROF).emplace_back(maxOccurrencesValue);
463 }
464 }
465}
466
467void Tracker::rectifyClusterIndices()
468{
469 for (int iROF{0}; iROF < mTimeFrame->getNrof(); ++iROF) {
470 for (auto& track : mTimeFrame->getTracks(iROF)) {
471 for (int iCluster = 0; iCluster < TrackITSExt::MaxClusters; ++iCluster) {
472 const int index = track.getClusterIndex(iCluster);
474 track.setExternalClusterIndex(iCluster, mTimeFrame->getClusterExternalIndex(iCluster, index));
475 }
476 }
477 }
478 }
479}
480
482{
484 if (tc.useMatCorrTGeo) {
486 } else if (tc.useFastMaterial) {
488 } else {
490 }
491 setNThreads(tc.nThreads);
492 int nROFsPerIterations = tc.nROFsPerIterations > 0 ? tc.nROFsPerIterations : -1;
493 if (tc.nOrbitsPerIterations > 0) {
495 }
496 for (auto& params : mTrkParams) {
497 if (params.NLayers == 7) {
498 for (int i{0}; i < 7; ++i) {
499 params.SystErrorY2[i] = tc.sysErrY2[i] > 0 ? tc.sysErrY2[i] : params.SystErrorY2[i];
500 params.SystErrorZ2[i] = tc.sysErrZ2[i] > 0 ? tc.sysErrZ2[i] : params.SystErrorZ2[i];
501 }
502 }
503 params.DeltaROF = tc.deltaRof;
504 params.DoUPCIteration = tc.doUPCIteration;
505 params.MaxChi2ClusterAttachment = tc.maxChi2ClusterAttachment > 0 ? tc.maxChi2ClusterAttachment : params.MaxChi2ClusterAttachment;
506 params.MaxChi2NDF = tc.maxChi2NDF > 0 ? tc.maxChi2NDF : params.MaxChi2NDF;
507 params.PhiBins = tc.LUTbinsPhi > 0 ? tc.LUTbinsPhi : params.PhiBins;
508 params.ZBins = tc.LUTbinsZ > 0 ? tc.LUTbinsZ : params.ZBins;
509 params.PVres = tc.pvRes > 0 ? tc.pvRes : params.PVres;
510 params.NSigmaCut *= tc.nSigmaCut > 0 ? tc.nSigmaCut : 1.f;
511 params.CellDeltaTanLambdaSigma *= tc.deltaTanLres > 0 ? tc.deltaTanLres : 1.f;
512 params.TrackletMinPt *= tc.minPt > 0 ? tc.minPt : 1.f;
513 params.nROFsPerIterations = nROFsPerIterations;
514 params.PerPrimaryVertexProcessing = tc.perPrimaryVertexProcessing;
515 params.SaveTimeBenchmarks = tc.saveTimeBenchmarks;
516 params.FataliseUponFailure = tc.fataliseUponFailure;
517 params.DropTFUponFailure = tc.dropTFUponFailure;
518 for (int iD{0}; iD < 3; ++iD) {
519 params.Diamond[iD] = tc.diamondPos[iD];
520 }
521 params.UseDiamond = tc.useDiamond;
522 if (tc.maxMemory) {
523 params.MaxMemory = tc.maxMemory;
524 }
525 if (tc.useTrackFollower > 0) {
526 params.UseTrackFollower = true;
527 // Bit 0: Allow for mixing of top&bot extension --> implies Bits 1&2 set
528 // Bit 1: Allow for top extension
529 // Bit 2: Allow for bot extension
530 params.UseTrackFollowerMix = ((tc.useTrackFollower & (1 << 0)) != 0);
531 params.UseTrackFollowerTop = ((tc.useTrackFollower & (1 << 1)) != 0);
532 params.UseTrackFollowerBot = ((tc.useTrackFollower & (1 << 2)) != 0);
533 params.TrackFollowerNSigmaCutZ = tc.trackFollowerNSigmaZ;
534 params.TrackFollowerNSigmaCutPhi = tc.trackFollowerNSigmaPhi;
535 }
536 if (tc.cellsPerClusterLimit >= 0) {
537 params.CellsPerClusterLimit = tc.cellsPerClusterLimit;
538 }
539 if (tc.trackletsPerClusterLimit >= 0) {
540 params.TrackletsPerClusterLimit = tc.trackletsPerClusterLimit;
541 }
542 if (tc.findShortTracks >= 0) {
543 params.FindShortTracks = tc.findShortTracks;
544 }
545 }
546}
547
549{
550 mTimeFrame = &tf;
551 mTraits->adoptTimeFrame(&tf);
552}
553
554void Tracker::setBz(float bz)
555{
556 mTraits->setBz(bz);
557}
558
563
565{
566 return mTraits->isMatLUT();
567}
568
570{
571 mTraits->setNThreads(n);
572}
573
575{
576 return mTraits->getNThreads();
577}
578} // namespace its
579} // namespace o2
Base track model for the Barrel, params only, w/o covariance.
int32_t i
#define GB
Definition Utils.h:40
Class to handle Kalman smoothing for ITS tracking. Its instance stores the state of the track to the ...
gsl::span< const Vertex > getPrimaryVertices(int rofId) const
Definition TimeFrame.h:355
unsigned long getArtefactsMemory()
void setRoadLabel(int i, const unsigned long long &lab, bool fake)
Definition TimeFrame.h:598
std::vector< std::vector< CellSeed > > & getCells()
Definition TimeFrame.h:648
std::vector< MCCompLabel > & getTracksLabel(const int rofId)
Definition TimeFrame.h:170
bool hasMCinformation() const
Definition TimeFrame.h:565
std::vector< std::vector< Cluster > > & getClusters()
Definition TimeFrame.h:638
void initialiseRoadLabels()
Definition TimeFrame.h:592
std::vector< Road< 5 > > & getRoads()
Definition TimeFrame.h:658
size_t getNumberOfTracks() const
Definition TimeFrame.h:723
bool checkMemory(unsigned long max)
Definition TimeFrame.h:183
int getNrof() const
Definition TimeFrame.h:395
int getNumberOfNeighbours() const
Definition TimeFrame.h:714
int getClusterExternalIndex(int layerId, const int clId) const
Definition TimeFrame.h:524
const gsl::span< const MCCompLabel > getClusterLabels(int layerId, const Cluster &cl) const
Definition TimeFrame.h:509
void printSliceInfo(const int, const int)
static constexpr int MaxClusters
< heavy version of TrackITS, with clusters embedded
Definition TrackITS.h:169
virtual void findRoads(const int iteration)
virtual void extendTracks(const int iteration)
virtual int getTFNumberOfCells() const
virtual void adoptTimeFrame(TimeFrame *tf)
virtual void computeLayerTracklets(const int iteration, int iROFslice, int iVertex)
virtual void setBz(float bz)
virtual void computeCellsHybrid(const int iteration)
virtual int getTFNumberOfTracklets() const
virtual void findRoadsHybrid(const int iteration)
virtual void computeTrackletsHybrid(const int iteration, int, int)
virtual void findCellsNeighbours(const int iteration)
virtual void findTracksHybrid(const int iteration)
virtual int getTFNumberOfClusters() const
virtual void findShortPrimaries()
virtual void initialiseTimeFrame(const int iteration)
virtual void initialiseTimeFrameHybrid(const int iteration)
void UpdateTrackingParameters(const std::vector< TrackingParameters > &trkPars)
virtual void findCellsNeighboursHybrid(const int iteration)
void setCorrType(const o2::base::PropagatorImpl< float >::MatCorrType type)
virtual void findTracks()
virtual void computeLayerCells(const int iteration)
void adoptTimeFrame(TimeFrame &tf)
Definition Tracker.cxx:548
void setCorrType(const o2::base::PropagatorImpl< float >::MatCorrType type)
Definition Tracker.cxx:559
std::uint32_t mTimeFrameCounter
Definition Tracker.h:77
std::vector< TrackITSExt > & getTracks()
void clustersToTracksHybrid(std::function< void(std::string s)>=[](std::string s) { std::cout<< s<< std::endl;}, std::function< void(std::string s)>=[](std::string s) { std::cerr<< s<< std::endl;})
Definition Tracker.cxx:155
bool isMatLUT() const
Definition Tracker.cxx:564
void clustersToTracks(std::function< void(std::string s)>=[](std::string s) { std::cout<< s<< std::endl;}, std::function< void(std::string s)>=[](std::string s) { std::cerr<< s<< std::endl;})
Definition Tracker.cxx:49
void getGlobalConfiguration()
Definition Tracker.cxx:481
Tracker(TrackerTraits *traits)
Definition Tracker.cxx:40
int getNThreads() const
Definition Tracker.cxx:574
void setBz(float)
Definition Tracker.cxx:554
void setNThreads(int n)
Definition Tracker.cxx:569
GLdouble n
Definition glcorearb.h:1982
GLuint index
Definition glcorearb.h:781
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLenum const GLfloat * params
Definition glcorearb.h:272
GLuint GLsizei const GLchar * label
Definition glcorearb.h:2519
constexpr int UnusedIndex
Definition Constants.h:52
constexpr float GB
Definition Constants.h:37
constexpr bool DoTimeBenchmarks
Definition Constants.h:38
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf
std::array< uint16_t, 5 > pattern