16#ifndef TRACKINGITSU_INCLUDE_CACELL_H_
17#define TRACKINGITSU_INCLUDE_CACELL_H_
38template <
int NClusters>
44 GPUhd()
int getInnerLayer()
const {
return getHitLayerMask().first(); }
45 GPUhd()
int getFirstTrackletIndex()
const {
return mTracklets[0]; };
46 GPUhd()
void setFirstTrackletIndex(
int trkl) { mTracklets[0] = trkl; };
47 GPUhd()
int getSecondTrackletIndex()
const {
return mTracklets[1]; };
48 GPUhd()
void setSecondTrackletIndex(
int trkl) { mTracklets[1] = trkl; };
49 GPUhd() float getChi2()
const {
return mChi2; };
51 GPUhd()
int getLevel()
const {
return mLevel; };
54 GPUhd() auto& getTimeStamp() noexcept {
return mTime; }
55 GPUhd() const auto& getTimeStamp() const noexcept {
return mTime; }
65 :
o2::track::TrackParCovF(tpc), mChi2(chi2), mLevel(
level), mTime(
time)
68 GPUhd() auto& clustersRaw() {
return mClusters; }
69 GPUhd() const auto& clustersRaw()
const {
return mClusters; }
74 std::array<int, 2> mTracklets = constants::helpers::initArray<int, 2, constants::UnusedIndex>();
75 std::array<int, NClusters> mClusters = constants::helpers::initArray<int, NClusters, constants::UnusedIndex>();
87 :
CellSeed(
LayerMask(
innerL,
innerL + 1,
innerL + 2),
cl0,
cl1,
cl2,
trkl0,
trkl1,
tpc,
chi2,
time)
93 setHitLayerMask(hitLayerMask);
94 auto&
clusters = this->clustersRaw();
98 setFirstTrackletIndex(
trkl0);
99 setSecondTrackletIndex(
trkl1);
107 GPUhd()
int getFirstClusterIndex()
const {
return this->clustersRaw()[0]; };
108 GPUhd()
int getSecondClusterIndex()
const {
return this->clustersRaw()[1]; };
109 GPUhd()
int getThirdClusterIndex()
const {
return this->clustersRaw()[2]; };
110 GPUhd() auto& getClusters() {
return this->clustersRaw(); }
111 GPUhd() const auto& getClusters()
const {
return this->clustersRaw(); }
116 const int slot = getHitLayerMask().slot(
layer);
124template <
int NLayers>
132 :
Base(static_cast<const
o2::track::TrackParCovF&>(cs), cs.getChi2(), cs.getLevel(), cs.getTimeStamp())
134 this->setHitLayerMask(cs.getHitLayerMask());
135 this->setFirstTrackletIndex(cs.getFirstTrackletIndex());
136 this->setSecondTrackletIndex(cs.getSecondTrackletIndex());
137 auto&
clusters = this->clustersRaw();
139 const auto hitMask = cs.getHitLayerMask();
141 if (hitMask.has(
layer)) {
152 GPUhd()
int getFirstClusterIndex()
const {
return getClusterBySlot(0); }
153 GPUhd()
int getSecondClusterIndex()
const {
return getClusterBySlot(1); }
154 GPUhd()
int getThirdClusterIndex()
const {
return getClusterBySlot(2); }
155 GPUhd() auto& getClusters() {
return this->clustersRaw(); }
156 GPUhd() const auto& getClusters()
const {
return this->clustersRaw(); }
160 GPUhd()
int getClusterBySlot(
int requestedSlot)
const
163 const auto hitMask = this->getHitLayerMask();
165 if (hitMask.has(
layer)) {
166 if (slot++ == requestedSlot) {
167 return this->clustersRaw()[
layer];
CellSeed: connections of three clusters.
int int int int int trkl1
GPUhd() int getCluster(int layer) const
int int int int int const o2::track::TrackParCovF float chi2
GPUhdDefault() CellSeed()=default
int int int int int const o2::track::TrackParCovF float const TimeEstBC innerL
int int int int int const o2::track::TrackParCovF float const TimeEstBC & time
GPUhd() auto &getClusters()
GPUhd() CellSeed(int innerL
GPUhd() int getSecondClusterIndex() const
GPUhd() int getThirdClusterIndex() const
GPUhd() const auto &getClusters() const
int int int int int const o2::track::TrackParCovF & tpc
GPUhd() void setLevel(int level)
GPUhd() void setChi2(float chi2)
GPUhd() LayerMask getHitLayerMask() const
GPUhd() void setHitLayerMask(LayerMask mask)
GPUhd() int getLevel() const
GPUhd() const auto &getTimeStamp() const noexcept
GPUhd() void setSecondTrackletIndex(int trkl)
GPUhdDefault() SeedBase()=default
GPUhd() int *getLevelPtr()
GPUhd() float getChi2() const
GPUhd() auto &clustersRaw()
GPUhd() auto &getTimeStamp() noexcept
GPUhd() void setFirstTrackletIndex(int trkl)
GPUhd() int getFirstTrackletIndex() const
GPUhd() int getSecondTrackletIndex() const
GPUhd() const auto &clustersRaw() const
GPUhd() int getInnerLayer() const
GPUhdDefault() TrackSeed()=default
GPUhd() auto &getClusters()
GPUhd() int getThirdClusterIndex() const
GPUhd() const auto &getClusters() const
GPUhd() int getSecondClusterIndex() const
GPUhd() int getFirstClusterIndex() const
GPUhdDefault() TrackSeed(const TrackSeed &)=default
GPUhd() int getCluster(int layer) const
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLenum GLuint GLint GLint layer
constexpr int UnusedIndex
constexpr int ClustersPerCell
constexpr float UnsetValue
TrackParametrizationWithError< float > TrackParCovF
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Cluster > clusters