Repository navigation
TPC SCD: initInverse fits the exact inverse correction - #16253
Open
matthias-kleiner wants to merge 1 commit into
Open
matthias-kleiner wants to merge 1 commit into
matthias-kleiner wants to merge 1 commit into
Conversation
The fast transform stores two corrections per pad row: the direct one, from the measured (distorted) cluster position to the corrected position, and the inverse one, from a corrected position back to where the cluster would have been measured. The tracker uses the inverse to search for clusters along a track and to decide whether a cluster is too close to the sector edge. So far the inverse was fitted to the points of the map grid shifted by the direct correction. Where the correction moves clusters away from a region, e.g. inward at the sector edges, parts of the inverse got no fit points at all and took arbitrary values: up to 1e7 cm for maps with fine knots at the sector edges, and up to 36 m in an official pp map. Now the fit points are placed on a regular grid of corrected positions, 10 per knot interval, so that every part of the map is covered. For each of them the measured position that the direct correction moves onto it is searched (a simple iteration, and Newton's method where the correction changes steeply); the correction found there is the value of the inverse. - Where no such measured position is found (close to places where the direct map folds over), the point takes the value of a nearby point. - Fit points whose measured position lies outside the map in the drift direction count only 1 % in the fit, because the inverse has a kink there. Fit points whose measured position lies outside the map at the sector edges count normally, because tracks near the sector boundary need the inverse there. The direct correction is not changed. A TODO in addCorrections notes that the inverse of several added maps is only approximated by the sum of their individual inverses. Effect on maps of PbPb run 568041 (error of the inverse, median / 99 %): a map with the standard knot grid (as the official maps) 9.1 / 185 -> 7.8 / 159 um, a map with fine knots at the sector edges 5.6 um / 1.6 cm -> 4.8 / 67 um. For maps with the standard knot grid the error gets somewhat larger beyond the end of their grid (|z|/x > ~1.4 in PbPb maps, ~1.0 in pp maps), where the correction is the value at the grid end scaled down to zero at the readout (median 38 -> 81 um in this map). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
matthias-kleiner
requested review from
davidrohr,
shahor02 and
wiechula
as code owners
December 1, 2026 18:40
shahor02
approved these changes
Dec 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fast transform stores two corrections per pad row: the direct one, from the measured (distorted) cluster position to the corrected position, and the inverse one, from a corrected position back to where the cluster would have been measured. The tracker uses the inverse to search for clusters along a track and to decide whether a cluster is too close to the sector edge.
So far the inverse was fitted to the points of the map grid shifted by the direct correction. Where the correction moves clusters away from a region, e.g. inward at the sector edges, parts of the inverse got no fit points at all and took arbitrary values: up to 1e7 cm for maps with fine knots at the sector edges, and up to 36 m in an official pp map.
Now the fit points are placed on a regular grid of corrected positions, 10 per knot interval, so that every part of the map is covered. For each of them the measured position that the direct correction moves onto it is searched (a simple iteration, and Newton's method where the correction changes steeply); the correction found there is the value of the inverse.
Effect on maps of PbPb run 568041 (error of the inverse, median / 99 %): a map with the standard knot grid (as the official maps) 9.1 / 185 -> 7.8 / 159 um, a map with fine knots at the sector edges 5.6 um / 1.6 cm -> 4.8 / 67 um. For maps with the standard knot grid the error gets somewhat larger beyond the end of their grid (|z|/x > ~1.4 in PbPb maps, ~1.0 in pp maps), where the correction is the value at the grid end scaled down to zero at the readout (median 38 -> 81 um in this map).
Written with Claude Opus 5.5; reviewed independently with Claude Opus 5.5 and Claude Fable 5.2.
🤖 Generated with Claude Code