Skip to content

Commit 1c596b0

Browse files
committed
GPU TPC: If value from other side of interpolation not stored, use only current value
1 parent b26b91a commit 1c596b0

3 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎GPU/GPUTracking/Definitions/GPUSettingsList.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ AddOptionRTC(rejectEdgeClustersMargin, float, 0.f, "", 0, "Margin in cm of Y pos
102102
AddOptionRTC(rejectEdgeClustersSigmaMargin, float, 0.f, "", 0, "Margin factor for trackSigmaY when rejecting edge clusters based on uncorrected track Y")
103103
AddOptionRTC(trackletMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for tracklet")
104104
AddOptionRTC(trackletMinSharedNormFactor, float, 0.f, "", 0, "Max shared defined as trackletMinSharedNormFactor*max(current_nhits,trackletMinSharedNormFactor*minHits,1)")
105+
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
106+
AddOptionRTC(rebuildTrackMaxNonIntCov, float, 4.f, "", 0, "Max Err2 allowed for non-interpolated cluster attachment during rebuild")
105107
AddOptionRTC(maxTimeBinAboveThresholdIn1000Bin, uint16_t, 500, "", 0, "Except pad from cluster finding if total number of charges in a fragment is above this baseline (disable = 0)")
106108
AddOptionRTC(maxConsecTimeBinAboveThreshold, uint16_t, 200, "", 0, "Except pad from cluster finding if number of consecutive charges in a fragment is above this baseline (disable = 0)")
107109
AddOptionRTC(noisyPadSaturationThreshold, uint16_t, 700, "", 0, "Threshold where a timebin is considered saturated, disabling the noisy pad check for that pad")
@@ -137,7 +139,6 @@ AddOptionRTC(cfEdgeTwoPads, uint8_t, 0, "", 0, "Flag clusters with peak on the 2
137139
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger (must be odd to end with inward fit)")
138140
AddOptionRTC(rebuildTrackInFit, uint8_t, 1, "", 0, "Rebuild track completely during fit based on clusters closed to interpolated track positions")
139141
AddOptionRTC(rebuildTrackInFitClusterCandidates, uint8_t, 3, "", 0, "Number of cluster candidates per row for rebuilt track")
140-
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
141142
AddOptionRTC(trackFitRejectMode, int8_t, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits")
142143
AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit")
143144
AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128")

‎GPU/GPUTracking/Global/GPUChainTracking.cxx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ void GPUChainTracking::ApplySyncSettings(GPUSettingsProcessing& proc, GPUSetting
10311031
{
10321032
if (syncMode) {
10331033
rec.useMatLUT = false;
1034+
rec.tpc.rebuildTrackMaxNonIntCov = 0.f;
10341035
}
10351036
if (proc.rtc.optSpecialCode == -1) {
10361037
proc.rtc.optSpecialCode = syncMode;

‎GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx‎

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -406,27 +406,32 @@ GPUdii() float GPUTPCGMTrackParam::FindBestInterpolatedHit(GPUTPCGMMerger& GPUre
406406
GPUglobalref() const cahit2* hits = tracker.HitData(rowData);
407407
GPUglobalref() const calink* firsthit = tracker.FirstHitInBin(rowData);
408408
float uncorrectedY = -1e6f, uncorrectedZ;
409-
if (rowData.NHits() && inter.errorY >= (GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE_A)0) {
409+
if (rowData.NHits() && (inter.errorY >= (GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE_A)0 || (param.rec.tpc.rebuildTrackMaxNonIntCov > 0 && mC[0] < param.rec.tpc.rebuildTrackMaxNonIntCov && mC[2] < param.rec.tpc.rebuildTrackMaxNonIntCov))) {
410410
const float zOffset = param.par.continuousTracking ? merger.GetConstantMem()->calibObjects.fastTransform->convVertexTimeToZOffset(sector, mTOffset, param.continuousMaxTimeBin) : 0;
411411
const float y0 = rowData.Grid().YMin();
412412
const float stepY = rowData.HstepY();
413413
const float z0 = rowData.Grid().ZMin() - zOffset; // We can use our own ZOffset, since this is only used temporarily anyway
414414
const float stepZ = rowData.HstepZ();
415415
int32_t bin, ny, nz;
416416

417-
float err2Y, err2Z;
418-
param.GetClusterErrors2(sector, row, mP[1], mP[2], mP[3], -1.f, 0.f, 0.f, err2Y, err2Z); // TODO: Use correct time/avgCharge
419-
420-
const float Iz0 = inter.posY - mP[0];
421-
const float Iz1 = inter.posZ + deltaZ - mP[1];
422-
const float Iw0 = 1.f / (mC[0] + (float)inter.errorY);
423-
const float Iw2 = 1.f / (mC[2] + (float)inter.errorZ);
424-
const float Ik00 = mC[0] * Iw0;
425-
const float Ik11 = mC[2] * Iw2;
426-
const float ImP0 = mP[0] + Ik00 * Iz0;
427-
const float ImP1 = mP[1] + Ik11 * Iz1;
428-
const float ImC0 = mC[0] - Ik00 * mC[0];
429-
const float ImC2 = mC[2] - Ik11 * mC[2];
417+
float ImP0, ImP1, ImC0, ImC2;
418+
if (inter.errorY >= (GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE_A)0) {
419+
const float Iz0 = inter.posY - mP[0];
420+
const float Iz1 = inter.posZ + deltaZ - mP[1];
421+
const float Iw0 = 1.f / (mC[0] + (float)inter.errorY);
422+
const float Iw2 = 1.f / (mC[2] + (float)inter.errorZ);
423+
const float Ik00 = mC[0] * Iw0;
424+
const float Ik11 = mC[2] * Iw2;
425+
ImP0 = mP[0] + Ik00 * Iz0;
426+
ImP1 = mP[1] + Ik11 * Iz1;
427+
ImC0 = mC[0] - Ik00 * mC[0];
428+
ImC2 = mC[2] - Ik11 * mC[2];
429+
} else {
430+
ImP0 = mP[0];
431+
ImP1 = mP[1];
432+
ImC0 = mC[0];
433+
ImC2 = mC[2];
434+
}
430435

431436
merger.GetConstantMem()->calibObjects.fastTransform->InverseTransformYZtoNominalYZ(sector, row, ImP0, ImP1, uncorrectedY, uncorrectedZ);
432437

@@ -435,6 +440,9 @@ GPUdii() float GPUTPCGMTrackParam::FindBestInterpolatedHit(GPUTPCGMMerger& GPUre
435440
nCandidates++;
436441
}
437442
if (CAMath::Abs(uncorrectedY) <= rowData.getTPCMaxY()) {
443+
float err2Y, err2Z;
444+
param.GetClusterErrors2(sector, row, mP[1], mP[2], mP[3], -1.f, 0.f, 0.f, err2Y, err2Z); // TODO: Use correct time/avgCharge
445+
438446
const float kFactor = tracker.GetChiSeedFactor();
439447
const float sy2 = 4 * CAMath::Min(param.rec.tpc.hitSearchArea2, kFactor * (err2Y + CAMath::Abs(mC[0]))); // TODO: is 4 a good factor??
440448
const float sz2 = 4 * CAMath::Min(param.rec.tpc.hitSearchArea2, kFactor * (err2Z + CAMath::Abs(mC[2])));

0 commit comments

Comments
 (0)