Commit 6b2fd4d
Do not offset an invalid track index when merging sub-events
This fixes a problem in the sub-event merging and adds a unit test.
- Merging offsets every track index, and the offset was applied
unconditionally.
- An index already flagged invalid therefore came out as offset - 1 and
pointed at an unrelated track.
- The MCTrack mother index in O2HitMerger has always guarded against this,
hits and track references did not.
- Both now use Detector::offsetTrackIndex, which leaves a negative index alone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 726cbee commit 6b2fd4d
3 files changed
Lines changed: 24 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
174 | 185 | | |
175 | 186 | | |
176 | 187 | | |
| |||
398 | 409 | | |
399 | 410 | | |
400 | 411 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 412 | + | |
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
| |||
465 | 473 | | |
466 | 474 | | |
467 | 475 | | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
| 476 | + | |
472 | 477 | | |
473 | 478 | | |
474 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
630 | | - | |
631 | | - | |
632 | | - | |
| 630 | + | |
633 | 631 | | |
634 | 632 | | |
635 | 633 | | |
| |||
0 commit comments