Project
Loading...
Searching...
No Matches
GPUTPCClusterFinder.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 O2_GPU_GPUTPCCLUSTERFINDER_H
16#define O2_GPU_GPUTPCCLUSTERFINDER_H
17
18#include "GPUDef.h"
19#include "GPUProcessor.h"
20#include "GPUDataTypes.h"
21#include "CfFragment.h"
22
23namespace o2
24{
25
26class MCCompLabel;
27
28namespace dataformats
29{
30template <typename TruthElement>
32template <typename TruthElement>
33class ConstMCTruthContainerView;
34} // namespace dataformats
35
36namespace tpc
37{
38struct ClusterNative;
39struct ClusterNativeAccess;
40class Digit;
41} // namespace tpc
42
43} // namespace o2
44
45namespace o2::gpu
46{
47struct GPUTPCClusterMCInterimArray;
48struct TPCPadGainCalib;
49
50struct CfChargePos;
51
53{
54 public:
55 struct Memory {
56 struct counters_t {
57 size_t nDigits = 0;
58 tpccf::SizeT nDigitsInFragment = 0; // num of digits in fragment can differ from nPositions if ZS is active
62 uint32_t maxTimeBin = 0;
63 uint32_t nPagesSubsector = 0;
66 };
67
68 struct ZSOffset {
69 uint32_t offset;
70 uint16_t endpoint;
71 uint16_t num;
72 };
73
77
78#ifndef GPUCA_GPUCODE
83
84 void* SetPointersInput(void* mem);
85 void* SetPointersOutput(void* mem);
86 void* SetPointersScratch(void* mem);
87 void* SetPointersMemory(void* mem);
88 void* SetPointersZS(void* mem);
89 void* SetPointersZSOffset(void* mem);
90
91 uint32_t getNSteps(size_t items) const;
92 void SetNMaxDigits(size_t nDigits, size_t nPages, size_t nDigitsFragment, size_t nDigitsEndpointMax);
93
94 void PrepareMC();
95 void clearMCMemory();
96#endif
97 uint8_t* mPzs = nullptr;
99 MinMaxCN* mMinMaxCN = nullptr;
100 uint8_t* mPpadIsNoisy = nullptr;
101 tpc::Digit* mPdigits = nullptr; // input digits, only set if ZS is skipped
105 uint8_t* mPisPeak = nullptr;
106 uint32_t* mPclusterPosInRow = nullptr; // store the index where the corresponding cluster is stored in a bucket.
107 // Required when MC are enabled to write the mc data to the correct position.
108 // Set to >= mNMaxClusterPerRow if cluster was discarded.
109 uint16_t* mPchargeMap = nullptr;
110 uint8_t* mPpeakMap = nullptr;
111 uint32_t* mPindexMap = nullptr;
112 uint32_t* mPclusterInRow = nullptr;
115 int32_t* mPscanBuf = nullptr;
116 Memory* mPmemory = nullptr;
117
118 GPUdi() int32_t* GetScanBuffer(int32_t iBuf) const { return mPscanBuf + iBuf * mBufSize; }
119
121 uint32_t* mPlabelsInRow = nullptr;
124
125 int32_t mISector = 0;
126 uint32_t mNMaxClusterPerRow = 0;
127 uint32_t mNMaxClusters = 0;
128 uint32_t mNMaxPages = 0;
129 size_t mNMaxDigits = 0;
132 size_t mNMaxPeaks = 0;
133 size_t mBufSize = 0;
134 uint32_t mNBufs = 0;
135
136 int16_t mMemoryId = -1;
137 int16_t mScratchId = -1;
138 int16_t mZSId = -1;
139 int16_t mZSOffsetId = -1;
140 int16_t mOutputId = -1;
141
142#ifndef GPUCA_GPUCODE
143 void DumpDigits(std::ostream& out);
144 void DumpChargeMap(std::ostream& out, std::string_view);
145 void DumpPeakMap(std::ostream& out, std::string_view);
146 void DumpPeaks(std::ostream& out);
147 void DumpPeaksCompacted(std::ostream& out);
148 void DumpSuppressedPeaks(std::ostream& out);
149 void DumpSuppressedPeaksCompacted(std::ostream& out);
150 void DumpClusters(std::ostream& out);
151#endif
152};
153
154} // namespace o2::gpu
155
156#endif
void SetMaxData(const GPUTrackingInOutPointers &io)
void SetNMaxDigits(size_t nDigits, size_t nPages, size_t nDigitsFragment, size_t nDigitsEndpointMax)
void DumpSuppressedPeaks(std::ostream &out)
GPUTPCClusterMCInterimArray * mPlabelsByRow
void DumpPeakMap(std::ostream &out, std::string_view)
o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > const * mPinputLabels
GPUdi() int32_t *GetScanBuffer(int32_t iBuf) const
void DumpChargeMap(std::ostream &out, std::string_view)
uint32_t getNSteps(size_t items) const
void DumpSuppressedPeaksCompacted(std::ostream &out)
void DumpPeaksCompacted(std::ostream &out)
tpc::ClusterNative * mPclusterByRow
o2::cpv::Digit Digit
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
struct o2::gpu::GPUTPCClusterFinder::Memory::counters_t counters