Skip to content

Commit 5c6ec09

Browse files
committed
GPU TPC: If value from other side of interpolation not stored, use only current value
1 parent 6d8ea57 commit 5c6ec09

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ AddOptionRTC(rejectEdgeClustersMargin, float, 0.f, "", 0, "Margin in cm of Y pos
108108
AddOptionRTC(rejectEdgeClustersSigmaMargin, float, 0.f, "", 0, "Margin factor for trackSigmaY when rejecting edge clusters based on uncorrected track Y")
109109
AddOptionRTC(trackletMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for tracklet")
110110
AddOptionRTC(trackletMinSharedNormFactor, float, 0.f, "", 0, "Max shared defined as trackletMinSharedNormFactor*max(current_nhits,trackletMinSharedNormFactor*minHits,1)")
111+
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
112+
AddOptionRTC(rebuildTrackMaxNonIntCov, float, 4.f, "", 0, "Max Err2 allowed for non-interpolated cluster attachment during rebuild")
111113
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)")
112114
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)")
113115
AddOptionRTC(noisyPadSaturationThreshold, uint16_t, 700, "", 0, "Threshold where a timebin is considered saturated, disabling the noisy pad check for that pad")
@@ -139,7 +141,6 @@ AddOptionRTC(cfEdgeTwoPads, uint8_t, 0, "", 0, "Flag clusters with peak on the 2
139141
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger (must be odd to end with inward fit)")
140142
AddOptionRTC(rebuildTrackInFit, uint8_t, 1, "", 0, "Rebuild track completely during fit based on clusters closed to interpolated track positions")
141143
AddOptionRTC(rebuildTrackInFitClusterCandidates, uint8_t, 3, "", 0, "Number of cluster candidates per row for rebuilt track")
142-
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
143144
AddOptionRTC(trackFitRejectMode, int8_t, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits")
144145
AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit")
145146
AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128")

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

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

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

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

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

0 commit comments

Comments
 (0)