Project
Loading...
Searching...
No Matches
GPUTPCClusterFinderDump.cxx
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#include "GPUTPCClusterFinder.h"
16#include "GPUReconstruction.h"
17#include "CfArray2D.h"
20#include "GPUSettings.h"
21
22using namespace o2::gpu;
23using namespace o2::gpu::tpccf;
24
25void GPUTPCClusterFinder::DumpDigits(std::ostream& out)
26{
27 const auto nPositions = mPmemory->counters.nPositions;
28
29 out << "\nClusterer - Digits - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << ": " << nPositions << "\n";
30
31 out << std::hex;
32 for (size_t i = 0; i < mPmemory->counters.nPositions; i++) {
33 const auto& pos = mPpositions[i];
34 out << pos.time() << " " << pos.gpad << '\n';
35 }
36 out << std::dec;
37}
38
39void GPUTPCClusterFinder::DumpChargeMap(std::ostream& out, std::string_view title)
40{
41 out << "\nClusterer - " << title << " - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
43
44 out << std::hex;
45
48
49 for (TPCFragmentTime i = start; i < end; i++) {
50 int32_t zeros = 0;
51 for (GlobalPad j = 0; j < TPC_NUM_OF_PADS; j++) {
52 uint16_t q = map[{j, i}];
53 zeros += (q == 0);
54 if (q != 0) {
55 if (zeros > 0) {
56 out << " z" << zeros;
57 zeros = 0;
58 }
59
60 out << " q" << q;
61 }
62 }
63 if (zeros > 0) {
64 out << " z" << zeros;
65 }
66 out << '\n';
67 }
68
69 out << std::dec;
70}
71
72void GPUTPCClusterFinder::DumpPeakMap(std::ostream& out, std::string_view title)
73{
74 out << "\nClusterer - " << title << " - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
75
77
78 out << std::hex;
79
82
83 for (TPCFragmentTime i = start; i < end; i++) {
84 int32_t zeros = 0;
85
86 out << i << ":";
87 for (GlobalPad j = 0; j < TPC_NUM_OF_PADS; j++) {
88 uint8_t q = map[{j, i}];
89 zeros += (q == 0);
90 if (q != 0) {
91 if (zeros > 0) {
92 out << " z" << zeros;
93 zeros = 0;
94 }
95
96 out << " p" << int32_t{q};
97 }
98 }
99 if (zeros > 0) {
100 out << " z" << zeros;
101 }
102 out << '\n';
103 }
104
105 out << std::dec;
106}
107
108void GPUTPCClusterFinder::DumpPeaks(std::ostream& out)
109{
110 out << "\nClusterer - Peaks - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
111 for (uint32_t i = 0; i < mPmemory->counters.nPositions; i++) {
112 out << int32_t{mPisPeak[i]};
113 if ((i + 1) % 100 == 0) {
114 out << "\n";
115 }
116 }
117}
118
120{
121 const auto nPeaks = mPmemory->counters.nPeaks;
122
123 out << "\nClusterer - Compacted Peaks - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << ": " << nPeaks << "\n";
124 for (size_t i = 0; i < nPeaks; i++) {
125 const auto& pos = mPpeakPositions[i];
126 out << pos.time() << " " << int32_t{pos.pad()} << " " << int32_t{pos.row()} << "\n";
127 }
128}
129
131{
132 const auto& fragment = mPmemory->fragment;
133 const auto nPeaks = mPmemory->counters.nPeaks;
134
135 out << "\nClusterer - NoiseSuppression - Sector " << mISector << " - Fragment " << fragment.index << mISector << "\n";
136 for (uint32_t i = 0; i < nPeaks; i++) {
137 out << int32_t{mPisPeak[i]};
138 if ((i + 1) % 100 == 0) {
139 out << "\n";
140 }
141 }
142}
143
145{
146 const auto& fragment = mPmemory->fragment;
147 const auto nPeaks = mPmemory->counters.nClusters;
148
149 out << "\nClusterer - Noise Suppression Peaks Compacted - Sector " << mISector << " - Fragment " << fragment.index << ": " << nPeaks << "\n";
150 for (size_t i = 0; i < nPeaks; i++) {
151 const auto& peak = mPfilteredPeakPositions[i];
152 out << peak.time() << " " << int32_t{peak.pad()} << " " << int32_t{peak.row()} << "\n";
153 }
154}
155
157{
158 out << "\nClusterer - Clusters - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
159
160 for (int32_t i = 0; i < GPUCA_ROW_COUNT; i++) {
161 size_t N = mPclusterInRow[i];
163
164 std::vector<tpc::ClusterNative> sortedCluster;
165 sortedCluster.insert(sortedCluster.end(), row, row + N);
166 std::sort(sortedCluster.begin(), sortedCluster.end());
167
168 out << "Row: " << i << ": " << N << "\n";
169 for (const auto& cl : sortedCluster) {
170 out << std::hex << cl.timeFlagsPacked << std::dec << " " << cl.padPacked << " " << int32_t{cl.sigmaTimePacked} << " " << int32_t{cl.sigmaPadPacked} << " " << cl.qMax << " " << cl.qTot << "\n";
171 }
172 }
173}
Class of a TPC cluster in TPC-native coordinates (row, time)
Definition of the TPC Digit.
int32_t i
#define GPUCA_ROW_COUNT
uint16_t pos
Definition RawData.h:3
uint32_t j
Definition RawData.h:0
GPUReconstruction * mRec
const GPUSettingsProcessing & GetProcessingSettings() const
void DumpSuppressedPeaks(std::ostream &out)
void DumpPeakMap(std::ostream &out, std::string_view)
void DumpChargeMap(std::ostream &out, std::string_view)
void DumpSuppressedPeaksCompacted(std::ostream &out)
void DumpPeaksCompacted(std::ostream &out)
tpc::ClusterNative * mPclusterByRow
#define TPC_NUM_OF_PADS
#define TPC_MAX_FRAGMENT_LEN_PADDED(size)
GLuint GLuint end
Definition glcorearb.h:469
GLuint start
Definition glcorearb.h:469
tpccf::GlobalPad gpad
Definition CfChargePos.h:26
struct o2::gpu::GPUTPCClusterFinder::Memory::counters_t counters
std::vector< int > row