Skip to content
Open
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
27 changes: 10 additions & 17 deletions DataFormats/Detectors/TPC/include/DataFormatsTPC/ClusterNative.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,28 +73,21 @@ struct ClusterNative {
uint8_t sigmaTimePacked; //< Sigma of the time in packed format
uint8_t sigmaPadPacked; //< Sigma of the pad in packed format
uint16_t qMax; //< QMax of the cluster
uint16_t qTot; //< Total charge of the cluster
uint16_t qTotPacked; //< Total charge of the cluster

GPUd() static uint16_t packPad(float pad) { return (uint16_t)(pad * scalePadPacked + 0.5); }
GPUd() static uint32_t packTime(float time) { return (uint32_t)(time * scaleTimePacked + 0.5); }
GPUd() static float unpackPad(uint16_t pad) { return float(pad) * (1.f / scalePadPacked); }
GPUd() static float unpackTime(uint32_t time) { return float(time) * (1.f / scaleTimePacked); }

GPUdDefault() ClusterNative() = default;
GPUd() ClusterNative(uint32_t time, uint8_t flags, uint16_t pad, uint8_t sigmaTime, uint8_t sigmaPad, uint16_t qmax, uint16_t qtot) : padPacked(pad), sigmaTimePacked(sigmaTime), sigmaPadPacked(sigmaPad), qMax(qmax), qTot(qtot)
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)
{
setTimePackedFlags(time, flags);
}

GPUd() uint16_t getQmax() const { return qMax; }
GPUd() uint16_t getQtot() const
{
if (isSaturated()) [[unlikely]] {
auto sQtot = getSaturatedQtot();
return sQtot < USHRT_MAX ? sQtot : USHRT_MAX;
}
return qTot;
}
GPUd() uint32_t getQtot() const { return isSaturated() ? getSaturatedQtot() : (uint32_t)qTotPacked; }
GPUd() uint8_t getFlags() const { return timeFlagsPacked >> 24; }
GPUd() uint32_t getTimePacked() const { return timeFlagsPacked & 0xFFFFFF; }
GPUd() void setTimePackedFlags(uint32_t timePacked, uint8_t flags)
Expand Down Expand Up @@ -155,19 +148,19 @@ struct ClusterNative {
sigmaPadPacked = tmp;
}

GPUd() bool isSaturated() const { return qTot > maxRegularQtot; }
GPUd() bool isSaturated() const { return qTotPacked > maxRegularQtot; }

GPUd() void setSaturatedQtot(uint32_t qtot)
{
this->qTot = USHRT_MAX;
this->qTotPacked = USHRT_MAX;
if (qtot < maxSaturatedQtot) {
this->qTot = ((qtot + scaleSaturatedQtot / 2) / scaleSaturatedQtot) + maxRegularQtot;
this->qTotPacked = ((qtot + scaleSaturatedQtot / 2) / scaleSaturatedQtot) + maxRegularQtot;
}
}

GPUd() uint32_t getSaturatedQtot() const
{
return uint32_t(qTot - maxRegularQtot) * scaleSaturatedQtot;
return uint32_t(qTotPacked - maxRegularQtot) * scaleSaturatedQtot;
}

GPUd() void setSaturatedTailLength(uint32_t tail)
Expand All @@ -192,8 +185,8 @@ struct ClusterNative {
return (this->sigmaPadPacked < rhs.sigmaPadPacked);
} else if (this->qMax != rhs.qMax) {
return (this->qMax < rhs.qMax);
} else if (this->qTot != rhs.qTot) {
return (this->qTot < rhs.qTot);
} else if (this->qTotPacked != rhs.qTotPacked) {
return (this->getQtot() < rhs.getQtot());
} else {
return (this->getFlags() < rhs.getFlags());
}
Expand All @@ -206,7 +199,7 @@ struct ClusterNative {
this->sigmaTimePacked == rhs.sigmaTimePacked &&
this->sigmaPadPacked == rhs.sigmaPadPacked &&
this->qMax == rhs.qMax &&
this->qTot == rhs.qTot &&
this->qTotPacked == rhs.qTotPacked &&
this->getFlags() == rhs.getFlags();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class ClusterNativeHelper
sigmaTime = rhs.getSigmaTime();
sigmaPad = rhs.getSigmaPad();
qMax = rhs.qMax;
qTot = rhs.qTot;
qTot = rhs.qTotPacked;
flags = rhs.getFlags();
return *this;
}
Expand Down
12 changes: 6 additions & 6 deletions Detectors/Align/src/AlignableDetectorTPC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,18 @@ int AlignableDetectorTPC::processPoints(GIndex gid, int npntCut, bool inv)
// mController->getTPCCorrMaps()->Transform(sector, row, cl->getPad(), cl->getTime(), x, y, z, tOffset);
currentRow = row;
currentSector = sector;
charge = cl->qTot;
charge = cl->getQtot();
clusterState = nextState;
combRow = row;
LOGP(debug, "starting a supercluster at row {} of sector {} -> {},{},{}", currentRow, currentSector, x, y, z);
} else {
// float xx, yy, zz;
// mController->getTPCCorrMaps()->Transform(sector, row, cl->getPad(), cl->getTime(), xx, yy, zz, tOffset);
x += xTmp * cl->qTot;
y += yTmp * cl->qTot;
z += zTmp * cl->qTot;
combRow += row * cl->qTot;
charge += cl->qTot;
x += xTmp * cl->getQtot();
y += yTmp * cl->getQtot();
z += zTmp * cl->getQtot();
combRow += row * cl->getQtot();
charge += cl->getQtot();
clusterState |= nextState;
npntCut--;
LOGP(debug, "merging cluster #{} at row {} to a supercluster starting at row {} ", clusters + 1, row, currentRow);
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/calibration/src/CalculatedEdx.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void CalculatedEdx::calculatedEdx(o2::tpc::TrackTPC& track, dEdxInfo& output, fl
}

// get charge values
float chargeTot = cl.qTot;
float chargeTot = cl.getQtot();
float chargeMax = cl.qMax;

// get threshold
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/calibration/src/CalibPadGainTracks.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void CalibPadGainTracks::processTrack(o2::tpc::TrackTPC track, o2::gpu::GPUO2Int
}

const int region = Mapper::REGION[rowIndex];
const float charge = (mChargeType == ChargeType::Max) ? cl.qMax : cl.qTot;
const float charge = (mChargeType == ChargeType::Max) ? cl.qMax : cl.getQtot();
const float effectiveLength = mCalibTrackTopologyPol ? getTrackTopologyCorrectionPol(track, cl, region, charge) : getTrackTopologyCorrection(track, region);

const unsigned char pad = std::clamp(static_cast<unsigned int>(cl.getPad() + 0.5f), static_cast<unsigned int>(0), Mapper::PADSPERROW[region][Mapper::getLocalRowFromGlobalRow(rowIndex)] - 1); // the left side of the pad is defined at e.g. 3.5 and the right side at 4.5
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/calibration/src/TrackDump.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void TrackDump::filter(const gsl::span<const TrackTPC> tracks, ClusterNativeAcce
excludes[sector][padrow].emplace_back(clusterIndexInRow);

if (clustersGlobal) {
auto& clGlobal = clustersGlobal->emplace_back(ClusterGlobal{clInfo.gx(), clInfo.gy(), cl.qMax, cl.qTot, sector, padrow});
auto& clGlobal = clustersGlobal->emplace_back(ClusterGlobal{clInfo.gx(), clInfo.gy(), cl.qMax, cl.getQtot(), sector, padrow});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int HardwareClusterDecoder::decodeClusters(std::vector<std::pair<const ClusterHa
cOut.setSigmaPad(std::sqrt(cIn.getSigmaPad2()));
cOut.setSigmaTime(std::sqrt(cIn.getSigmaTime2()));
cOut.qMax = cIn.getQMax();
cOut.qTot = cIn.getQTot();
cOut.qTotPacked = cIn.getQTot();
mIntegrator->integrateCluster(sector, padRowGlobal, pad, cIn.getQTot());
if (outMCLabels) {
auto& mcOut = outMCLabelContainers[containerRowCluster[sector][padRowGlobal]];
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/reconstruction/test/testGPUCATracking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ BOOST_AUTO_TEST_CASE(CATracking_test1)
cont[i].clusters[0].setSigmaTime(1);
cont[i].clusters[0].setSigmaPad(1);
cont[i].clusters[0].qMax = 10;
cont[i].clusters[0].qTot = 50;
cont[i].clusters[0].qTotPacked = 50;
}
std::unique_ptr<ClusterNative[]> clusterBuffer;
std::unique_ptr<ClusterNativeAccess> clusters = ClusterNativeHelper::createClusterNativeIndex(clusterBuffer, cont, nullptr, nullptr);
Expand Down
39 changes: 1 addition & 38 deletions GPU/GPUTracking/Base/GPUReconstructionConvert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,6 @@ using namespace o2::tpc;
using namespace o2::tpc::constants;
using namespace std::string_literals;

void GPUReconstructionConvert::ConvertNativeToClusterData(o2::tpc::ClusterNativeAccess* native, std::unique_ptr<GPUTPCClusterData[]>* clusters, uint32_t* nClusters, const TPCFastTransformPOD* transform, int32_t continuousMaxTimeBin)
{
memset(nClusters, 0, NSECTORS * sizeof(nClusters[0]));
uint32_t offset = 0;
for (uint32_t i = 0; i < NSECTORS; i++) {
uint32_t nClSector = 0;
for (uint32_t j = 0; j < GPUTPCGeometry::NROWS; j++) {
nClSector += native->nClusters[i][j];
}
nClusters[i] = nClSector;
clusters[i].reset(new GPUTPCClusterData[nClSector]);
nClSector = 0;
for (uint32_t j = 0; j < GPUTPCGeometry::NROWS; j++) {
for (uint32_t k = 0; k < native->nClusters[i][j]; k++) {
const auto& clin = native->clusters[i][j][k];
float x = 0, y = 0, z = 0;
if (continuousMaxTimeBin == 0) {
transform->Transform(i, j, clin.getPad(), clin.getTime(), x, y, z);
} else {
transform->TransformInTimeFrame(i, j, clin.getPad(), clin.getTime(), x, y, z, continuousMaxTimeBin);
}
auto& clout = clusters[i].get()[nClSector];
clout.x = x;
clout.y = y;
clout.z = z;
clout.row = j;
clout.amp = clin.qTot;
clout.flags = clin.getFlags();
clout.id = offset + k;
nClSector++;
}
native->clusterOffset[i][j] = offset;
offset += native->nClusters[i][j];
}
}
}

void GPUReconstructionConvert::ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess& native, std::unique_ptr<ClusterNative[]>& nativeBuffer, const AliHLTTPCRawCluster** rawClusters, uint32_t* nRawClusters)
{
memset((void*)&native, 0, sizeof(native));
Expand All @@ -110,7 +73,7 @@ void GPUReconstructionConvert::ConvertRun2RawToNative(o2::tpc::ClusterNativeAcce
c.setSigmaTime(CAMath::Sqrt(org.GetSigmaTime2()));
c.setSigmaPad(CAMath::Sqrt(org.GetSigmaPad2()));
c.qMax = org.GetQMax();
c.qTot = org.GetCharge();
c.qTotPacked = org.GetCharge();
}
}
}
Expand Down
1 change: 0 additions & 1 deletion GPU/GPUTracking/Base/GPUReconstructionConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class GPUReconstructionConvert
{
public:
constexpr static uint32_t NSECTORS = o2::tpc::constants::MAXSECTOR;
static void ConvertNativeToClusterData(o2::tpc::ClusterNativeAccess* native, std::unique_ptr<GPUTPCClusterData[]>* clusters, uint32_t* nClusters, const TPCFastTransformPOD* transform, int32_t continuousMaxTimeBin = 0);
static void ConvertRun2RawToNative(o2::tpc::ClusterNativeAccess& native, std::unique_ptr<o2::tpc::ClusterNative[]>& nativeBuffer, const AliHLTTPCRawCluster** rawClusters, uint32_t* nRawClusters);
template <class S>
static void RunZSEncoder(const S& in, std::unique_ptr<uint64_t[]>* outBuffer, uint32_t* outSizes, o2::raw::RawFileWriter* raw, const o2::InteractionRecord* ir, const GPUParam& param, int32_t version, bool verify, float threshold = 0.f, bool padding = false, std::function<void(std::vector<o2::tpc::Digit>&)> digitsFilter = nullptr);
Expand Down
10 changes: 5 additions & 5 deletions GPU/GPUTracking/DataCompression/GPUTPCClusterStatistics.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void GPUTPCClusterStatistics::RunStatistics(const o2::tpc::ClusterNativeAccess*
GPUTPCCompression::truncateSignificantBitsChargeMax(tmpClusters[k].qMax, param);
GPUTPCCompression::truncateSignificantBitsWidth(tmpClusters[k].sigmaPadPacked, param);
if (!tmpClusters[k].isSaturated()) [[likely]] {
GPUTPCCompression::truncateSignificantBitsCharge(tmpClusters[k].qTot, param);
GPUTPCCompression::truncateSignificantBitsCharge(tmpClusters[k].qTotPacked, param);
GPUTPCCompression::truncateSignificantBitsWidth(tmpClusters[k].sigmaTimePacked, param);
}
}
Expand All @@ -140,10 +140,10 @@ void GPUTPCClusterStatistics::RunStatistics(const o2::tpc::ClusterNativeAccess*
for (uint32_t k = 0; k < clustersNative->nClusters[i][j]; k++) {
const o2::tpc::ClusterNative& c1 = tmpClusters[k];
const o2::tpc::ClusterNative& c2 = clustersNativeDecoded.clusters[i][j][k];
if (c1.timeFlagsPacked != c2.timeFlagsPacked || c1.padPacked != c2.padPacked || c1.sigmaTimePacked != c2.sigmaTimePacked || c1.sigmaPadPacked != c2.sigmaPadPacked || c1.qMax != c2.qMax || c1.qTot != c2.qTot) {
if (c1.timeFlagsPacked != c2.timeFlagsPacked || c1.padPacked != c2.padPacked || c1.sigmaTimePacked != c2.sigmaTimePacked || c1.sigmaPadPacked != c2.sigmaPadPacked || c1.qMax != c2.qMax || c1.qTotPacked != c2.qTotPacked) {
if (decodingErrors++ < 100) {
GPUWarning("Cluster mismatch: sector %2u row %3u hit %5u: %6d %3d %4d %3d %3d %4d %4d", i, j, k, (int32_t)c1.getTimePacked(), (int32_t)c1.getFlags(), (int32_t)c1.padPacked, (int32_t)c1.sigmaTimePacked, (int32_t)c1.sigmaPadPacked, (int32_t)c1.qMax, (int32_t)c1.qTot);
GPUWarning("%45s %6d %3d %4d %3d %3d %4d %4d", "", (int32_t)c2.getTimePacked(), (int32_t)c2.getFlags(), (int32_t)c2.padPacked, (int32_t)c2.sigmaTimePacked, (int32_t)c2.sigmaPadPacked, (int32_t)c2.qMax, (int32_t)c2.qTot);
GPUWarning("Cluster mismatch: sector %2u row %3u hit %5u: %6d %3d %4d %3d %3d %4d %4d", i, j, k, (int32_t)c1.getTimePacked(), (int32_t)c1.getFlags(), (int32_t)c1.padPacked, (int32_t)c1.sigmaTimePacked, (int32_t)c1.sigmaPadPacked, (int32_t)c1.qMax, (int32_t)c1.qTotPacked);
GPUWarning("%45s %6d %3d %4d %3d %3d %4d %4d", "", (int32_t)c2.getTimePacked(), (int32_t)c2.getFlags(), (int32_t)c2.padPacked, (int32_t)c2.sigmaTimePacked, (int32_t)c2.sigmaPadPacked, (int32_t)c2.qMax, (int32_t)c2.qTotPacked);
}
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@ void GPUTPCClusterStatistics::RunStatistics(const o2::tpc::ClusterNativeAccess*
for (uint32_t j = 0; j < GPUTPCGeometry::NROWS; j++) {
for (uint32_t k = 0; k < clustersNativeDecoded.nClusters[i][j]; k++) {
const auto& cl = clustersNativeDecoded.clusters[i][j][k];
csv << i << ',' << j << ',' << cl.getTimePacked() << ',' << cl.padPacked << ',' << (uint32_t)cl.getFlags() << ',' << cl.qTot << ',' << cl.qMax << ',' << (uint32_t)cl.sigmaTimePacked << ',' << (uint32_t)cl.sigmaPadPacked << '\n';
csv << i << ',' << j << ',' << cl.getTimePacked() << ',' << cl.padPacked << ',' << (uint32_t)cl.getFlags() << ',' << cl.qTotPacked << ',' << cl.qMax << ',' << (uint32_t)cl.sigmaTimePacked << ',' << (uint32_t)cl.sigmaPadPacked << '\n';
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step0at
float time = CAMath::Max(0.f, geo.LinearZ2Time(hit.sector, track.Z() + zOffset));
c.timeResA[cidx] = (orgCl.getTimePacked() - orgCl.packTime(time)) & 0xFFFFFF;
}
uint16_t qtot = orgCl.qTot, qmax = orgCl.qMax;
uint16_t qtot = orgCl.qTotPacked, qmax = orgCl.qMax;
uint8_t sigmapad = orgCl.sigmaPadPacked, sigmatime = orgCl.sigmaTimePacked;
if (param.rec.tpc.compressionTypeMask & GPUSettings::CompressionTruncate) {
compressor.truncateSignificantBitsChargeMax(qmax, param);
Expand Down Expand Up @@ -184,7 +184,7 @@ GPUd() bool GPUTPCCompressionKernels::GPUTPCCompressionKernels_Compare<4>::opera
if (mClsPtr[a].padPacked != mClsPtr[b].padPacked) {
return mClsPtr[a].padPacked < mClsPtr[b].padPacked;
}
return mClsPtr[a].qTot < mClsPtr[b].qTot;
return mClsPtr[a].qTotPacked < mClsPtr[b].qTotPacked;
}

GPUd() bool GPUTPCCompression::rejectCluster(int32_t idx, const GPUParam& GPUrestrict() param, const GPUTrackingInOutPointers& GPUrestrict() ioPtrs) const
Expand Down Expand Up @@ -296,7 +296,7 @@ GPUdii() void GPUTPCCompressionKernels::Thread<GPUTPCCompressionKernels::step1un
int32_t preId = j != 0 ? (int32_t)sortBuffer[j - 1] : (totalCount != 0 ? (int32_t)smem.lastIndex : -1);
GPUTPCCompression_EncodeUnattached(param.rec.tpc.compressionTypeMask, orgCl, c.timeDiffU[outidx], c.padDiffU[outidx], preId == -1 ? nullptr : &clusters->clusters[iSector][iRow][preId]);

uint16_t qtot = orgCl.qTot, qmax = orgCl.qMax;
uint16_t qtot = orgCl.qTotPacked, qmax = orgCl.qMax;
uint8_t sigmapad = orgCl.sigmaPadPacked, sigmatime = orgCl.sigmaTimePacked;
if (param.rec.tpc.compressionTypeMask & GPUSettings::CompressionTruncate) {
compressor.truncateSignificantBitsChargeMax(qmax, param);
Expand Down
1 change: 0 additions & 1 deletion GPU/GPUTracking/Global/GPUChainTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class GPUChainTracking : public GPUChain

// Converter / loader functions
int32_t ConvertNativeToClusterData();
void ConvertNativeToClusterDataLegacy();
void ConvertRun2RawToNative();
void ConvertZSEncoder(int32_t version);
void ConvertZSFilter(bool zs12bit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void GPUChainTracking::RunTPCClusterFilter(o2::tpc::ClusterNativeAccess* cluster
o2::tpc::ClusterNative cl = clusters->clusters[iSector][iRow][k];
bool keep = true;
if (applyClusterCuts) {
keep = keep && cl.qTot > param().rec.tpc.cfQTotCutoff && cl.qMax > param().rec.tpc.cfQMaxCutoff;
keep = keep && cl.getQtot() > param().rec.tpc.cfQTotCutoff && cl.qMax > param().rec.tpc.cfQMaxCutoff;
keep = keep && (!(cl.getFlags() & o2::tpc::ClusterNative::flagSingle) || ((cl.sigmaPadPacked || cl.qMax > param().rec.tpc.cfQMaxCutoffSinglePad) && (cl.sigmaTimePacked || cl.qMax > param().rec.tpc.cfQMaxCutoffSingleTime)));
}
if (param().tpcCutTimeBin > 0) {
Expand Down Expand Up @@ -353,7 +353,7 @@ void GPUChainTracking::DumpClusters(std::ostream& out, const o2::tpc::ClusterNat
out << " Row: " << i << ": " << clusters->nClusters[iSec][i] << " clusters:\n";
for (uint32_t j = 0; j < clusters->nClusters[iSec][i]; j++) {
const auto& cl = clusters->clusters[iSec][i][j];
out << " " << std::hex << cl.timeFlagsPacked << std::dec << " " << cl.padPacked << " " << int32_t{cl.sigmaTimePacked} << " " << int32_t{cl.sigmaPadPacked} << " " << cl.qMax << " " << cl.qTot << "\n";
out << " " << std::hex << cl.timeFlagsPacked << std::dec << " " << cl.padPacked << " " << int32_t{cl.sigmaTimePacked} << " " << int32_t{cl.sigmaPadPacked} << " " << cl.qMax << " " << cl.qTotPacked << "\n";
}
}
}
Expand Down
21 changes: 1 addition & 20 deletions GPU/GPUTracking/Global/GPUChainTrackingTransformation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,6 @@ int32_t GPUChainTracking::ConvertNativeToClusterData()
return 0;
}

void GPUChainTracking::ConvertNativeToClusterDataLegacy()
{
ClusterNativeAccess* tmp = mIOMem.clusterNativeAccess.get();
if (tmp != mIOPtrs.clustersNative) {
*tmp = *mIOPtrs.clustersNative;
}
GPUReconstructionConvert::ConvertNativeToClusterData(mIOMem.clusterNativeAccess.get(), mIOMem.clusterData, mIOPtrs.nClusterData, processors()->calibObjects.fastTransform, param().continuousMaxTimeBin);
for (uint32_t i = 0; i < NSECTORS; i++) {
mIOPtrs.clusterData[i] = mIOMem.clusterData[i].get();
if (GetProcessingSettings().registerStandaloneInputMemory) {
if (mRec->registerMemoryForGPU(mIOMem.clusterData[i].get(), mIOPtrs.nClusterData[i] * sizeof(*mIOPtrs.clusterData[i]))) {
throw std::runtime_error("Error registering memory for GPU");
}
}
}
mIOPtrs.clustersNative = nullptr;
mIOMem.clustersNative.reset(nullptr);
}

void GPUChainTracking::ConvertRun2RawToNative()
{
GPUReconstructionConvert::ConvertRun2RawToNative(*mIOMem.clusterNativeAccess, mIOMem.clustersNative, mIOPtrs.rawClusters, mIOPtrs.nRawClusters);
Expand Down Expand Up @@ -143,7 +124,7 @@ int32_t GPUChainTracking::ForwardTPCDigits()
c.setPad(d.getPad());
c.setSigmaTime(1);
c.setSigmaPad(1);
c.qTot = c.qMax = d.getChargeFloat();
c.qTotPacked = c.qMax = d.getChargeFloat();
tmp[i][d.getRow()].emplace_back(c);
nTotal++;
}
Expand Down
4 changes: 2 additions & 2 deletions GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger* GPUrestrict() merger, int32_
const int32_t clusterCount = (ihit - ihitMergeFirst) * wayDirection + 1;
for (int32_t iTmp = ihitMergeFirst; iTmp != ihit + wayDirection; iTmp += wayDirection) {
const ClusterNative& cl = merger->GetConstantMem()->ioPtrs.clustersNative->clustersLinear[cluster.num];
qtot += cl.qTot;
qtot += cl.getQtot();
qmax = CAMath::Max<float>(qmax, cl.qMax);
pad += cl.getPad();
relTime += cl.getTime();
Expand Down Expand Up @@ -441,7 +441,7 @@ GPUd() int32_t GPUTPCGMTrackParam::MergeDoubleRowClusters(int32_t& ihit, int32_t
clusterState = 0;
while (true) {
const ClusterNative& GPUrestrict() cl = merger->GetConstantMem()->ioPtrs.clustersNative->clustersLinear[clusters[ihit].num];
float clamp = cl.qTot;
float clamp = cl.getQtot();
float clx, cly, clz;
merger->GetConstantMem()->calibObjects.fastTransform->Transform(clusters[ihit].sector, clusters[ihit].row, cl.getPad(), cl.getTime(), clx, cly, clz, mTOffset);
float dy = cly - projY;
Expand Down
Loading