Project
Loading...
Searching...
No Matches
LineProjection.h
Go to the documentation of this file.
1// Copyright 2019-2026 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_ITS_TRACKING_LINE_PROJECTION_H_
17#define O2_ITS_TRACKING_LINE_PROJECTION_H_
18
19#include "GPUCommonDef.h"
21#include <cstdint>
22#include <vector>
23
24namespace o2::its
25{
26
27// Half-open [lo, hi) range of sorted-line slots falling inside one z-window.
28struct LineWindow {
29 int lo{0};
30 int hi{0};
31};
32
33// Per-line quality estimators carried alongside the projected line.
35 float chi2{-1.f};
36 float pt{-1.f};
37};
38
39// Host mirror of the per-peak inputs needed to recompute, off-device, which lines a vertex candidate accepted.
40// MC-only: filled just to feed the majority-vote labels.
42 std::vector<int> peakLineIdx; // per compacted peak: the sorted line slot it came from
43 std::vector<LineWindow> win; // per sorted line: [lo, hi) z-window bounds
44 std::vector<TimeEstBC> times; // per sorted line: its time interval
45 std::vector<int> sortedToLine; // sorted slot -> global line index
46
47 void clear()
48 {
49 peakLineIdx.clear();
50 win.clear();
51 times.clear();
52 sortedToLine.clear();
53 }
54};
55
56namespace gpu
57{
58
59// Spelled gpu::LineWindow at the device call sites; qualified lookup does not reach the
60// enclosing namespace, so the alias has to be declared here.
62
63// Device SoA view of the lines projected onto the beam line.
65 float* z{nullptr}; // projected z at the beamline; sort key and binary-search key, kept dense
66 o2::its::TimeEstBC* t{nullptr}; // time interval of the line
67 int* idx{nullptr}; // sorted slot -> original line index
68 int* rof{nullptr}; // ROF of the line
69};
70
71// One vertex candidate produced by the device fit, before the host emit step
72struct VertexCand {
73 float x, y, z;
74 float rms2[6];
75 float avgDist2;
76 int nGood;
77 float seed[3];
79 int size;
80 uint8_t ok; // 1 if the candidate passed the fit cuts
81 uint8_t keep; // 1 if it survived duplicate suppression (subset of ok)
82 uint8_t fine;
83};
84
85} // namespace gpu
86
87} // namespace o2::its
88
89#endif
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
std::vector< int > sortedToLine
std::vector< TimeEstBC > times
std::vector< LineWindow > win
std::vector< int > peakLineIdx
o2::its::TimeEstBC * t
o2::its::TimeEstBC time