This repository was archived by the owner on Aug 31, 2026. It is now read-only.
Add entry-level BIB overlay - #20
Closed
henrygreenhut wants to merge 3 commits into
Closed
Conversation
|
Thanks for preparing this @henrygreenhut. FYI we'll have to take this apart and move it to k4FWcore, where the overlay algorithms now live. In particular, in the spirit of key4hep/k4FWCore#413, if possible we should also try to implement this functionality onto OverlayTiming, to reduce the proliferation of overlay algorithms largely doing duplicated actions. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Motivation: This change is motivated by MuonColliderSoft/MAIAConfig#36 to add the ability to overlay BIB decays that contain muons separately from the rest of the BIB. To be done efficiently, this requires the ability to overlay BIB from edm4hep files that contain multiple podio event entries. The current 'OverlayTimingRandomMix' component can only overlay one event per file, and cannot sample events with replacement.
Summary: This PR adds OverlayTimingRandomEntryMix, a separate BIB overlay component that has the capability to sample a specific number of individual BIB decay events, rather than treating each file as one unit to sample. The existing 'OverlayTimingRandomMix' component is unchanged.
Design:
OverlayTimingRandomEntryMixhas predominantly the same structure and function asOverlayTimingRandomMix, retaining the timing-window and hit-merging behavior. However, it supports:Providing BIB decays containing muons as separate BackgroundFileNames groups allows their multiplicity to be controlled independently, as described in MuonColliderSoft/MAIAConfig#36.
For BIB samples with multiple decay events per file, a podio reader exposes all event entries in the group for sampling.
Groups configured with
OneEntryPerFileinstead sample filenames directly and read entry zero from the selected file, as 'OverlayTimingRandomMix' does. This avoids opening every file when constructing a multi-file event inventory.Performance:
I performed a 200-event particle gun comparison between
OverlayTimingRandomEntryMixandOverlayTimingRandomMix, overlaying the BIB of 10/1667 of a bunch crossing. The average DIGI time per event forOverlayTimingRandomMixoverlay was 20.78 seconds. The average DIGI time per event withOverlayTimingRandomEntryMixoverlay and muons sampled separately was 20.71 seconds.