Project
Loading...
Searching...
No Matches
TrackingPrimitives.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
12#ifndef ALICEO2_ITSMFT_TRACKING_TRACKINGPRIMITIVES_H_
13#define ALICEO2_ITSMFT_TRACKING_TRACKINGPRIMITIVES_H_
14
16#include "GPUCommonDef.h"
19
20#include <type_traits>
21
23{
24
25// Per-iteration connection between two sorted measurement locators.
26struct Tracklet {
27 GPUhdDefault() Tracklet() = default;
28 GPUhd() Tracklet(int first, int second, float tanL, float azimuth, const o2::its::TimeEstBC& time)
30 {
31 }
32
33 GPUhd() bool operator<(const Tracklet& other) const noexcept
34 {
35 return firstClusterIndex != other.firstClusterIndex ? firstClusterIndex < other.firstClusterIndex
36 : secondClusterIndex < other.secondClusterIndex;
37 }
38 GPUhd() bool operator==(const Tracklet& other) const noexcept
39 {
40 return firstClusterIndex == other.firstClusterIndex && secondClusterIndex == other.secondClusterIndex;
41 }
42 GPUhd() bool isCompatible(const Tracklet& other) const { return mTime.isCompatible(other.mTime); }
43 GPUhd() auto& getTimeStamp() noexcept { return mTime; }
44 GPUhd() const auto& getTimeStamp() const noexcept { return mTime; }
45
46 int firstClusterIndex{o2::its::constants::UnusedIndex};
48 float tanLambda{o2::its::constants::UnsetValue}; // Directed first-to-second deltaZ / transverse chord.
51};
52
53static_assert(std::is_trivially_copyable_v<Tracklet>);
54
55} // namespace o2::itsmft::tracking
56
57#endif // ALICEO2_ITSMFT_TRACKING_TRACKINGPRIMITIVES_H_
GLint first
Definition glcorearb.h:399
constexpr int UnusedIndex
Definition Constants.h:32
constexpr float UnsetValue
Definition Constants.h:33
uint32_t trackClusterIndicesSize noexcept
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
int float float const o2::its::TimeEstBC & time
int float float const o2::its::TimeEstBC phi
GPUhdDefault() Tracklet()=default
int float float const o2::its::TimeEstBC secondClusterIndex
GPUhd() Tracklet(int first
int float float const o2::its::TimeEstBC mTime
int float float const o2::its::TimeEstBC tanLambda
VectorOfTObjectPtrs other