Skip to content

Commit f09d8f6

Browse files
committed
GPU TPC: Always store outer param
1 parent 5446bba commit f09d8f6

File tree

9 files changed

+19
-27
lines changed

9 files changed

+19
-27
lines changed

Detectors/TPC/reconstruction/test/testGPUCATracking.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,23 @@ BOOST_AUTO_TEST_CASE(CATracking_test1)
5050
{
5151
GPUO2Interface tracker;
5252

53-
float solenoidBz = -5.00668; //B-field
54-
float refX = 1000.; //transport tracks to this x after tracking, >500 for disabling
55-
bool continuous = false; //time frame data v.s. triggered events
53+
float solenoidBz = -5.00668; // B-field
54+
float refX = 1000.; // transport tracks to this x after tracking, >500 for disabling
55+
bool continuous = false; // time frame data v.s. triggered events
5656

5757
GPUO2InterfaceConfiguration config;
5858
config.configDeviceBackend.deviceType = GPUDataTypes::DeviceType::CPU;
5959
config.configDeviceBackend.forceDeviceType = true;
6060

61-
config.configProcessing.ompThreads = 4; //4 threads if we run on the CPU, 1 = default, 0 = auto-detect
62-
config.configProcessing.runQA = false; //Run QA after tracking
63-
config.configProcessing.eventDisplay = nullptr; //Ptr to event display backend, for running standalone OpenGL event display
61+
config.configProcessing.ompThreads = 4; // 4 threads if we run on the CPU, 1 = default, 0 = auto-detect
62+
config.configProcessing.runQA = false; // Run QA after tracking
63+
config.configProcessing.eventDisplay = nullptr; // Ptr to event display backend, for running standalone OpenGL event display
6464

6565
config.configGRP.solenoidBzNominalGPU = solenoidBz;
6666
config.configGRP.grpContinuousMaxTimeBin = continuous ? GPUSettings::TPC_MAX_TF_TIME_BIN : 0; // Number of timebins in timeframe if continuous, 0 otherwise
6767

68-
config.configReconstruction.tpc.nWays = 3; //Should always be 3!
69-
config.configReconstruction.tpc.nWaysOuter = true; //Will create outer param for TRD
70-
config.configReconstruction.tpc.searchWindowDZDR = 2.5f; //Should always be 2.5 for looper-finding and/or continuous tracking
68+
config.configReconstruction.tpc.nWays = 3; // Should always be 3!
69+
config.configReconstruction.tpc.searchWindowDZDR = 2.5f; // Should always be 2.5 for looper-finding and/or continuous tracking
7170
config.configReconstruction.tpc.trackReferenceX = refX;
7271

7372
config.configWorkflow.steps.set(GPUDataTypes::RecoStep::TPCConversion, GPUDataTypes::RecoStep::TPCSectorTracking,

GPU/GPUTracking/Base/GPUReconstruction.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
270270
GPUError("WARNING, deterministicGPUReconstruction needs GPUCA_DETERMINISTIC_MODE for being fully deterministic, without only most indeterminism by concurrency is removed, but floating point effects remain!");
271271
#endif
272272
mProcessingSettings->overrideClusterizerFragmentLen = TPC_MAX_FRAGMENT_LEN_GPU;
273-
param().rec.tpc.nWaysOuter = true;
274273
if (GetProcessingSettings().createO2Output > 1) {
275274
mProcessingSettings->createO2Output = 1;
276275
}

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ AddOptionRTC(cfNoiseSuppressionEpsilon, uint8_t, 10, "", 0, "Cluster Finder: Dif
134134
AddOptionRTC(cfNoiseSuppressionEpsilonRelative, uint8_t, 76, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression, relative as fraction of 255")
135135
AddOptionRTC(cfEdgeTwoPads, uint8_t, 0, "", 0, "Flag clusters with peak on the 2 pads closes to the sector edge as edge cluster")
136136
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger")
137-
AddOptionRTC(nWaysOuter, int8_t, 0, "", 0, "Store outer param")
138137
AddOptionRTC(trackFitRejectMode, int8_t, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits, <0: reject at max -n hits")
139138
AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit")
140139
AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128")
@@ -595,7 +594,7 @@ AddOption(rundEdx, int32_t, -1, "", 0, "Enable dEdx processing")
595594
AddOption(runCompression, int32_t, 1, "", 0, "Enable TPC Compression")
596595
AddOption(runTransformation, int32_t, 1, "", 0, "Enable TPC Transformation")
597596
AddOption(runRefit, bool, false, "", 0, "Enable final track refit")
598-
AddOption(setO2Settings, bool, false, "", 0, "Set O2 defaults for outerParam, output of shared cluster map, referenceX")
597+
AddOption(setO2Settings, bool, false, "", 0, "Set O2 defaults for output of shared cluster map, referenceX")
599598
AddHelp("help", 'h')
600599
AddHelpAll("helpall", 'H')
601600
AddSubConfig(GPUSettingsRec, rec)

GPU/GPUTracking/Global/GPUChainTracking.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ bool GPUChainTracking::ValidateSettings()
299299
return false;
300300
}
301301
if (GetRecoSteps() & RecoStep::TRDTracking) {
302-
if (GetProcessingSettings().trdTrackModelO2 && (GetProcessingSettings().createO2Output == 0 || param().rec.tpc.nWaysOuter == 0 || (GetMatLUT() == nullptr && !GetProcessingSettings().willProvideO2PropagatorLate))) {
303-
GPUError("TRD tracking can only run on O2 TPC tracks if createO2Output is enabled (%d), nWaysOuter is set (%d), and matBudLUT is available (0x%p)", (int32_t)GetProcessingSettings().createO2Output, (int32_t)param().rec.tpc.nWaysOuter, (void*)GetMatLUT());
302+
if (GetProcessingSettings().trdTrackModelO2 && (GetProcessingSettings().createO2Output == 0 || (GetMatLUT() == nullptr && !GetProcessingSettings().willProvideO2PropagatorLate))) {
303+
GPUError("TRD tracking can only run on O2 TPC tracks if createO2Output is enabled (%d), and matBudLUT is available (0x%p)", (int32_t)GetProcessingSettings().createO2Output, (void*)GetMatLUT());
304304
return false;
305305
}
306306
if ((GetRecoStepsGPU() & RecoStep::TRDTracking) && !GetProcessingSettings().trdTrackModelO2 && GetProcessingSettings().createO2Output > 1) {

GPU/GPUTracking/Global/GPUChainTrackingTRD.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int32_t GPUChainTracking::RunTRDTrackingInternal()
6262
if (!Tracker.PreCheckTrackTRDCandidate(trk)) {
6363
continue;
6464
}
65-
const GPUTRDTrackGPU& trktrd = param().rec.tpc.nWaysOuter ? (GPUTRDTrackGPU)trk.OuterParam() : (GPUTRDTrackGPU)trk;
65+
const GPUTRDTrackGPU& trktrd = (GPUTRDTrackGPU)trk.OuterParam();
6666
if (!Tracker.CheckTrackTRDCandidate(trktrd)) {
6767
continue;
6868
}

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger* GPUrestrict() merger, int32_
8585
float sumInvSqrtCharge = 0.f;
8686
int32_t nAvgCharge = 0;
8787

88-
if (iWay && param.rec.tpc.nWaysOuter) {
89-
if (iWay == nWays - 1) {
90-
StoreOuter(&track.OuterParam(), prop, 0);
88+
if (iWay) {
89+
if (iWay && ((nWays - iWay) & 1) == 1) {
90+
StoreOuter(&track.OuterParam(), prop.GetAlpha());
9191
}
9292
}
9393

@@ -626,17 +626,17 @@ GPUd() bool GPUTPCGMTrackParam::FollowCircleChk(float lrFactor, float toY, float
626626
(up ? (-mP[0] * lrFactor > toX || (right ^ (mP[2] > 0))) : (-mP[0] * lrFactor < toX || (right ^ (mP[2] < 0)))); // don't overshoot in X
627627
}
628628

629-
GPUdii() void GPUTPCGMTrackParam::StoreOuter(gputpcgmmergertypes::GPUTPCOuterParam* outerParam, const GPUTPCGMPropagator& prop, int32_t phase)
629+
GPUdii() void GPUTPCGMTrackParam::StoreOuter(gputpcgmmergertypes::GPUTPCOuterParam* outerParam, float alpha)
630630
{
631-
CADEBUG(printf("\t%21sStorO%d Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f\n", "", phase, prop.GetAlpha(), mX, mP[0], mP[1], mP[4], prop.GetQPt0(), mP[2], prop.GetSinPhi0(), sqrtf(mC[0]), sqrtf(mC[2]), sqrtf(mC[5]), sqrtf(mC[14])));
631+
CADEBUG(printf("\t%21sStorO Alpha %8.3f , X %8.3f - Y %8.3f, Z %8.3f - QPt %7.2f (%7.2f), SP %5.2f (%5.2f) --- Cov sY %8.3f sZ %8.3f sSP %8.3f sPt %8.3f\n", "", prop.GetAlpha(), mX, mP[0], mP[1], mP[4], prop.GetQPt0(), mP[2], prop.GetSinPhi0(), sqrtf(mC[0]), sqrtf(mC[2]), sqrtf(mC[5]), sqrtf(mC[14])));
632632
for (int32_t i = 0; i < 5; i++) {
633633
outerParam->P[i] = mP[i];
634634
}
635635
for (int32_t i = 0; i < 15; i++) {
636636
outerParam->C[i] = mC[i];
637637
}
638638
outerParam->X = mX;
639-
outerParam->alpha = prop.GetAlpha();
639+
outerParam->alpha = alpha;
640640
}
641641

642642
GPUdic(0, 1) void GPUTPCGMTrackParam::StoreAttachMirror(const GPUTPCGMMerger* GPUrestrict() Merger, int32_t sector, int32_t iRow, int32_t iTrack, float toAlpha, float toY, float toX, int32_t toSector, int32_t toRow, bool inFlyDirection, float alpha)

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class GPUTPCGMTrackParam
153153
GPUd() void AttachClustersMirror(const GPUTPCGMMerger* GPUrestrict() Merger, int32_t sector, int32_t iRow, int32_t iTrack, float toY, GPUTPCGMPropagator& prop);
154154
GPUd() int32_t FollowCircle(const GPUTPCGMMerger* GPUrestrict() Merger, GPUTPCGMPropagator& prop, int32_t sector, int32_t iRow, int32_t iTrack, float toAlpha, float toX, float toY, int32_t toSector, int32_t toRow, bool inFlyDirection);
155155
GPUd() void StoreAttachMirror(const GPUTPCGMMerger* GPUrestrict() Merger, int32_t sector, int32_t iRow, int32_t iTrack, float toAlpha, float toY, float toX, int32_t toSector, int32_t toRow, bool inFlyDirection, float alpha);
156-
GPUd() void StoreOuter(gputpcgmmergertypes::GPUTPCOuterParam* outerParam, const GPUTPCGMPropagator& prop, int32_t phase);
156+
GPUd() void StoreOuter(gputpcgmmergertypes::GPUTPCOuterParam* outerParam, float alpha);
157157
GPUd() static void RefitLoop(const GPUTPCGMMerger* GPUrestrict() Merger, int32_t loopIdx);
158158

159159
GPUd() void AddCovDiagErrors(const float* GPUrestrict() errors2);

GPU/GPUTracking/Standalone/Benchmark/standalone.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ int32_t ReadConfiguration(int argc, char** argv)
220220
if (configStandalone.runGPU) {
221221
configStandalone.proc.forceHostMemoryPoolSize = 1024 * 1024 * 1024;
222222
}
223-
configStandalone.rec.tpc.nWaysOuter = 1;
224223
configStandalone.rec.tpc.trackReferenceX = 83;
225224
configStandalone.proc.outputSharedClusterMap = 1;
226225
configStandalone.proc.clearO2OutputFromGPU = 1;
@@ -415,9 +414,6 @@ int32_t SetupReconstruction()
415414
steps.outputs.setBits(GPUDataTypes::InOutType::TPCClusters, steps.steps.isSet(GPUDataTypes::RecoStep::TPCClusterFinding));
416415

417416
if (steps.steps.isSet(GPUDataTypes::RecoStep::TRDTracking)) {
418-
if (recSet.tpc.nWays > 1) {
419-
recSet.tpc.nWaysOuter = 1;
420-
}
421417
if (procSet.createO2Output && !procSet.trdTrackModelO2) {
422418
procSet.createO2Output = 1; // Must not be 2, to make sure TPC GPU tracks are still available for TRD
423419
}

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ void GPURecoWorkflowSpec::init(InitContext& ic)
227227
mConfig->configProcessing.runQA = -mQATaskMask;
228228
}
229229
}
230-
mConfig->configReconstruction.tpc.nWaysOuter = true;
231230
mConfig->configInterface.outputToExternalBuffers = true;
232231
if (mConfParam->synchronousProcessing) {
233232
mConfig->configReconstruction.useMatLUT = false;

0 commit comments

Comments
 (0)