15#ifndef GPUTPCTRACKER_H
16#define GPUTPCTRACKER_H
20#if !defined(GPUCA_GPUCODE)
32struct GPUTPCClusterData;
35class GPUTPCTrackParam;
41#ifndef GPUCA_GPUCODE_DEVICE
74 return mData.ClusterData();
121 GPUhd() int32_t ISector()
const {
return mISector; }
131 GPUhd() uint32_t NHitsTotal()
const {
return mData.NumberOfHits(); }
132 GPUhd() uint32_t NMaxTracklets()
const {
return mNMaxTracklets; }
133 GPUhd() uint32_t NMaxRowHits()
const {
return mNMaxRowHits; }
134 GPUhd() uint32_t NMaxTracks()
const {
return mNMaxTracks; }
135 GPUhd() uint32_t NMaxTrackHits()
const {
return mNMaxTrackHits; }
136 GPUhd() uint32_t NMaxStartHits()
const {
return mNMaxStartHits; }
137 GPUhd() uint32_t NMaxRowStartHits()
const {
return mNMaxRowStartHits; }
165 GPUdi() static int32_t CalculateHitWeight(int32_t NHits,
float chi2)
167 const float chi2_suppress = 6.f;
168 float weight = (((float)NHits * (chi2_suppress -
chi2 / 500.f)) * (1e9f / chi2_suppress / 160.f));
169 if (weight < 0.f || weight > 2e9f) {
179 GPUhd() GPUglobalref()
GPUAtomic(uint32_t) * NTracklets()
const {
return &mCommonMem->nTracklets; }
180 GPUhd() GPUglobalref()
GPUAtomic(uint32_t) * NRowHits()
const {
return &mCommonMem->nRowHits; }
181 GPUhd() GPUglobalref()
GPUAtomic(uint32_t) * NStartHits()
const {
return &mCommonMem->nStartHits; }
186 GPUhd() GPUglobalref()
GPUTPCHitId* TrackletTmpStartHits()
const {
return mTrackletTmpStartHits; }
189 GPUhd() GPUglobalref()
calink* TrackletRowHits()
const {
return mTrackletRowHits; }
191 GPUhd() GPUglobalref()
GPUAtomic(uint32_t) * NTracks()
const {
return &mCommonMem->nTracks; }
193 GPUhd() GPUglobalref()
GPUAtomic(uint32_t) * NTrackHits()
const {
return &mCommonMem->nTrackHits; }
196 GPUhd() GPUglobalref()
GPUTPCRow* TrackingDataRows()
const {
return (mData.Rows()); }
197 GPUhd() GPUglobalref() int32_t* RowStartHitCountOffset()
const {
return (mRowStartHitCountOffset); }
206#ifdef GPUCA_TRACKLET_CONSTRUCTOR_DO_PROFILE
207 char* mStageAtSync =
nullptr;
214 char* mLinkTmpMemory =
nullptr;
216 int32_t mISector = -1;
220 uint32_t mNMaxStartHits = 0;
221 uint32_t mNMaxRowStartHits = 0;
222 uint32_t mNMaxTracklets = 0;
223 uint32_t mNMaxRowHits = 0;
224 uint32_t mNMaxTracks = 0;
225 uint32_t mNMaxTrackHits = 0;
226 uint16_t mMemoryResLinks = (uint16_t)-1;
227 uint16_t mMemoryResScratch = (uint16_t)-1;
228 uint16_t mMemoryResScratchHost = (uint16_t)-1;
229 uint16_t mMemoryResCommon = (uint16_t)-1;
230 uint16_t mMemoryResTracklets = (uint16_t)-1;
231 uint16_t mMemoryResOutput = (uint16_t)-1;
232 uint16_t mMemoryResSectorScratch = (uint16_t)-1;
235 GPUglobalref() int32_t* mRowStartHitCountOffset =
nullptr;
247 static int32_t StarthitSortComparison(
const void*
a,
const void*
b);
GPUconstantref() const GPUConstantMem *mConstantMem
GPUd() GPUconstantref() const GPUConstantMem *GetConstantMem() const
GPUhd() uint32_t NMaxRowHits() const
GPUhd() GPUglobalref() int32_t *RowStartHitCountOffset() const
GPUd() void SetHitWeight(const GPUTPCRow &row
GPUd() calink HitLinkDownData(const GPUTPCRow &row
GPUhd() GPUglobalref() GPUAtomic(uint32_t) *NStartHits() const
GPUhdni() GPUglobalref() commonMemoryStruct *CommonMemory() const
void * SetPointersScratchHost(void *mem)
GPUhd() uint32_t NMaxTrackHits() const
int16_t MemoryResTracklets() const
GPUd() int32_t HitWeight(const GPUTPCRow &row
void * SetPointersDataWeights(void *mem)
void InitializeProcessor()
char int32_t const GPUTPCTrackParam float float & ErrY2
GPUhd() GPUglobalref() const GPUTPCHitId &TrackletStartHit(int32_t i) const
void * SetPointersDataRows(void *mem)
void * SetPointersOutput(void *mem)
GPUhd() GPUglobalref() GPUTPCTrack *Tracks() const
int16_t MemoryResLinks() const
GPUhd() uint32_t NMaxTracks() const
void SetMaxData(const GPUTrackingInOutPointers &io)
GPUhd() GPUglobalref() GPUTPCHitId *TrackletStartHits()
void * SetPointersDataLinks(void *mem)
int16_t MemoryResOutput() const
GPUd() void SetHitLinkDownData(const GPUTPCRow &row
GPUhd() GPUglobalref() const GPUTPCRow &Row(int32_t rowIndex) const
void * SetPointersDataScratch(void *mem)
void DumpTrackHits(std::ostream &out)
GPUhd() GPUglobalref() GPUAtomic(uint32_t) *NTracklets() const
GPUTPCTracker(const GPUTPCTracker &)=delete
GPUd() GPUglobalref() const cahit2 *HitData(const GPUTPCRow &row) const
GPUhd() GPUglobalref() GPUTPCHitId *TrackletTmpStartHits() const
GPUd() GPUglobalref() const calink *HitLinkUpData(const GPUTPCRow &row) const
GPUd() cahit2 HitData(const GPUTPCRow &row
GPUhd() GPUglobalref() const GPUTPCTracklet &Tracklet(int32_t i) const
GPUhdi() const GPUTPCRow &Row(const GPUTPCHitId &HitId) const
int16_t MemoryResSectorScratch() const
void InitializeRows(const GPUParam *param)
GPUd() cahit HitDataZ(const GPUTPCRow &row
GPUhd() GPUglobalref() GPUAtomic(uint32_t) *NTrackHits() const
GPUhdi() GPUconstantref() GPUTPCTrackingData &Data()
void DumpLinks(std::ostream &out, int32_t phase)
void DumpStartHits(std::ostream &out)
GPUhd() uint32_t NMaxStartHits() const
GPUhd() GPUglobalref() GPUTPCTracklet *Tracklets() const
int16_t MemoryResScratchHost() const
GPUhdi() GPUglobalref() const GPUTPCClusterData *ClusterData() const
GPUd() void SetHitLinkUpData(const GPUTPCRow &row
GPUhd() uint32_t NMaxRowStartHits() const
GPUdi() void GetErrors2Seeding(int32_t iRow
GPUhd() GPUglobalref() GPUTPCHitId *TrackHits() const
GPUhd() GPUglobalref() const GPUTPCHitId *TrackletStartHits() const
GPUhd() uint32_t NHitsTotal() const
GPUhd() GPUglobalref() GPUAtomic(uint32_t) *NRowHits() const
void DumpHitWeights(std::ostream &out)
void * SetPointersCommon(void *mem)
GPUhd() GPUglobalref() GPUAtomic(uint32_t) *NTracks() const
int16_t MemoryResCommon() const
void RegisterMemoryAllocation()
GPUTPCTracker & operator=(const GPUTPCTracker &)=delete
GPUd() GPUglobalref() const calink *FirstHitInBin(const GPUTPCRow &row) const
char int32_t const GPUTPCTrackParam float float float & ErrZ2
int32_t CheckEmptySector()
char int32_t const GPUTPCTrackParam float time
void * SetPointersTracklets(void *mem)
char int32_t const GPUTPCTrackParam & t
GPUhd() int32_t ISector() const
GPUhd() GPUglobalref() calink *TrackletRowHits() const
GPUhd() GPUconstantref() const GPUTPCTrackingData &Data() const
GPUhd() uint32_t NMaxTracklets() const
GPUhd() int32_t HitInputID(const GPUTPCRow &row
void * SetPointersScratch(void *mem)
void DumpTrackingData(std::ostream &out)
void DumpTrackletHits(std::ostream &out)
GPUd() cahit HitDataY(const GPUTPCRow &row
GPUhd() GPUglobalref() GPUTPCRow *TrackingDataRows() const
void SetSector(int32_t iSector)
const GPUTPCTrackParam float float float &ErrZ2 const
GPUd() GPUglobalref() const calink *HitLinkDownData(const GPUTPCRow &row) const
GPUd() void MaximizeHitWeight(const GPUTPCRow &row
void InitializeRows(const GPUParam &p)
GLuint GLuint GLfloat weight
GLboolean GLboolean GLboolean b
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLboolean GLboolean GLboolean GLboolean a
GLdouble GLdouble GLdouble z
GPUAtomic(uint32_t) nTrackHits=0
GPUAtomic(uint32_t) nRowHits=0
GPUAtomic(uint32_t) nTracks=0
GPUAtomic(uint32_t) nStartHits=0
GPUAtomic(uint32_t) nTracklets=0