Repository navigation
TPC SCD: explicit spline knots for createFromTrackResiduals - #16114
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 spline knots of the FastTransform built from a voxel map were fixed to a knot at every second voxel bin, counted from both ends. With a non-uniform y/x binning (e.g. bins refined at the sector edges and at the sector centre) this skips knots in the refined bins, where the map is steepest, and with an even number of bins the two central bins get no knot at all (48 y/x bins refined at the centre: the FastTransform deviates from the map by up to ~0.4 mm there). TPCFastSpaceChargeCorrectionHelper::setY2XKnots / setZ2XKnots take the knot positions explicitly, in the coordinate of the voxel binning (y/x scaled to -1..1, z/x to 0..1, as the bin boundaries given to TrackResiduals::setY2XBinning / setZ2XBinning). A row's spline spans its first to its last voxel bin centre, so these two are always knots; knots outside them are dropped with a warning, as are knots closer than half the narrowest voxel bin to their neighbouring knot (the knots are put on an integer grid with 1/10 of the smallest knot distance as step and the spline stores one table entry per grid step, so nearly coinciding knots would make the correction object arbitrarily large). A knot interval without any voxel centre is reported. Without explicit knots (default) the previous rule is used unchanged. TPCFastTransformInit.C / TPCFastTransformInitCPM.C: optional arguments y2xKnots / z2xKnots (comma-separated); if empty, the user info "y2xKnots" / "z2xKnots" of the input voxel tree is used, so a map can carry its knots next to its binning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
matthias-kleiner
requested review from
davidrohr,
sgorbuno,
shahor02 and
wiechula
as code owners
November 12, 2026 14:33
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 spline knots of the FastTransform built from a voxel map were fixed to a knot at every second voxel bin, counted from both ends. With a non-uniform y/x binning (e.g. bins refined at the sector edges and at the sector centre) this skips knots in the refined bins, where the map is steepest, and with an even number of bins the two central bins get no knot at all (48 y/x bins refined at the centre: the FastTransform deviates from the map by up to ~0.4 mm there).
TPCFastSpaceChargeCorrectionHelper::setY2XKnots / setZ2XKnots take the knot positions explicitly, in the coordinate of the voxel binning (y/x scaled to -1..1, z/x to 0..1, as the bin boundaries given to TrackResiduals::setY2XBinning / setZ2XBinning). A row's spline spans its first to its last voxel bin centre, so these two are always knots; knots outside them are dropped with a warning, as are knots closer than half the narrowest voxel bin to their neighbouring knot (the knots are put on an integer grid with 1/10 of the smallest knot distance as step and the spline stores one table entry per grid step, so nearly coinciding knots would make the correction object arbitrarily large). A knot interval without any voxel centre is reported. Without explicit knots (default) the previous rule is used unchanged.
TPCFastTransformInit.C / TPCFastTransformInitCPM.C: optional arguments y2xKnots / z2xKnots (comma-separated); if empty, the user info "y2xKnots" / "z2xKnots" of the input voxel tree is used, so a map can carry its knots next to its binning.