Repository navigation
Commit f390389
TPC: fix the weight scaling of the mixed spline derivative in addCorrections
TPCFastSpaceChargeCorrectionHelper::addCorrections scaled the 4th parameter of each spline knot (the mixed derivative d2S/dudv)
with the square of the weight: secMainScale * secMainScale for the main correction, ls * ls * ... for the added ones (ls is the
weight times the z fade-out factor, 1 at the knots). A spline is linear in its parameters, so scaling the correction by w scales all
of them by w.
The correction was therefore right at the knots but wrong between them whenever a weight != 1 was used, e.g. the derivative map
added with weight lumiScale in TPCScalerSpec::buildMap. The error is proportional to w - w^2. Measured with a production map and
the derivative map of run 568041 (random points, vs the weighted point-by-point sum of getCorrectionLocal and of the inverse
getters), for map + 0.13 x derivative: rms ~20 um in dx and dz, ~10 um without the first 10 pad rows; deviations above 100 um are
rare (0.4 % of the points) and lie mostly in the first pad rows. At a weight of -0.5 the rms is ~150 um (~60 um without the first
10 pad rows). With the fix the sum is exact to float precision (< 0.1 um) for weights from -1 to 1.5, inverse corrections
included; w = 1 is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1ddf4d9 commit f390389
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
| 1062 | + | |
| 1063 | + | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| |||
1116 | 1117 | | |
1117 | 1118 | | |
1118 | 1119 | | |
1119 | | - | |
| 1120 | + | |
1120 | 1121 | | |
1121 | 1122 | | |
1122 | 1123 | | |
| |||
1132 | 1133 | | |
1133 | 1134 | | |
1134 | 1135 | | |
1135 | | - | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
| |||
0 commit comments