Fix Stage-1 TC decoding for ECON-T ID 10 - #211
Open
jniedzie wants to merge 1 commit into
Open
Conversation
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.
PR description:
This PR is proposed to fix Stage-1 trigger-cell decoding for P5 data. The unpacker previously assumed that ECON-T ID 10 always represented the second SiPM tile and unconditionally applied the tile offset. In P5 data, this ID can belong to a silicon module, causing incorrect and potentially out-of-bounds reads.
The offset is now applied only when the mapped module is actually a SiPM tile, with an additional bounds check. The Stage-1 buffer is also value-initialized to ensure deterministic behavior when TX words are unavailable.
PR validation:
The PR is a consequence of HGCAL DQM developments, where the old code was replaced by factorized DQM Client plugins. The command used to test the original code is the following:
cmsRun -j FrameworkJobReport_RAW2DIGI.xml \ $CMSSW_BASE/src/HGCalCommissioning/Configuration/test/step_RAW2NANODQM.py \ run=115509 lumi=1 era=P5/v4 \ daqSourceMode=DTH sourceIdentifier=source \ buBaseDirsNumStreams=3 buBaseDirsStreamIDs=2100,2101,2102 \ overrideRangeLS=1,1 \ files=/eos/cms/store/group/dpg_hgcal/tb_hgcal/2025/DTHP2/run115509 \ inputTrigFiles=None \ yamls="{}" \ output=NANO.root maxEvents=200 \ skipRecHits=1 \ enableTPGunpacker=1 \ secondaryOutput=RAW2RECO.root skipLC=True