forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGPUTPCClusterStatistics.h
More file actions
89 lines (78 loc) · 4.19 KB
/
Copy pathGPUTPCClusterStatistics.h
File metadata and controls
89 lines (78 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
/// \file GPUTPCClusterStatistics.h
/// \author David Rohr
#ifndef GPUTPCCLUSTERSTATISTICS_H
#define GPUTPCCLUSTERSTATISTICS_H
#include "GPUTPCCompression.h"
#include "TPCClusterDecompressor.h"
#include <vector>
namespace o2::tpc
{
struct ClusterNativeAccess;
} // namespace o2::tpc
namespace o2::gpu
{
class GPUTPCClusterStatistics
{
public:
static constexpr uint32_t NSECTORS = GPUTPCGeometry::NSECTORS;
void RunStatistics(const o2::tpc::ClusterNativeAccess* clustersNative, const o2::tpc::CompressedClusters* clustersCompressed, const GPUParam& param, bool dumpCSV);
void Finish();
protected:
template <class T, int32_t I = 0>
void FillStatistic(std::vector<int32_t>& p, const T* ptr, size_t n);
template <class T, class S, int32_t I = 0>
void FillStatisticCombined(std::vector<int32_t>& p, const T* ptr1, const S* ptr2, size_t n, int32_t max1);
float Analyze(std::vector<int32_t>& p, const char* name, bool count = true);
TPCClusterDecompressor mDecoder;
bool mDecodingError = false;
static constexpr uint32_t P_MAX_QMAX = GPUTPCCompression::P_MAX_QMAX;
static constexpr uint32_t P_MAX_QTOT = GPUTPCCompression::P_MAX_SATURATED_QTOT;
static constexpr uint32_t P_MAX_TIME = GPUTPCCompression::P_MAX_TIME;
static constexpr uint32_t P_MAX_PAD = GPUTPCCompression::P_MAX_PAD;
static constexpr uint32_t P_MAX_SIGMA = GPUTPCCompression::P_MAX_SIGMA;
static constexpr uint32_t P_MAX_FLAGS = GPUTPCCompression::P_MAX_FLAGS;
static constexpr uint32_t P_MAX_QPT = GPUTPCCompression::P_MAX_QPT;
std::vector<int32_t> mPqTotA = std::vector<int32_t>(P_MAX_QTOT, 0);
std::vector<int32_t> mPqMaxA = std::vector<int32_t>(P_MAX_QMAX, 0);
std::vector<int32_t> mPflagsA = std::vector<int32_t>(P_MAX_FLAGS, 0);
std::vector<int32_t> mProwDiffA = std::vector<int32_t>(GPUTPCGeometry::NROWS, 0);
std::vector<int32_t> mPsectorLegDiffA = std::vector<int32_t>(GPUTPCGeometry::NSECTORS * 2, 0);
std::vector<int32_t> mPpadResA = std::vector<int32_t>(P_MAX_PAD, 0);
std::vector<int32_t> mPtimeResA = std::vector<int32_t>(P_MAX_TIME, 0);
std::vector<int32_t> mPsigmaPadA = std::vector<int32_t>(P_MAX_SIGMA, 0);
std::vector<int32_t> mPsigmaTimeA = std::vector<int32_t>(P_MAX_SIGMA, 0);
std::vector<int32_t> mPqPtA = std::vector<int32_t>(P_MAX_QPT, 0);
std::vector<int32_t> mProwA = std::vector<int32_t>(GPUTPCGeometry::NROWS, 0);
std::vector<int32_t> mPsectorA = std::vector<int32_t>(GPUTPCGeometry::NSECTORS, 0);
std::vector<int32_t> mPtimeA = std::vector<int32_t>(P_MAX_TIME, 0);
std::vector<int32_t> mPpadA = std::vector<int32_t>(P_MAX_PAD, 0);
std::vector<int32_t> mPqTotU = std::vector<int32_t>(P_MAX_QTOT, 0);
std::vector<int32_t> mPqMaxU = std::vector<int32_t>(P_MAX_QMAX, 0);
std::vector<int32_t> mPflagsU = std::vector<int32_t>(P_MAX_FLAGS, 0);
std::vector<int32_t> mPpadDiffU = std::vector<int32_t>(P_MAX_PAD, 0);
std::vector<int32_t> mPtimeDiffU = std::vector<int32_t>(P_MAX_TIME, 0);
std::vector<int32_t> mPsigmaPadU = std::vector<int32_t>(P_MAX_SIGMA, 0);
std::vector<int32_t> mPsigmaTimeU = std::vector<int32_t>(P_MAX_SIGMA, 0);
std::vector<int32_t> mPnTrackClusters;
std::vector<int32_t> mPnSectorRowClusters;
std::vector<int32_t> mPsigmaU = std::vector<int32_t>(P_MAX_SIGMA * P_MAX_SIGMA, 0);
std::vector<int32_t> mPsigmaA = std::vector<int32_t>(P_MAX_SIGMA * P_MAX_SIGMA, 0);
std::vector<int32_t> mPQU = std::vector<int32_t>(P_MAX_QMAX * P_MAX_QTOT, 0);
std::vector<int32_t> mPQA = std::vector<int32_t>(P_MAX_QMAX * P_MAX_QTOT, 0);
std::vector<int32_t> mProwSectorA = std::vector<int32_t>(GPUTPCGeometry::NROWS * GPUTPCGeometry::NSECTORS * 2, 0);
double mEntropy = 0;
double mHuffman = 0;
size_t mNTotalClusters = 0;
};
} // namespace o2::gpu
#endif