Occupancy Plots to include slim edge sensors - #1178
Open
mgignac wants to merge 1 commit into
Open
Conversation
…, untested thus far
mgignac
marked this pull request as ready for review
August 13, 2026 15:10
bloodyyugo
approved these changes
Aug 13, 2026
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.
OccupancyPlots threw ClassCastException on 2019+ geometries because createStripPositionMap hard-cast readout electrodes to SiStrips over a hardcoded 640 channels, while layer 0 uses SiStriplets. This casts to the SiSensorElectrodes interface instead, sizes all arrays from sensor.getNumberOfChannels() (639 for strip sensors, 510 for striplets), takes the layer count in endOfData() from the geometry rather than assuming 6, and guards every fill site with isValidChannel(), since raw hits legitimately carry the unbonded channel one past the last readout channel. Occupancy-vs-position is now booked per readout column -- one plot for a strip sensor, two for a striplet sensor -- so the channel-to-position mapping stays one-to-one within each plot; sensors with a single column keep their original histogram names byte-for-byte, leaving pre-L0 output unchanged. Verified end-to-end on run 14185 (2021, L0) over 10k events across all 40 sensors.
Occupancy plots:
hps_014185.00239_10k_plots_stripoccupancy.pdf
hps_014185.00239_10k_plots_clusteroccupancy.pdf