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 "Array2D.h"
19
20using namespace o2::gpu;
21using namespace o2::gpu::tpccf;
22
23void GPUTPCClusterFinder::DumpDigits(std::ostream& out)
24{
25 const auto nPositions = mPmemory->counters.nPositions;
26
27 out << "\nClusterer - Digits - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << ": " << nPositions << "\n";
28
29 out << std::hex;
30 for (size_t i = 0; i < mPmemory->counters.nPositions; i++) {
31 const auto& pos = mPpositions[i];
32 out << pos.time() << " " << pos.gpad << '\n';
33 }
34 out << std::dec;
35}
36
37void GPUTPCClusterFinder::DumpChargeMap(std::ostream& out, std::string_view title)
38{
39 out << "\nClusterer - " << title << " - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
41
42 out << std::hex;
43
46
47 for (TPCFragmentTime i = start; i < end; i++) {
48 int32_t zeros = 0;
49 for (GlobalPad j = 0; j < TPC_NUM_OF_PADS; j++) {
50 uint16_t q = map[{j, i}];
51 zeros += (q == 0);
52 if (q != 0) {
53 if (zeros > 0) {
54 out << " z" << zeros;
55 zeros = 0;
56 }
57
58 out << " q" << q;
59 }
60 }
61 if (zeros > 0) {
62 out << " z" << zeros;
63 }
64 out << '\n';
65 }
66
67 out << std::dec;
68}
69
70void GPUTPCClusterFinder::DumpPeakMap(std::ostream& out, std::string_view title)
71{
72 out << "\nClusterer - " << title << " - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
73
75
76 out << std::hex;
77
80
81 for (TPCFragmentTime i = start; i < end; i++) {
82 int32_t zeros = 0;
83
84 out << i << ":";
85 for (GlobalPad j = 0; j < TPC_NUM_OF_PADS; j++) {
86 uint8_t q = map[{j, i}];
87 zeros += (q == 0);
88 if (q != 0) {
89 if (zeros > 0) {
90 out << " z" << zeros;
91 zeros = 0;
92 }
93
94 out << " p" << int32_t{q};
95 }
96 }
97 if (zeros > 0) {
98 out << " z" << zeros;
99 }
100 out << '\n';
101 }
102
103 out << std::dec;
104}
105
106void GPUTPCClusterFinder::DumpPeaks(std::ostream& out)
107{
108 out << "\nClusterer - Peaks - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
109 for (uint32_t i = 0; i < mPmemory->counters.nPositions; i++) {
110 out << int32_t{mPisPeak[i]};
111 if ((i + 1) % 100 == 0) {
112 out << "\n";
113 }
114 }
115}
116
118{
119 const auto nPeaks = mPmemory->counters.nPeaks;
120
121 out << "\nClusterer - Compacted Peaks - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << ": " << nPeaks << "\n";
122 for (size_t i = 0; i < nPeaks; i++) {
123 const auto& pos = mPpeakPositions[i];
124 out << pos.time() << " " << int32_t{pos.pad()} << " " << int32_t{pos.row()} << "\n";
125 }
126}
127
129{
130 const auto& fragment = mPmemory->fragment;
131 const auto nPeaks = mPmemory->counters.nPeaks;
132
133 out << "\nClusterer - NoiseSuppression - Sector " << mISector << " - Fragment " << fragment.index << mISector << "\n";
134 for (uint32_t i = 0; i < nPeaks; i++) {
135 out << int32_t{mPisPeak[i]};
136 if ((i + 1) % 100 == 0) {
137 out << "\n";
138 }
139 }
140}
141
143{
144 const auto& fragment = mPmemory->fragment;
145 const auto nPeaks = mPmemory->counters.nClusters;
146
147 out << "\nClusterer - Noise Suppression Peaks Compacted - Sector " << mISector << " - Fragment " << fragment.index << ": " << nPeaks << "\n";
148 for (size_t i = 0; i < nPeaks; i++) {
149 const auto& peak = mPfilteredPeakPositions[i];
150 out << peak.time() << " " << int32_t{peak.pad()} << " " << int32_t{peak.row()} << "\n";
151 }
152}
153
155{
156 out << "\nClusterer - Clusters - Sector " << mISector << " - Fragment " << mPmemory->fragment.index << "\n";
157
158 for (int32_t i = 0; i < GPUCA_ROW_COUNT; i++) {
159 size_t N = mPclusterInRow[i];
161
162 std::vector<tpc::ClusterNative> sortedCluster;
163 sortedCluster.insert(sortedCluster.end(), row, row + N);
164 std::sort(sortedCluster.begin(), sortedCluster.end());
165
166 out << "Row: " << i << ": " << N << "\n";
167 for (const auto& cl : sortedCluster) {
168 out << std::hex << cl.timeFlagsPacked << std::dec << " " << cl.padPacked << " " << int32_t{cl.sigmaTimePacked} << " " << int32_t{cl.sigmaPadPacked} << " " << cl.qMax << " " << cl.qTot << "\n";
169 }
170 }
171}
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 ChargePos.h:26
struct o2::gpu::GPUTPCClusterFinder::Memory::counters_t counters
std::vector< int > row