Add BIB hit flagging in CaloHitPrep, options to exclude from clustering steps, recovery algorithm to re-associate - #43
Draft
trholmes wants to merge 3 commits into
Draft
Conversation
Flags calo hits whose neighbourhood EM energy density (self-excluded, same transverse-cylinder scheme as the isolation flag) falls below a per-pseudolayer cut, loaded from per-subdetector/region cuts files (BIBCutsFileECalBarrel etc.; a subdetector/region without a file is disabled). Optional timing window cut (BIBTimingCutEnabled, default off). Requires PandoraSDK with the isPossibleBIB calo hit metadata flag. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rithms ConeClustering, ForcedClustering, IsolatedHitMerging (both loops) and MuonReconstruction can skip hits flagged isPossibleBIB (default off). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Re-attaches flagged, available hits as isolated hits to clusters they are locally continuous with (>= MinClusterNeighbours member hits in the same 25 mm / +-2 layer cylinder as the flag definition), gated on host quality (track association or MinHostClusterEnergy), the host layer span, and optionally hit-time compatibility (TimingCutEnabled, default off). Attached hits never become members, so recovery cannot chain across a BIB carpet. KD-tree over member hits keeps the cost linear in flagged hits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Sep 3, 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.
This commit makes it possible to flag potential beam-induced background at the CaloHitPreparation stage, and exclude those flagged hits from downstream clustering algorithms. It also adds a BIB re-association algorithm. Structures take inspiration from the MIP flagging and isolation calculations already present in the clustering workflow. Everything is off by default.
The current algorithm flags hits based on nearby density (essentially replicating the algorithm used for isolated noise hits but weighting by energy of hits). The flag itself is configured as a per-layer configurable cut on nearby energy density, and parameters of the definition of "nearby" mimic what was done for isolated hits.
The new BIBHitMergingAlgorithm allows re-association of these hits, with requirements on the host cluster (minimum energy/track requirement), and on continuity with the original cluster.
In MAIA (10 TeV muon collider detector), this results in a nearly order-of-magnitude decrease in clustering time in the endcaps, and much more modest gains in the barrel (where the solenoid provides shielding).
This commit depends on isPossibleBIB metadata added in PandoraPFA/SDK#37:
PandoraPFAOrg/PandoraSDK#37
(marked as draft until it's merged)