Skip to content

Commit bfac7fc

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

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
@@ -105,6 +105,8 @@ AddOptionRTC(rejectEdgeClustersMargin, float, 0.f, "", 0, "Margin in cm of Y pos
105105
AddOptionRTC(rejectEdgeClustersSigmaMargin, float, 0.f, "", 0, "Margin factor for trackSigmaY when rejecting edge clusters based on uncorrected track Y")
106106
AddOptionRTC(trackletMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for tracklet")
107107
AddOptionRTC(trackletMinSharedNormFactor, float, 0.f, "", 0, "Max shared defined as trackletMinSharedNormFactor*max(current_nhits,trackletMinSharedNormFactor*minHits,1)")
108+
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
109+
AddOptionRTC(rebuildTrackMaxNonIntCov, float, 4.f, "", 0, "Max Err2 allowed for non-interpolated cluster attachment during rebuild")
108110
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)")
109111
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)")
110112
AddOptionRTC(noisyPadSaturationThreshold, uint16_t, 700, "", 0, "Threshold where a timebin is considered saturated, disabling the noisy pad check for that pad")
@@ -136,7 +138,6 @@ AddOptionRTC(cfEdgeTwoPads, uint8_t, 0, "", 0, "Flag clusters with peak on the 2
136138
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger (must be odd to end with inward fit)")
137139
AddOptionRTC(rebuildTrackInFit, uint8_t, 1, "", 0, "Rebuild track completely during fit based on clusters closed to interpolated track positions")
138140
AddOptionRTC(rebuildTrackInFitClusterCandidates, uint8_t, 3, "", 0, "Number of cluster candidates per row for rebuilt track")
139-
AddOptionRTC(rebuildTrackMaxSharedFraction, float, 0.1f, "", 0, "Max fraction of shared clusters for rebuilt tracks")
140141
AddOptionRTC(trackFitRejectMode, int8_t, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits")
141142
AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit")
142143
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
@@ -412,27 +412,32 @@ GPUdii() float GPUTPCGMTrackParam::FindBestInterpolatedHit(GPUTPCGMMerger& GPUre
412412
GPUglobalref() const cahit2* hits = tracker.HitData(rowData);
413413
GPUglobalref() const calink* firsthit = tracker.FirstHitInBin(rowData);
414414
float uncorrectedY = -1e6f, uncorrectedZ;
415-
if (rowData.NHits() && inter.errorY >= (GPUCA_PAR_MERGER_INTERPOLATION_ERROR_TYPE_A)0) {
415+
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))) {
416416
const float zOffset = param.par.continuousTracking ? merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convVertexTimeToZOffset(sector, mTOffset, param.continuousMaxTimeBin) : 0;
417417
const float y0 = rowData.Grid().YMin();
418418
const float stepY = rowData.HstepY();
419419
const float z0 = rowData.Grid().ZMin() - zOffset; // We can use our own ZOffset, since this is only used temporarily anyway
420420
const float stepZ = rowData.HstepZ();
421421
int32_t bin, ny, nz;
422422

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

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

@@ -441,6 +446,9 @@ GPUdii() float GPUTPCGMTrackParam::FindBestInterpolatedHit(GPUTPCGMMerger& GPUre
441446
nCandidates++;
442447
}
443448
if (CAMath::Abs(uncorrectedY) <= rowData.getTPCMaxY()) {
449+
float err2Y, err2Z;
450+
param.GetClusterErrors2(sector, row, mP[1], mP[2], mP[3], -1.f, 0.f, 0.f, err2Y, err2Z); // TODO: Use correct time/avgCharge
451+
444452
const float kFactor = tracker.GetChiSeedFactor();
445453
const float sy2 = 4 * CAMath::Min(param.rec.tpc.hitSearchArea2, kFactor * (err2Y + CAMath::Abs(mC[0]))); // TODO: is 4 a good factor??
446454
const float sz2 = 4 * CAMath::Min(param.rec.tpc.hitSearchArea2, kFactor * (err2Z + CAMath::Abs(mC[2])));

0 commit comments

Comments
 (0)