1414
1515#include " GPUChainTracking.h"
1616#include " GPUChainTrackingDefs.h"
17+ #include " GPUChainTrackingDebug.h"
1718#include " GPULogging.h"
1819#include " GPUO2DataTypes.h"
1920#include " GPUMemorySizeScalers.h"
@@ -813,7 +814,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
813814 if (fragment.index == 0 ) {
814815 runKernel<GPUMemClean16>({GetGridAutoStep (lane, RecoStep::TPCClusterFinding)}, clustererShadow.mPpadIsNoisy , TPC_PADS_IN_SECTOR * sizeof (*clustererShadow.mPpadIsNoisy ));
815816 }
816- DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Zeroed Charges" );
817+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererZeroedCharges , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Zeroed Charges" );
817818
818819 if (doGPU) {
819820 if (mIOPtrs .tpcZS && mCFContext ->nPagesSector [iSector] && mCFContext ->zsVersion != -1 ) {
@@ -900,7 +901,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
900901 if (!mIOPtrs .tpcZS ) {
901902 runKernel<GPUTPCCFChargeMapFiller, GPUTPCCFChargeMapFiller::fillFromDigits>({GetGrid (clusterer.mPmemory ->counters .nPositions , lane), {iSector}});
902903 }
903- if (DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 1 , clusterer, &GPUTPCClusterFinder::DumpDigits, *mDebugFile )) {
904+ if (DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererDigits , clusterer, &GPUTPCClusterFinder::DumpDigits, *mDebugFile )) {
904905 clusterer.DumpChargeMap (*mDebugFile , " Charges" );
905906 }
906907
@@ -919,13 +920,13 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
919920 }
920921
921922 runKernel<GPUTPCCFPeakFinder>({GetGrid (clusterer.mPmemory ->counters .nPositions , lane), {iSector}});
922- if (DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 2 , clusterer, &GPUTPCClusterFinder::DumpPeaks, *mDebugFile )) {
923+ if (DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererPeaks , clusterer, &GPUTPCClusterFinder::DumpPeaks, *mDebugFile )) {
923924 clusterer.DumpPeakMap (*mDebugFile , " Peaks" );
924925 }
925926
926927 RunTPCClusterizer_compactPeaks (clusterer, clustererShadow, 0 , doGPU, lane);
927928 TransferMemoryResourceLinkToHost (RecoStep::TPCClusterFinding, clusterer.mMemoryId , lane);
928- DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 2 , clusterer, &GPUTPCClusterFinder::DumpPeaksCompacted, *mDebugFile ); // clang-format off
929+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererPeaks , clusterer, &GPUTPCClusterFinder::DumpPeaksCompacted, *mDebugFile ); // clang-format off
929930 });
930931 mRec ->runParallelOuterLoop (doGPU, maxLane, [&](uint32_t lane) {
931932 uint32_t iSector = iSectorBase + lane;
@@ -939,13 +940,13 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
939940 }
940941 runKernel<GPUTPCCFNoiseSuppression, GPUTPCCFNoiseSuppression::noiseSuppression>({GetGrid (clusterer.mPmemory ->counters .nPeaks , lane), {iSector}});
941942 runKernel<GPUTPCCFNoiseSuppression, GPUTPCCFNoiseSuppression::updatePeaks>({GetGrid (clusterer.mPmemory ->counters .nPeaks , lane), {iSector}});
942- if (DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 3 , clusterer, &GPUTPCClusterFinder::DumpSuppressedPeaks, *mDebugFile )) {
943+ if (DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererSuppressedPeaks , clusterer, &GPUTPCClusterFinder::DumpSuppressedPeaks, *mDebugFile )) {
943944 clusterer.DumpPeakMap (*mDebugFile , " Suppressed Peaks" );
944945 }
945946
946947 RunTPCClusterizer_compactPeaks (clusterer, clustererShadow, 1 , doGPU, lane);
947948 TransferMemoryResourceLinkToHost (RecoStep::TPCClusterFinding, clusterer.mMemoryId , lane);
948- DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 3 , clusterer, &GPUTPCClusterFinder::DumpSuppressedPeaksCompacted, *mDebugFile ); // clang-format off
949+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererSuppressedPeaks , clusterer, &GPUTPCClusterFinder::DumpSuppressedPeaksCompacted, *mDebugFile ); // clang-format off
949950 });
950951 mRec ->runParallelOuterLoop (doGPU, maxLane, [&](uint32_t lane) {
951952 uint32_t iSector = iSectorBase + lane;
@@ -979,7 +980,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
979980
980981 if (clustererNNShadow.mNnClusterizerUseCfRegression || (int )(nn_settings.nnClusterizerApplyCfDeconvolution )) {
981982 runKernel<GPUTPCCFDeconvolution>({GetGrid (clusterer.mPmemory ->counters .nPositions , lane), {iSector}});
982- DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 4 , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Split Charges" );
983+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererChargeMap , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Split Charges" );
983984 }
984985
985986 // float time_clusterizer = 0, time_fill = 0, time_networks = 0;
@@ -1092,7 +1093,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
10921093#endif
10931094 } else {
10941095 runKernel<GPUTPCCFDeconvolution>({GetGrid (clusterer.mPmemory ->counters .nPositions , lane), {iSector}});
1095- DoDebugAndDump (RecoStep::TPCClusterFinding, 262144 << 4 , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Split Charges" );
1096+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererChargeMap , clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile , " Split Charges" );
10961097 runKernel<GPUTPCCFClusterizer>({GetGrid (clusterer.mPmemory ->counters .nClusters , lane), {iSector}}, 0 );
10971098 }
10981099
@@ -1111,7 +1112,7 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
11111112 TransferMemoryResourcesToHost (RecoStep::TPCClusterFinding, &clusterer, lane);
11121113 laneHasData[lane] = true ;
11131114 // Include clusters in default debug mask, exclude other debug output by default
1114- DoDebugAndDump (RecoStep::TPCClusterFinding, 131072 , clusterer, &GPUTPCClusterFinder::DumpClusters, *mDebugFile ); // clang-format off
1115+ DoDebugAndDump (RecoStep::TPCClusterFinding, GPUChainTrackingDebugFlags::TPCClustererClusters , clusterer, &GPUTPCClusterFinder::DumpClusters, *mDebugFile ); // clang-format off
11151116 });
11161117 mRec ->SetNActiveThreadsOuterLoop (1 );
11171118 }
0 commit comments