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
57 private:
58 int32_t mFirstHitID; // index of the first track cell in the track->cell pointer array
59 int32_t mNHits; // number of track cells
60 int32_t mLocalTrackId; // Id of local track this extrapolated track belongs to, index of this track itself if it is a local track
61 GPUTPCBaseTrackParam mParam; // track parameters
62
63 private:
64};
65} // namespace o2::gpu
66
67#endif // GPUTPCTRACK_H
GPUhd() int32_t NHits() const
GPUCA_GPUCODE.
Definition GPUTPCTrack.h:41
GPUhd() static int32_t GetSize(int32_t nClust)
Definition GPUTPCTrack.h:53
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
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
const GLdouble * v
Definition glcorearb.h:832
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)