Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Detectors/GlobalTrackingWorkflow/study/src/SVStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
// #include "GPUSettingsO2.h"
#include "GPUParam.h"
#include "GPUParam.inc"
#include "GPUTPCGeometry.h"
#include "GPUO2InterfaceRefit.h"
#include "GPUO2InterfaceUtils.h"

Expand Down Expand Up @@ -254,7 +255,7 @@ o2::dataformats::V0Ext SVStudySpec::processV0(int iv, o2::globaltracking::RecoCo
tpcTr.getClusterReference(clRefs, tpcTr.getNClusterReferences() - 1, clSect, clRow, clIdx);
const auto& clus = recoData.getTPCClusters().clusters[clSect][clRow][clIdx];
prInfo.lowestRow = clRow;
int npads = mParam->tpcGeometry.NPads(clRow);
int npads = o2::gpu::GPUTPCGeometry::NPads(clRow);
prInfo.padFromEdge = uint8_t(clus.getPad());
if (prInfo.padFromEdge > npads / 2) {
prInfo.padFromEdge = npads - 1 - prInfo.padFromEdge;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "GPUO2Interface.h" // Needed for propper settings in GPUParam.h
#include "GPUParam.h"
#include "GPUParam.inc"
#include "GPUTPCGeometry.h"
#include "Steer/MCKinematicsReader.h"
#include "MathUtils/fit.h"
#include <TF1.h>
Expand Down Expand Up @@ -301,7 +302,7 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
trExt.rowMinTPC = clRow;
const auto& clus = tpcClusAcc.clusters[clSect][clRow][clIdx];
trExt.padFromEdge = uint8_t(clus.getPad());
int npads = mTPCRefitter->getParam()->tpcGeometry.NPads(clRow);
int npads = o2::gpu::GPUTPCGeometry::NPads(clRow);
if (trExt.padFromEdge > npads / 2) {
trExt.padFromEdge = npads - 1 - trExt.padFromEdge;
}
Expand Down
4 changes: 2 additions & 2 deletions Detectors/TPC/workflow/src/EntropyEncoderSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ void EntropyEncoderSpec::run(ProcessingContext& pc)
int myThread = 0;
#endif
unsigned int count = 0;
const float x = mParam->tpcGeometry.Row2X(j);
const float x = GPUTPCGeometry::Row2X(j);
auto checker = [i, j, firstIR, totalT, x, this, &preCl, &count, &outBuffer = tmpBuffer[myThread], &rejectHits, &clustersFiltered](const o2::tpc::ClusterNative& cl, unsigned int k) {
const float y = mParam->tpcGeometry.LinearPad2Y(i, j, cl.getPad());
const float y = GPUTPCGeometry::LinearPad2Y(i, j, cl.getPad());
const float r = sqrtf(x * x + y * y);
const float maxz = r * mEtaFactor + mMaxZ;
const unsigned int deltaBC = std::max<float>(0.f, totalT - mFastTransform->convDeltaZtoDeltaTimeInTimeFrameAbs(maxz)) * constants::LHCBCPERTIMEBIN;
Expand Down
6 changes: 3 additions & 3 deletions GPU/GPUTracking/Base/GPUParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "GPUDataTypes.h"
#include "GPUConstantMem.h"
#include "DetectorsBase/Propagator.h"
#include "GPUTPCGeometry.h"

using namespace o2::gpu;

Expand All @@ -32,7 +33,6 @@ using namespace o2::gpu;
void GPUParam::SetDefaults(float solenoidBz)
{
memset((void*)this, 0, sizeof(*this));
new (&tpcGeometry) GPUTPCGeometry;
new (&rec) GPUSettingsRec;
occupancyMap = nullptr;
occupancyTotal = 0;
Expand Down Expand Up @@ -178,8 +178,8 @@ void GPUParam::UpdateRun3ClusterErrors(const float* yErrorParam, const float* zE
for (int32_t rowType = 0; rowType < 4; rowType++) {
constexpr int32_t regionMap[4] = {0, 4, 6, 8};
ParamErrors[yz][rowType][0] = param[0] * param[0];
ParamErrors[yz][rowType][1] = param[1] * param[1] * tpcGeometry.PadHeightByRegion(regionMap[rowType]);
ParamErrors[yz][rowType][2] = param[2] * param[2] / tpcGeometry.TPCLength() / tpcGeometry.PadHeightByRegion(regionMap[rowType]);
ParamErrors[yz][rowType][1] = param[1] * param[1] * GPUTPCGeometry::PadHeightByRegion(regionMap[rowType]);
ParamErrors[yz][rowType][2] = param[2] * param[2] / GPUTPCGeometry::TPCLength() / GPUTPCGeometry::PadHeightByRegion(regionMap[rowType]);
ParamErrors[yz][rowType][3] = param[3] * param[3] * rec.tpc.clusterErrorOccupancyScaler * rec.tpc.clusterErrorOccupancyScaler;
}
}
Expand Down
2 changes: 0 additions & 2 deletions GPU/GPUTracking/Base/GPUParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "GPUCommonMath.h"
#include "GPUDef.h"
#include "GPUSettings.h"
#include "GPUTPCGeometry.h"
#include "GPUTPCGMPolynomialField.h"

#if !defined(GPUCA_GPUCODE)
Expand Down Expand Up @@ -59,7 +58,6 @@ struct GPUParam_t {
int32_t continuousMaxTimeBin;
int32_t tpcCutTimeBin;

GPUTPCGeometry tpcGeometry; // TPC Geometry
GPUTPCGMPolynomialField polynomialField; // Polynomial approx. of magnetic field for TPC GM
const uint32_t* occupancyMap; // Ptr to TPC occupancy map
uint32_t occupancyTotal; // Total occupancy in the TPC (nCl / nHbf)
Expand Down
19 changes: 10 additions & 9 deletions GPU/GPUTracking/Base/GPUParam.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "GPUParam.h"
#include "GPUTPCGMMergedTrackHit.h"
#include "GPUTPCClusterOccupancyMap.h"
#include "GPUTPCGeometry.h"

namespace o2::gpu
{
Expand All @@ -42,14 +43,14 @@ GPUdi() void GPUParam::Global2Sector(int32_t iSector, float X, float Y, float Z,

GPUdi() void GPUParam::GetClusterErrorsSeeding2(uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
{
const int32_t rowType = tpcGeometry.GetROC(iRow);
z = CAMath::Abs(tpcGeometry.TPCLength() - CAMath::Abs(z));
const int32_t rowType = GPUTPCGeometry::GetROC(iRow);
z = CAMath::Abs(GPUTPCGeometry::TPCLength() - CAMath::Abs(z));
const float s2 = CAMath::Min(sinPhi * sinPhi, 0.95f * 0.95f);
const float sec2 = 1.f / (1.f - s2);
const float angleY2 = s2 * sec2; // dy/dx
const float angleZ2 = DzDs * DzDs * sec2; // dz/dx

const float unscaledMult = time >= 0.f ? GetUnscaledMult(time) / tpcGeometry.Row2X(iRow) : 0.f;
const float unscaledMult = time >= 0.f ? GetUnscaledMult(time) / GPUTPCGeometry::Row2X(iRow) : 0.f;

ErrY2 = GetClusterErrorSeeding(0, rowType, z, angleY2, unscaledMult); // Returns Err2
ErrZ2 = GetClusterErrorSeeding(1, rowType, z, angleZ2, unscaledMult); // Returns Err2
Expand Down Expand Up @@ -132,8 +133,8 @@ GPUdi() float GPUParam::GetClusterErrorSeeding(int32_t yz, int32_t type, float z

GPUdi() void GPUParam::GetClusterErrorsSeeding2(uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float& ErrY2, float& ErrZ2) const
{
int32_t rowType = tpcGeometry.GetROC(iRow);
z = CAMath::Abs(tpcGeometry.TPCLength() - CAMath::Abs(z));
int32_t rowType = GPUTPCGeometry::GetROC(iRow);
z = CAMath::Abs(GPUTPCGeometry::TPCLength() - CAMath::Abs(z));
const float s2 = CAMath::Min(sinPhi * sinPhi, 0.95f * 0.95f);
float sec2 = 1.f / (1.f - s2);
float angleY2 = s2 * sec2; // dy/dx
Expand Down Expand Up @@ -172,14 +173,14 @@ GPUdi() float GPUParam::GetSystematicClusterErrorC122(float trackX, float trackY

GPUdi() void GPUParam::GetClusterErrors2(uint8_t sector, int32_t iRow, float z, float sinPhi, float DzDs, float time, float avgInvCharge, float invCharge, float& ErrY2, float& ErrZ2) const
{
const int32_t rowType = tpcGeometry.GetROC(iRow);
z = CAMath::Abs(tpcGeometry.TPCLength() - CAMath::Abs(z));
const int32_t rowType = GPUTPCGeometry::GetROC(iRow);
z = CAMath::Abs(GPUTPCGeometry::TPCLength() - CAMath::Abs(z));
const float s2 = CAMath::Min(sinPhi * sinPhi, 0.95f * 0.95f);
const float sec2 = 1.f / (1.f - s2);
const float angleY2 = s2 * sec2; // dy/dx
const float angleZ2 = DzDs * DzDs * sec2; // dz/dx

const float unscaledMult = time >= 0.f ? GetUnscaledMult(time) / tpcGeometry.Row2X(iRow) : 0.f;
const float unscaledMult = time >= 0.f ? GetUnscaledMult(time) / GPUTPCGeometry::Row2X(iRow) : 0.f;
const float scaledInvAvgCharge = avgInvCharge * rec.tpc.clusterErrorChargeScaler > 0.f ? avgInvCharge * rec.tpc.clusterErrorChargeScaler : 1.f;
const float scaledInvCharge = invCharge * rec.tpc.clusterErrorChargeScaler > 0.f ? invCharge * rec.tpc.clusterErrorChargeScaler : 1.f;

Expand Down Expand Up @@ -218,7 +219,7 @@ GPUdi() float GPUParam::GetUnscaledMult(float time) const

GPUdi() bool GPUParam::rejectEdgeClusterByY(float uncorrectedY, int32_t iRow, float trackSigmaY) const
{
return CAMath::Abs(uncorrectedY) > (tpcGeometry.NPads(iRow) - 1) * 0.5f * tpcGeometry.PadWidth(iRow) + rec.tpc.rejectEdgeClustersMargin + trackSigmaY * rec.tpc.rejectEdgeClustersSigmaMargin;
return CAMath::Abs(uncorrectedY) > (GPUTPCGeometry::NPads(iRow) - 1) * 0.5f * GPUTPCGeometry::PadWidth(iRow) + rec.tpc.rejectEdgeClustersMargin + trackSigmaY * rec.tpc.rejectEdgeClustersSigmaMargin;
}

} // namespace o2::gpu
Expand Down
27 changes: 14 additions & 13 deletions GPU/GPUTracking/Base/GPUReconstructionConvert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "GPUTPCClusterData.h"
#include "GPUO2DataTypes.h"
#include "GPUDataTypes.h"
#include "GPUTPCGeometry.h"
#include "AliHLTTPCRawCluster.h"
#include "GPUParam.h"
#include "GPULogging.h"
Expand Down Expand Up @@ -275,10 +276,10 @@ struct zsEncoderRow : public zsEncoder {

inline bool zsEncoderRow::sort(const o2::tpc::Digit a, const o2::tpc::Digit b)
{
int32_t endpointa = param->tpcGeometry.GetRegion(a.getRow());
int32_t endpointb = param->tpcGeometry.GetRegion(b.getRow());
endpointa = 2 * endpointa + (a.getRow() >= param->tpcGeometry.GetRegionStart(endpointa) + param->tpcGeometry.GetRegionRows(endpointa) / 2);
endpointb = 2 * endpointb + (b.getRow() >= param->tpcGeometry.GetRegionStart(endpointb) + param->tpcGeometry.GetRegionRows(endpointb) / 2);
int32_t endpointa = GPUTPCGeometry::GetRegion(a.getRow());
int32_t endpointb = GPUTPCGeometry::GetRegion(b.getRow());
endpointa = 2 * endpointa + (a.getRow() >= GPUTPCGeometry::GetRegionStart(endpointa) + GPUTPCGeometry::GetRegionRows(endpointa) / 2);
endpointb = 2 * endpointb + (b.getRow() >= GPUTPCGeometry::GetRegionStart(endpointb) + GPUTPCGeometry::GetRegionRows(endpointb) / 2);
if (endpointa != endpointb) {
return endpointa <= endpointb;
}
Expand All @@ -295,11 +296,11 @@ bool zsEncoderRow::checkInput(std::vector<o2::tpc::Digit>& tmpBuffer, uint32_t k
{
seqLen = 1;
if (lastRow != tmpBuffer[k].getRow()) {
endpointStart = param->tpcGeometry.GetRegionStart(curRegion);
endpointStart = GPUTPCGeometry::GetRegionStart(curRegion);
endpoint = curRegion * 2;
if (tmpBuffer[k].getRow() >= endpointStart + param->tpcGeometry.GetRegionRows(curRegion) / 2) {
if (tmpBuffer[k].getRow() >= endpointStart + GPUTPCGeometry::GetRegionRows(curRegion) / 2) {
endpoint++;
endpointStart += param->tpcGeometry.GetRegionRows(curRegion) / 2;
endpointStart += GPUTPCGeometry::GetRegionRows(curRegion) / 2;
}
}
for (uint32_t l = k + 1; l < tmpBuffer.size(); l++) {
Expand Down Expand Up @@ -408,7 +409,7 @@ void zsEncoderRow::decodePage(std::vector<o2::tpc::Digit>& outputBuffer, const z
if ((uint32_t)region != decEndpoint / 2) {
throw std::runtime_error("CRU ID / endpoint mismatch");
}
int32_t nRowsRegion = param->tpcGeometry.GetRegionRows(region);
int32_t nRowsRegion = GPUTPCGeometry::GetRegionRows(region);

int32_t timeBin = (decHDR->timeOffset + (uint64_t)(o2::raw::RDHUtils::getHeartBeatOrbit(*rdh) - firstOrbit) * o2::constants::lhc::LHCMaxBunches) / LHCBCPERTIMEBIN;
for (int32_t l = 0; l < decHDR->nTimeBinSpan; l++) {
Expand All @@ -420,7 +421,7 @@ void zsEncoderRow::decodePage(std::vector<o2::tpc::Digit>& outputBuffer, const z
if (tbHdr->rowMask != 0 && ((upperRows) ^ ((decEndpoint & 1) != 0))) {
throw std::runtime_error("invalid endpoint");
}
const int32_t rowOffset = param->tpcGeometry.GetRegionStart(region) + (upperRows ? (nRowsRegion / 2) : 0);
const int32_t rowOffset = GPUTPCGeometry::GetRegionStart(region) + (upperRows ? (nRowsRegion / 2) : 0);
const int32_t nRows = upperRows ? (nRowsRegion - nRowsRegion / 2) : (nRowsRegion / 2);
const int32_t nRowsUsed = __builtin_popcount((uint32_t)(tbHdr->rowMask & 0x7FFF));
decPagePtr += nRowsUsed ? (2 * nRowsUsed) : 2;
Expand Down Expand Up @@ -513,7 +514,7 @@ void zsEncoderLinkBased::createBitmask(std::vector<o2::tpc::Digit>& tmpBuffer, u
uint32_t l;
for (l = k; l < tmpBuffer.size(); l++) {
const auto& a = tmpBuffer[l];
int32_t cruinsector = param->tpcGeometry.GetRegion(a.getRow());
int32_t cruinsector = GPUTPCGeometry::GetRegion(a.getRow());
o2::tpc::GlobalPadNumber pad = mapper.globalPadNumber(o2::tpc::PadPos(a.getRow(), a.getPad()));
o2::tpc::FECInfo fec = mapper.fecInfo(pad);
o2::tpc::CRU cru = cruinsector;
Expand All @@ -535,8 +536,8 @@ void zsEncoderLinkBased::createBitmask(std::vector<o2::tpc::Digit>& tmpBuffer, u
bool zsEncoderLinkBased::sort(const o2::tpc::Digit a, const o2::tpc::Digit b)
{
// Fixme: this is blasphemy... one shoult precompute all values and sort an index array
int32_t cruinsectora = param->tpcGeometry.GetRegion(a.getRow());
int32_t cruinsectorb = param->tpcGeometry.GetRegion(b.getRow());
int32_t cruinsectora = GPUTPCGeometry::GetRegion(a.getRow());
int32_t cruinsectorb = GPUTPCGeometry::GetRegion(b.getRow());
if (cruinsectora != cruinsectorb) {
return cruinsectora < cruinsectorb;
}
Expand Down Expand Up @@ -1124,7 +1125,7 @@ inline uint32_t zsEncoderRun<T>::run(std::vector<zsPage>* buffer, std::vector<o2
}
}
if (lastRow != tmpBuffer[k].getRow()) {
curRegion = param->tpcGeometry.GetRegion(tmpBuffer[k].getRow());
curRegion = GPUTPCGeometry::GetRegion(tmpBuffer[k].getRow());
}
mustWriteSubPage = checkInput(tmpBuffer, k);
} else {
Expand Down
1 change: 0 additions & 1 deletion GPU/GPUTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# or submit itself to any jurisdiction.

set(MODULE GPUTracking)
cmake_minimum_required(VERSION 3.27 FATAL_ERROR)

# set(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER} "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}} -O0") # to uncomment if needed, tired of typing this...
# set(GPUCA_BUILD_DEBUG 1)
Expand Down
14 changes: 7 additions & 7 deletions GPU/GPUTracking/DataCompression/GPUTPCCompressionKernels.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "GPUParam.h"
#include "GPUCommonAlgorithm.h"
#include "GPUTPCCompressionTrackModel.h"
#include "GPUTPCGeometry.h"
#include "GPUTPCClusterRejection.h"
#include "GPUTPCCompressionKernels.inc"

Expand Down Expand Up @@ -68,17 +67,18 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step0at
continue; // No track model compression
}
const ClusterNative& GPUrestrict() orgCl = clusters -> clusters[hit.sector][hit.row][hit.num - clusters->clusterOffset[hit.sector][hit.row]];
float x = param.tpcGeometry.Row2X(hit.row);
float y = track.LinearPad2Y(hit.sector, orgCl.getPad(), param.tpcGeometry.PadWidth(hit.row), param.tpcGeometry.NPads(hit.row));
float z = param.tpcGeometry.LinearTime2Z(hit.sector, orgCl.getTime());
constexpr GPUTPCGeometry geo;
float x = geo.Row2X(hit.row);
float y = track.LinearPad2Y(hit.sector, orgCl.getPad(), geo.PadWidth(hit.row), geo.NPads(hit.row));
float z = geo.LinearTime2Z(hit.sector, orgCl.getTime());
if (nClustersStored) {
if ((hit.sector < GPUCA_NSECTORS) ^ (lastSector < GPUCA_NSECTORS)) {
break;
}
if (lastLeg != hit.leg && track.Mirror()) {
break;
}
if (track.Propagate(param.tpcGeometry.Row2X(hit.row), param.SectorParam[hit.sector].Alpha)) {
if (track.Propagate(geo.Row2X(hit.row), param.SectorParam[hit.sector].Alpha)) {
break;
}
}
Expand Down Expand Up @@ -115,9 +115,9 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step0at
}
c.rowDiffA[cidx] = row;
c.sliceLegDiffA[cidx] = (hit.leg == lastLeg ? 0 : compressor.NSECTORS) + sector;
float pad = CAMath::Max(0.f, CAMath::Min((float)param.tpcGeometry.NPads(GPUCA_ROW_COUNT - 1), track.LinearY2Pad(hit.sector, track.Y(), param.tpcGeometry.PadWidth(hit.row), param.tpcGeometry.NPads(hit.row))));
float pad = CAMath::Max(0.f, CAMath::Min((float)geo.NPads(GPUCA_ROW_COUNT - 1), track.LinearY2Pad(hit.sector, track.Y(), geo.PadWidth(hit.row), geo.NPads(hit.row))));
c.padResA[cidx] = orgCl.padPacked - orgCl.packPad(pad);
float time = CAMath::Max(0.f, param.tpcGeometry.LinearZ2Time(hit.sector, track.Z() + zOffset));
float time = CAMath::Max(0.f, geo.LinearZ2Time(hit.sector, track.Z() + zOffset));
c.timeResA[cidx] = (orgCl.getTimePacked() - orgCl.packTime(time)) & 0xFFFFFF;
lastLeg = hit.leg;
}
Expand Down
18 changes: 10 additions & 8 deletions GPU/GPUTracking/DataCompression/TPCClusterDecompressionCore.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "GPUTPCCompressionTrackModel.h"
#include "GPUCommonAlgorithm.h"
#include "GPUO2DataTypes.h"
#include "GPUTPCGeometry.h"

#ifndef GPUCA_GPUCODE
#include <functional>
Expand Down Expand Up @@ -80,6 +81,7 @@ class TPCClusterDecompressionCore
uint32_t slice = cmprClusters.sliceA[trackIndex];
uint32_t row = cmprClusters.rowA[trackIndex];
GPUTPCCompressionTrackModel track;
constexpr GPUTPCGeometry geo;
uint32_t clusterIndex;
for (clusterIndex = 0; clusterIndex < cmprClusters.nTrackClusters[trackIndex]; clusterIndex++) {
uint32_t pad = 0, time = 0;
Expand All @@ -105,23 +107,23 @@ class TPCClusterDecompressionCore
if (changeLeg && track.Mirror()) {
break;
}
if (track.Propagate(param.tpcGeometry.Row2X(row), param.SectorParam[slice].Alpha)) {
if (track.Propagate(geo.Row2X(row), param.SectorParam[slice].Alpha)) {
break;
}
uint32_t timeTmp = cmprClusters.timeResA[clusterOffset - trackIndex - 1];
if (timeTmp & 800000) {
timeTmp |= 0xFF000000;
}
time = timeTmp + ClusterNative::packTime(CAMath::Max(0.f, param.tpcGeometry.LinearZ2Time(slice, track.Z() + zOffset)));
float tmpPad = CAMath::Max(0.f, CAMath::Min((float)param.tpcGeometry.NPads(GPUCA_ROW_COUNT - 1), track.LinearY2Pad(slice, track.Y(), param.tpcGeometry.PadWidth(row), param.tpcGeometry.NPads(row))));
time = timeTmp + ClusterNative::packTime(CAMath::Max(0.f, geo.LinearZ2Time(slice, track.Z() + zOffset)));
float tmpPad = CAMath::Max(0.f, CAMath::Min((float)geo.NPads(GPUCA_ROW_COUNT - 1), track.LinearY2Pad(slice, track.Y(), geo.PadWidth(row), geo.NPads(row))));
pad = cmprClusters.padResA[clusterOffset - trackIndex - 1] + ClusterNative::packPad(tmpPad);
time = time & 0xFFFFFF;
pad = (uint16_t)pad;
if (pad >= param.tpcGeometry.NPads(row) * ClusterNative::scalePadPacked) {
if (pad >= geo.NPads(row) * ClusterNative::scalePadPacked) {
if (pad >= 0xFFFF - 11968) { // Constant 11968 = (2^15 - MAX_PADS(138) * scalePadPacked(64)) / 2
pad = 0;
} else {
pad = param.tpcGeometry.NPads(row) * ClusterNative::scalePadPacked - 1;
pad = geo.NPads(row) * ClusterNative::scalePadPacked - 1;
}
}
if (param.continuousMaxTimeBin > 0 && time >= maxTime) {
Expand All @@ -136,11 +138,11 @@ class TPCClusterDecompressionCore
pad = cmprClusters.padA[trackIndex];
}
const auto cluster = decompressTrackStore(cmprClusters, clusterOffset, slice, row, pad, time, args...);
float y = track.LinearPad2Y(slice, cluster.getPad(), param.tpcGeometry.PadWidth(row), param.tpcGeometry.NPads(row));
float z = param.tpcGeometry.LinearTime2Z(slice, cluster.getTime());
float y = track.LinearPad2Y(slice, cluster.getPad(), geo.PadWidth(row), geo.NPads(row));
float z = geo.LinearTime2Z(slice, cluster.getTime());
if (clusterIndex == 0) {
zOffset = z;
track.Init(param.tpcGeometry.Row2X(row), y, z - zOffset, param.SectorParam[slice].Alpha, cmprClusters.qPtA[trackIndex], param);
track.Init(geo.Row2X(row), y, z - zOffset, param.SectorParam[slice].Alpha, cmprClusters.qPtA[trackIndex], param);
}
if (clusterIndex + 1 < cmprClusters.nTrackClusters[trackIndex] && track.Filter(y, z - zOffset, row)) {
break;
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/DataTypes/TPCPadBitMap.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace o2::gpu;

TPCPadBitMap::TPCPadBitMap()
{
GPUTPCGeometry geo{};
constexpr GPUTPCGeometry geo;
int32_t offset = 0;
for (int32_t r = 0; r < GPUCA_ROW_COUNT; r++) {
mPadOffsetPerRow[r] = offset;
Expand Down
2 changes: 1 addition & 1 deletion GPU/GPUTracking/DataTypes/TPCPadGainCalib.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace o2::gpu;

TPCPadGainCalib::TPCPadGainCalib()
{
GPUTPCGeometry geo{};
constexpr GPUTPCGeometry geo{};
int32_t offset = 0;
for (int32_t r = 0; r < GPUCA_ROW_COUNT; r++) {
mPadOffsetPerRow[r] = offset;
Expand Down
Loading