Skip to content

FIX: Read ASIC polarities by DIB ID, but apply by Detector ID - #235

Draft
fhagemann wants to merge 2 commits into
cositools:develop/emfrom
fhagemann:fix/asic-polarities
Draft

fhagemann wants to merge 2 commits into
cositools:develop/emfrom
fhagemann:fix/asic-polarities

Conversation

@fhagemann

@fhagemann fhagemann commented Oct 12, 2026 •

Copy link
Copy Markdown

Follow-up of #229:

This one was a hard one to debug:
When assigning strip to HV or LV side, the nuclearizer code checks for ASIC polarity in the JSON config (if it exists).
The current implementation was fault in assuming that the ASIC polarities where sorted by detector ID, whereas they are actually sorted by DIB ID in the JSON config.

As the FM payload has a polarity flip in Q0L1 (Detector ID 1), which is DIB ID 9, the current code was seeing a polarity for Q0L1 (DIB 9), but actually applying it to Q2L1 (Detector ID 9), which messed up the HV/LV strip assignment for those two detectors. This should be fixed now.

Marking this as draft, because @robin4730 is running a lot of energy calibrations (that would be flipping HV and LV sides for Detectors Q0L1 and Q2L1), and we want to make sure we make this update once we have either corrected or deleted every "faulty" ecal file generated so far.

The current code was assuming that the ASIC polarities are sorted by Detector ID,
but they are actually sorted by DIB ID in the JSON config.
@fhagemann fhagemann added the bug Something isn't working label Oct 12, 2026
@fhagemann
fhagemann marked this pull request as draft October 12, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant