@@ -355,7 +355,7 @@ int GPUChainTracking::RunTPCClusterizer_prepare(bool restorePointers)
355355 }
356356 mCFContext ->fragmentFirst = CfFragment{std::max<int >(mCFContext ->tpcMaxTimeBin + 1 , TPC_MAX_FRAGMENT_LEN ), TPC_MAX_FRAGMENT_LEN };
357357 for (int iSlice = 0 ; iSlice < GetProcessingSettings ().nTPCClustererLanes && iSlice < NSLICES ; iSlice++) {
358- if (mIOPtrs .tpcZS && mCFContext ->nPagesSector [iSlice]) {
358+ if (mIOPtrs .tpcZS && mCFContext ->nPagesSector [iSlice] && mCFContext -> zsVersion != - 1 ) {
359359 mCFContext ->nextPos [iSlice] = RunTPCClusterizer_transferZS (iSlice, mCFContext ->fragmentFirst , GetProcessingSettings ().nTPCClustererLanes + iSlice);
360360 }
361361 }
@@ -492,7 +492,7 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
492492 }
493493
494494 if (mIOPtrs .tpcZS ) {
495- if (mCFContext ->nPagesSector [iSlice]) {
495+ if (mCFContext ->nPagesSector [iSlice] && mCFContext -> zsVersion != - 1 ) {
496496 clusterer.mPmemory ->counters .nPositions = mCFContext ->nextPos [iSlice].first ;
497497 clusterer.mPmemory ->counters .nPagesSubslice = mCFContext ->nextPos [iSlice].second ;
498498 } else {
@@ -510,14 +510,14 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
510510 }
511511 DoDebugAndDump (RecoStep::TPCClusterFinding, 0 , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Zeroed Charges" );
512512
513- if (mIOPtrs .tpcZS && mCFContext ->nPagesSector [iSlice]) {
513+ if (mIOPtrs .tpcZS && mCFContext ->nPagesSector [iSlice] && mCFContext -> zsVersion != - 1 ) {
514514 TransferMemoryResourceLinkToGPU (RecoStep::TPCClusterFinding, mInputsHost ->mResourceZS , lane);
515515 SynchronizeStream (GetProcessingSettings ().nTPCClustererLanes + lane);
516516 }
517517
518518 SynchronizeStream (mRec ->NStreams () - 1); // Wait for copying to constant memory
519519
520- if (mIOPtrs .tpcZS && !mCFContext ->nPagesSector [iSlice]) {
520+ if (mIOPtrs .tpcZS && ( !mCFContext ->nPagesSector [iSlice] || mCFContext -> zsVersion == - 1 ) ) {
521521 continue ;
522522 }
523523
@@ -559,7 +559,7 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
559559 nextSlice += GetProcessingSettings ().nTPCClustererLanes ;
560560 f = mCFContext ->fragmentFirst ;
561561 }
562- if (nextSlice < NSLICES && mIOPtrs .tpcZS && mCFContext ->nPagesSector [nextSlice]) {
562+ if (nextSlice < NSLICES && mIOPtrs .tpcZS && mCFContext ->nPagesSector [nextSlice] && mCFContext -> zsVersion != - 1 ) {
563563 mCFContext ->nextPos [nextSlice] = RunTPCClusterizer_transferZS (nextSlice, f, GetProcessingSettings ().nTPCClustererLanes + lane);
564564 }
565565 }
0 commit comments