Project
Loading...
Searching...
No Matches
GPUTPCClusterStatistics.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 GPUTPCCLUSTERSTATISTICS_H
16#define GPUTPCCLUSTERSTATISTICS_H
17
18#include "GPUTPCCompression.h"
20#include <vector>
21
22namespace o2::tpc
23{
24struct ClusterNativeAccess;
25} // namespace o2::tpc
26
27namespace o2::gpu
28{
30{
31 public:
32 static constexpr uint32_t NSECTORS = GPUCA_NSECTORS;
33 void RunStatistics(const o2::tpc::ClusterNativeAccess* clustersNative, const o2::tpc::CompressedClusters* clustersCompressed, const GPUParam& param);
34 void Finish();
35
36 protected:
37 template <class T, int32_t I = 0>
38 void FillStatistic(std::vector<int32_t>& p, const T* ptr, size_t n);
39 template <class T, class S, int32_t I = 0>
40 void FillStatisticCombined(std::vector<int32_t>& p, const T* ptr1, const S* ptr2, size_t n, int32_t max1);
41 float Analyze(std::vector<int32_t>& p, const char* name, bool count = true);
42
44 bool mDecodingError = false;
45
46 static constexpr uint32_t P_MAX_QMAX = GPUTPCCompression::P_MAX_QMAX;
47 static constexpr uint32_t P_MAX_QTOT = GPUTPCCompression::P_MAX_QTOT;
48 static constexpr uint32_t P_MAX_TIME = GPUTPCCompression::P_MAX_TIME;
49 static constexpr uint32_t P_MAX_PAD = GPUTPCCompression::P_MAX_PAD;
50 static constexpr uint32_t P_MAX_SIGMA = GPUTPCCompression::P_MAX_SIGMA;
51 static constexpr uint32_t P_MAX_FLAGS = GPUTPCCompression::P_MAX_FLAGS;
52 static constexpr uint32_t P_MAX_QPT = GPUTPCCompression::P_MAX_QPT;
53
54 std::vector<int32_t> mPqTotA = std::vector<int32_t>(P_MAX_QTOT, 0);
55 std::vector<int32_t> mPqMaxA = std::vector<int32_t>(P_MAX_QMAX, 0);
56 std::vector<int32_t> mPflagsA = std::vector<int32_t>(P_MAX_FLAGS, 0);
57 std::vector<int32_t> mProwDiffA = std::vector<int32_t>(GPUCA_ROW_COUNT, 0);
58 std::vector<int32_t> mPsectorLegDiffA = std::vector<int32_t>(GPUCA_NSECTORS * 2, 0);
59 std::vector<int32_t> mPpadResA = std::vector<int32_t>(P_MAX_PAD, 0);
60 std::vector<int32_t> mPtimeResA = std::vector<int32_t>(P_MAX_TIME, 0);
61 std::vector<int32_t> mPsigmaPadA = std::vector<int32_t>(P_MAX_SIGMA, 0);
62 std::vector<int32_t> mPsigmaTimeA = std::vector<int32_t>(P_MAX_SIGMA, 0);
63 std::vector<int32_t> mPqPtA = std::vector<int32_t>(P_MAX_QPT, 0);
64 std::vector<int32_t> mProwA = std::vector<int32_t>(GPUCA_ROW_COUNT, 0);
65 std::vector<int32_t> mPsectorA = std::vector<int32_t>(GPUCA_NSECTORS, 0);
66 std::vector<int32_t> mPtimeA = std::vector<int32_t>(P_MAX_TIME, 0);
67 std::vector<int32_t> mPpadA = std::vector<int32_t>(P_MAX_PAD, 0);
68 std::vector<int32_t> mPqTotU = std::vector<int32_t>(P_MAX_QTOT, 0);
69 std::vector<int32_t> mPqMaxU = std::vector<int32_t>(P_MAX_QMAX, 0);
70 std::vector<int32_t> mPflagsU = std::vector<int32_t>(P_MAX_FLAGS, 0);
71 std::vector<int32_t> mPpadDiffU = std::vector<int32_t>(P_MAX_PAD, 0);
72 std::vector<int32_t> mPtimeDiffU = std::vector<int32_t>(P_MAX_TIME, 0);
73 std::vector<int32_t> mPsigmaPadU = std::vector<int32_t>(P_MAX_SIGMA, 0);
74 std::vector<int32_t> mPsigmaTimeU = std::vector<int32_t>(P_MAX_SIGMA, 0);
75 std::vector<int32_t> mPnTrackClusters;
76 std::vector<int32_t> mPnSectorRowClusters;
77 std::vector<int32_t> mPsigmaU = std::vector<int32_t>(P_MAX_SIGMA * P_MAX_SIGMA, 0);
78 std::vector<int32_t> mPsigmaA = std::vector<int32_t>(P_MAX_SIGMA * P_MAX_SIGMA, 0);
79 std::vector<int32_t> mPQU = std::vector<int32_t>(P_MAX_QMAX * P_MAX_QTOT, 0);
80 std::vector<int32_t> mPQA = std::vector<int32_t>(P_MAX_QMAX * P_MAX_QTOT, 0);
81 std::vector<int32_t> mProwSectorA = std::vector<int32_t>(GPUCA_ROW_COUNT * GPUCA_NSECTORS * 2, 0);
82
83 double mEntropy = 0;
84 double mHuffman = 0;
85 size_t mNTotalClusters = 0;
86};
87} // namespace o2::gpu
88
89#endif
#define GPUCA_NSECTORS
#define GPUCA_ROW_COUNT
TBranch * ptr
float Analyze(std::vector< int32_t > &p, const char *name, bool count=true)
void FillStatisticCombined(std::vector< int32_t > &p, const T *ptr1, const S *ptr2, size_t n, int32_t max1)
void FillStatistic(std::vector< int32_t > &p, const T *ptr, size_t n)
void RunStatistics(const o2::tpc::ClusterNativeAccess *clustersNative, const o2::tpc::CompressedClusters *clustersCompressed, const GPUParam &param)
static constexpr uint32_t P_MAX_QTOT
static constexpr uint32_t P_MAX_QMAX
static constexpr uint32_t P_MAX_TIME
static constexpr uint32_t P_MAX_QPT
static constexpr uint32_t P_MAX_SIGMA
static constexpr uint32_t P_MAX_PAD
static constexpr uint32_t P_MAX_FLAGS
GLdouble n
Definition glcorearb.h:1982
GLint GLsizei count
Definition glcorearb.h:399
GLuint const GLchar * name
Definition glcorearb.h:781
GLenum GLfloat param
Definition glcorearb.h:271
Global TPC definitions and constants.
Definition SimTraits.h:167