Project
Loading...
Searching...
No Matches
GPUTPCTrackingData.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 GPUTPCSECTORDATA_H
16#define GPUTPCSECTORDATA_H
17
18#include "GPUTPCDef.h"
19#include "GPUTPCRow.h"
20#include "GPUCommonMath.h"
21#include "GPUParam.h"
22#include "GPUProcessor.h"
23
24namespace o2::gpu
25{
26struct GPUTPCClusterData;
27class GPUTPCHit;
28
30{
31 public:
32 GPUTPCTrackingData() = default;
33
34#ifndef GPUCA_GPUCODE_DEVICE
36 void InitializeRows(const GPUParam& p);
37 void SetMaxData();
38 void SetClusterData(int32_t nClusters, int32_t clusterIdOffset);
39 void* SetPointersScratch(void* mem, bool idsOnGPU);
40 void* SetPointersLinks(void* mem);
41 void* SetPointersWeights(void* mem);
42 void* SetPointersClusterIds(void* mem, bool idsOnGPU);
43 void* SetPointersRows(void* mem);
44#endif
45
47
51 GPUhd() int32_t NumberOfHits() const { return mNumberOfHits; }
52 GPUhd() int32_t NumberOfHitsPlusAlign() const { return mNumberOfHitsPlusAlign; }
53 GPUhd() int32_t ClusterIdOffset() const { return mClusterIdOffset; }
54
62
63 GPUhdi() GPUglobalref() const cahit2* HitData(const GPUTPCRow& row) const { return &mHitData[row.mHitNumberOffset]; }
64 GPUhdi() GPUglobalref() cahit2* HitData(const GPUTPCRow& row) { return &mHitData[row.mHitNumberOffset]; }
65 GPUhd() GPUglobalref() const cahit2* HitData() const { return (mHitData); }
66 GPUdi() GPUglobalref() const calink* HitLinkUpData(const GPUTPCRow& row) const { return &mLinkUpData[row.mHitNumberOffset]; }
67 GPUdi() GPUglobalref() calink* HitLinkUpData(const GPUTPCRow& row) { return &mLinkUpData[row.mHitNumberOffset]; }
68 GPUdi() GPUglobalref() const calink* HitLinkDownData(const GPUTPCRow& row) const { return &mLinkDownData[row.mHitNumberOffset]; }
69 GPUdi() GPUglobalref() const calink* FirstHitInBin(const GPUTPCRow& row) const { return &mFirstHitInBin[row.mFirstHitInBinOffset]; }
70
72 GPUd() void SetHitLinkDownData(const GPUTPCRow& row, const calink& hitIndex, const calink& value);
73
80
87 GPUd() calink FirstHitInBin(const GPUTPCRow& row, calink binIndex) const;
88
92 GPUd() void MaximizeHitWeight(const GPUTPCRow& row, uint32_t hitIndex, uint32_t weight);
94
99
104 GPUd() GPUglobalref() const int32_t* ClusterDataIndex() const { return mClusterDataIndex; }
105 GPUd() GPUglobalref() int32_t* ClusterDataIndex() { return mClusterDataIndex; }
106
110 GPUhdi() GPUglobalref() const GPUTPCRow& Row(int32_t rowIndex) const { return mRows[rowIndex]; }
111 GPUhdi() GPUglobalref() GPUTPCRow* Rows() const { return mRows; }
112
113 GPUhdi() GPUglobalref() GPUAtomic(uint32_t) * HitWeights() { return (mHitWeights); }
114
115 private:
116#ifndef GPUCA_GPUCODE
117 GPUTPCTrackingData& operator=(const GPUTPCTrackingData&) = delete; // ROOT 5 tries to use this if it is not private
118 GPUTPCTrackingData(const GPUTPCTrackingData&) = delete; //
119#endif
120 GPUd() void CreateGrid(GPUconstantref() const GPUConstantMem* mem, GPUTPCRow* GPUrestrict() row, float yMin, float yMax, float zMin, float zMax);
121 GPUd() void SetRowGridEmpty(GPUTPCRow& GPUrestrict() row);
122 GPUd() static void GetMaxNBins(GPUconstantref() const GPUConstantMem* mem, GPUTPCRow* GPUrestrict() row, int32_t& maxY, int32_t& maxZ);
123 GPUd() uint32_t GetGridSize(uint32_t nHits, uint32_t nRows);
124
127
128 int32_t mNumberOfHits = 0; // the number of hits in this sector
129 int32_t mNumberOfHitsPlusAlign = 0;
130 int32_t mClusterIdOffset = 0;
131
132 GPUglobalref() GPUTPCRow* mRows = nullptr; // The row objects needed for most accessor functions
133
134 GPUglobalref() calink* mLinkUpData = nullptr; // hit index in the row above which is linked to the given (global) hit index
135 GPUglobalref() calink* mLinkDownData = nullptr; // hit index in the row below which is linked to the given (global) hit index
136 GPUglobalref() cahit2* mHitData = nullptr; // packed y,z coordinate of the given (global) hit index
137 GPUglobalref() int32_t* mClusterDataIndex = nullptr; // see ClusterDataIndex()
138
139 /*
140 * The size of the array is row.Grid.N + row.Grid.Ny + 3. The row.Grid.Ny + 3 is an optimization
141 * to remove the need for bounds checking. The last values are the same as the entry at [N - 1].
142 */
143 GPUglobalref() calink* mFirstHitInBin; // see FirstHitInBin
144 GPUglobalref() GPUAtomic(uint32_t) * mHitWeights; // the weight of the longest tracklet crossed the cluster
145};
146
147GPUdi() calink GPUTPCTrackingData::HitLinkUpData(const GPUTPCRow& row, const calink& hitIndex) const { return mLinkUpData[row.mHitNumberOffset + hitIndex]; }
148
149GPUdi() calink GPUTPCTrackingData::HitLinkDownData(const GPUTPCRow& row, const calink& hitIndex) const { return mLinkDownData[row.mHitNumberOffset + hitIndex]; }
150
151GPUdi() void GPUTPCTrackingData::SetHitLinkUpData(const GPUTPCRow& row, const calink& hitIndex, const calink& value)
152{
153 mLinkUpData[row.mHitNumberOffset + hitIndex] = value;
154}
155
156GPUdi() void GPUTPCTrackingData::SetHitLinkDownData(const GPUTPCRow& row, const calink& hitIndex, const calink& value)
157{
158 mLinkDownData[row.mHitNumberOffset + hitIndex] = value;
159}
160
161GPUdi() cahit GPUTPCTrackingData::HitDataY(const GPUTPCRow& row, const uint32_t& hitIndex) const { return mHitData[row.mHitNumberOffset + hitIndex].x; }
162
163GPUdi() cahit GPUTPCTrackingData::HitDataZ(const GPUTPCRow& row, const uint32_t& hitIndex) const { return mHitData[row.mHitNumberOffset + hitIndex].y; }
164
165GPUdi() cahit2 GPUTPCTrackingData::HitData(const GPUTPCRow& row, const uint32_t& hitIndex) const { return mHitData[row.mHitNumberOffset + hitIndex]; }
166
167GPUdi() calink GPUTPCTrackingData::FirstHitInBin(const GPUTPCRow& row, calink binIndex) const { return mFirstHitInBin[row.mFirstHitInBinOffset + binIndex]; }
168
169GPUhdi() int32_t GPUTPCTrackingData::ClusterDataIndex(const GPUTPCRow& row, uint32_t hitIndex) const { return mClusterDataIndex[row.mHitNumberOffset + hitIndex]; }
170
171GPUdi() void GPUTPCTrackingData::MaximizeHitWeight(const GPUTPCRow& row, uint32_t hitIndex, uint32_t weight)
172{
173 CAMath::AtomicMax(&mHitWeights[row.mHitNumberOffset + hitIndex], weight);
174}
175
177{
178 mHitWeights[row.mHitNumberOffset + hitIndex] = weight;
179}
180
181GPUdi() int32_t GPUTPCTrackingData::HitWeight(const GPUTPCRow& row, uint32_t hitIndex) const { return mHitWeights[row.mHitNumberOffset + hitIndex]; }
182} // namespace o2::gpu
183
184#endif // GPUTPCSECTORDATA_H
unsigned int uint32_t
#define GPUAtomic(type)
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
int nClusters
GPUhd() int32_t NumberOfHits() const
GPUdi() GPUglobalref() calink *HitLinkUpData(const GPUTPCRow &row)
GPUd() void SetHitLinkUpData(const GPUTPCRow &row
GPUhd() int32_t ClusterIdOffset() const
const calink &hitIndex const
int32_t int32_t int32_t iThread
GPUdi() GPUglobalref() const calink *FirstHitInBin(const GPUTPCRow &row) const
int32_t int32_t int32_t int32_t iSector
GPUd() GPUglobalref() int32_t *ClusterDataIndex()
int32_t int32_t int32_t GPUconstantref() const GPUConstantMem *mem
GPUd() int32_t InitFromClusterData(int32_t nBlocks
GPUhd() GPUglobalref() const cahit2 *HitData() const
GPUhdi() GPUglobalref() const GPUTPCRow &Row(int32_t rowIndex) const
GPUhdi() GPUglobalref() GPUAtomic(uint32_t) *HitWeights()
void SetClusterData(int32_t nClusters, int32_t clusterIdOffset)
void InitializeRows(const GPUParam &p)
GPUhdi() GPUglobalref() cahit2 *HitData(const GPUTPCRow &row)
void * SetPointersScratch(void *mem, bool idsOnGPU)
GPUdi() GPUglobalref() const calink *HitLinkUpData(const GPUTPCRow &row) const
const calink const calink & value
int32_t int32_t int32_t int32_t float * tmpMinMax
GPUhd() int32_t NumberOfHitsPlusAlign() const
GPUdi() GPUglobalref() const calink *HitLinkDownData(const GPUTPCRow &row) const
void * SetPointersClusterIds(void *mem, bool idsOnGPU)
GPUhdi() GPUglobalref() GPUTPCRow *Rows() const
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
Definition glcorearb.h:2910
GLuint GLuint GLfloat weight
Definition glcorearb.h:5477
GLsizei const GLfloat * value
Definition glcorearb.h:819
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
Definition glcorearb.h:2910
GPUdi() o2
Definition TrackTRD.h:39
uint32_t cahit
Definition GPUTPCDef.h:27
uint32_t calink
Definition GPUTPCDef.h:26
std::vector< int > row