15#ifndef ALICEO2_DATAFORMATSTPC_CLUSTERNATIVE_H
16#define ALICEO2_DATAFORMATSTPC_CLUSTERNATIVE_H
17#ifndef GPUCA_GPUCODE_DEVICE
32class ConstMCTruthContainer;
34class ConstMCTruthContainerView;
68 static
GPUglobalconstexpr()
int maxSaturatedQtot = (USHRT_MAX - maxRegularQtot) * scaleSaturatedQtot;
84 GPUd()
ClusterNative(
uint32_t time,
uint8_t flags,
uint16_t pad,
uint8_t sigmaTime,
uint8_t sigmaPad,
uint16_t qmax,
uint16_t qtotPacked) :
padPacked(
pad),
sigmaTimePacked(
sigmaTime),
sigmaPadPacked(
sigmaPad),
qMax(
qmax),
qTotPacked(
qtotPacked)
126 GPUd() float getSigmaTime()
const
128 if (isSaturated()) [[unlikely]] {
156 if (qtot < maxSaturatedQtot) {
157 this->
qTotPacked = ((qtot + scaleSaturatedQtot / 2) / scaleSaturatedQtot) + maxRegularQtot;
178 if (this->getTimePacked() != rhs.getTimePacked()) {
179 return (this->getTimePacked() < rhs.getTimePacked());
180 }
else if (this->
padPacked != rhs.padPacked) {
181 return (this->
padPacked < rhs.padPacked);
186 }
else if (this->
qMax != rhs.qMax) {
187 return (this->
qMax < rhs.qMax);
188 }
else if (this->
qTotPacked != rhs.qTotPacked) {
189 return (this->getQtot() < rhs.getQtot());
191 return (this->getFlags() < rhs.getFlags());
197 return this->getTimePacked() == rhs.getTimePacked() &&
201 this->
qMax == rhs.qMax &&
203 this->getFlags() == rhs.getFlags();
235 return (32u + mantissa) << exponent;
239 return 512u + 16u * ((
uint32_t)code - 160u);
243 return 1552u + 32u * ((
uint32_t)code - 224u);
246 return 2048u + 400u * ((
uint32_t)code - 240u);
252 if (
value >= decodeTailLength(255)) [[unlikely]] {
261 uint8_t mid = lo + ((hi - lo) >> 1);
262 uint32_t decoded = decodeTailLength(mid);
264 if (decoded <
value) {
272 if (lo == 0) [[unlikely]] {
279 uint32_t above_value = decodeTailLength(above_code);
280 uint32_t below_value = decodeTailLength(below_code);
286 if (below_error <= above_error) {
300 unsigned int nClusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW];
302 unsigned int clusterOffset[constants::MAXSECTOR][constants::MAXGLOBALPADROW];
317 for (
unsigned int i = 0;
i < constants::MAXSECTOR;
i++) {
319 for (
unsigned int j = 0;
j < constants::MAXGLOBALPADROW;
j++) {
unsigned short int uint16_t
GLsizei const GLfloat * value
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::string getTime(uint64_t ts)
unsigned int nClusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW]
unsigned int nClustersSector[constants::MAXSECTOR]
const o2::dataformats::ConstMCTruthContainerView< o2::MCCompLabel > * clustersMCTruth
std::pair< ConstMCLabelContainer, ConstMCLabelContainerView > ConstMCLabelContainerViewWithBuffer
unsigned int nClustersTotal
const ClusterNative * clusters[constants::MAXSECTOR][constants::MAXGLOBALPADROW]
unsigned int clusterOffset[constants::MAXSECTOR][constants::MAXGLOBALPADROW]
const ClusterNative * clustersLinear
uint8_t uint16_t uint8_t uint8_t uint16_t uint16_t qtotPacked
GPUd() bool operator<(const ClusterNative &rhs) const
GPUd() static float unpackTime(uint32_t time)
uint8_t uint16_t uint8_t sigmaTime
uint8_t uint16_t uint8_t uint8_t uint16_t qmax
GPUd() uint32_t getTimePacked() const
GPUd() void setFlags(uint8_t flags)
GPUd() uint16_t getQmax() const
GPUd() uint8_t getFlags() const
GPUd() float getSigmaTime() const
GPUdDefault() ClusterNative()=default
GPUd() float getTime() const
GPUd() uint32_t getSaturatedTailLength() const
GPUd() static float unpackPad(uint16_t pad)
GPUd() void setTime(float time)
GPUd() void setTimeFlags(float time
GPUd() static uint16_t packPad(float pad)
GPUd() uint32_t getQtot() const
uint8_t uint16_t uint8_t uint8_t sigmaPad
static GPUglobalconstexpr() int scaleTimePacked
GPUd() void setSigmaPad(float sigmaPad)
GPUd() void setSaturatedTailLength(uint32_t tail)
GPUd() uint32_t getSaturatedQtot() const
GPUd() float getPad() const
GPUd() void setPad(float pad)
GPUd() void setTimePacked(uint32_t timePacked)
GPUd() void setSaturatedQtot(uint32_t qtot)
GPUd() static uint32_t packTime(float time)
GPUd() void setTimePackedFlags(uint32_t timePacked
GPUd() bool isSaturated() const
GPUd() float getSigmaPad() const
GPUd() void setSigmaTime(float sigmaTime)