Commit 19c62a8
Do not encode a label for a signal without an MC particle
This fixes a problem in MCCompLabel and adds a unit test.
- A hit whose track was pruned carries trackID -1, and the constructor encoded
that into the 31 bit track field.
- Decoding then gave trackID 2147483647 with isValid() true, so the label
looked like a correctly identified particle.
- The constructor now leaves the label unset for a negative trackID, which is
the state a decoder already handles.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 9ee36c5 commit 19c62a8
2 files changed
Lines changed: 15 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
0 commit comments