Project
Loading...
Searching...
No Matches
GPUTPCTrack.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
14
15#ifndef GPUTPCTRACK_H
16#define GPUTPCTRACK_H
17
19#include "GPUTPCDef.h"
21
22namespace o2::gpu
23{
32{
33 public:
34#if !defined(GPUCA_GPUCODE)
35 GPUTPCTrack() : mFirstHitID(0), mNHits(0), mLocalTrackId(-1), mParam()
36 {
37 }
38 ~GPUTPCTrack() = default;
39#endif
40
41 GPUhd() int32_t NHits() const { return mNHits; }
42 GPUhd() int32_t LocalTrackId() const { return mLocalTrackId; }
43 GPUhd() int32_t FirstHitID() const { return mFirstHitID; }
44 GPUhd() const GPUTPCBaseTrackParam& Param() const { return mParam; }
45
46 GPUhd() void SetNHits(int32_t v) { mNHits = v; }
47 GPUhd() void SetLocalTrackId(int32_t v) { mLocalTrackId = v; }
48 GPUhd() void SetFirstHitID(int32_t v) { mFirstHitID = v; }
49
50 GPUhd() void SetParam(const GPUTPCBaseTrackParam& v) { mParam = v; }
51
52 // Only if used as replacement for SectorOutTrack
53 GPUhd() static int32_t GetSize(int32_t nClust) { return sizeof(GPUTPCTrack) + nClust * sizeof(GPUTPCSectorOutCluster); }
54 GPUhd() const GPUTPCTrack* GetNextTrack() const { return (const GPUTPCTrack*)(((char*)this) + GetSize(mNHits)); }
55 GPUhd() GPUTPCTrack* NextTrack() { return (GPUTPCTrack*)(((char*)this) + GetSize(mNHits)); }
56 GPUhd() void SetOutTrackCluster(int32_t i, const GPUTPCSectorOutCluster& v) { ((GPUTPCSectorOutCluster*)((char*)this + sizeof(*this)))[i] = v; }
57 GPUhd() const GPUTPCSectorOutCluster* OutTrackClusters() const { return (const GPUTPCSectorOutCluster*)((char*)this + sizeof(*this)); }
58 GPUhd() const GPUTPCSectorOutCluster& OutTrackCluster(int32_t i) const { return OutTrackClusters()[i]; }
59
60 private:
61 int32_t mFirstHitID; // index of the first track cell in the track->cell pointer array
62 int32_t mNHits; // number of track cells
63 int32_t mLocalTrackId; // Id of local track this extrapolated track belongs to, index of this track itself if it is a local track
64 GPUTPCBaseTrackParam mParam; // track parameters
65
66 private:
67};
68} // namespace o2::gpu
69
70#endif // GPUTPCTRACK_H
int32_t i
GPUhd() int32_t NHits() const
GPUCA_GPUCODE.
Definition GPUTPCTrack.h:41
GPUhd() static int32_t GetSize(int32_t nClust)
Definition GPUTPCTrack.h:53
GPUhd() void SetOutTrackCluster(int32_t i
GPUhd() const GPUTPCBaseTrackParam &Param() const
Definition GPUTPCTrack.h:44
GPUhd() void SetNHits(int32_t v)
Definition GPUTPCTrack.h:46
GPUhd() void SetParam(const GPUTPCBaseTrackParam &v)
Definition GPUTPCTrack.h:50
const GPUTPCSectorOutCluster & v
Definition GPUTPCTrack.h:56
GPUhd() const GPUTPCSectorOutCluster *OutTrackClusters() const
Definition GPUTPCTrack.h:57
GPUhd() GPUTPCTrack *NextTrack()
Definition GPUTPCTrack.h:55
GPUhd() int32_t LocalTrackId() const
Definition GPUTPCTrack.h:42
GPUhd() void SetLocalTrackId(int32_t v)
Definition GPUTPCTrack.h:47
GPUhd() int32_t FirstHitID() const
Definition GPUTPCTrack.h:43
GPUhd() const GPUTPCTrack *GetNextTrack() const
Definition GPUTPCTrack.h:54
GPUhd() void SetFirstHitID(int32_t v)
Definition GPUTPCTrack.h:48
GPUhd() const GPUTPCSectorOutCluster &OutTrackCluster(int32_t i) const
Definition GPUTPCTrack.h:58
const GLdouble * v
Definition glcorearb.h:832
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)