Skip to content

Added runtime user hook for triggered events to LambdaB gen - #2461

Open
jackal1-66 wants to merge 1 commit into
AliceO2Group:masterfrom
jackal1-66:lambdabfix
Open

jackal1-66 wants to merge 1 commit into
AliceO2Group:masterfrom
jackal1-66:lambdabfix

Conversation

@jackal1-66

@jackal1-66 jackal1-66 commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

GeneratorHFTrigger_LambdaBToDeuteron.ini ran usually for >24h on
the GRID and got killed on TTL.
generator_pythia8_hfhadron_to_nuclei.C trigger branch retries Pythia8
event generation indefinitely until the requested b-hadron turns up at midrapidity. The underlying .cfg
uses plain SoftQCD:inelastic with no production bias, so on unbiased
minimum-bias QCD the number of full hadronizations needed per trigger
event was measured at mean ~800 retries, up to 2928 observed in a 10-event sample.
A production job needs thousands of trigger events, so any single one
drawing a bad statistical fluctuation can stall the job for hours with
no error and no log output - looking indistinguishable from a hang.
So, this solution biases parton-level generation towards bbbar production at midrapidity
via a Pythia8 UserHooks veto (reusing UserHooks_qqbar, already used by
the standard beauty gap-triggered HF generator), so non-bbbar attempts
are rejected before the hadronization step runs. This drops
the mean retries needed per trigger event by ~2 orders of magnitude.
The bias is toggled via the new UserHooks_qqbar::setActive() around generateEvent()'s retry loop, since it
must not run during the minimum-bias branch, but only for the triggered events.
The issue was spotted in https://its.cern.ch/jira/browse/O2-7169

@jackal1-66
jackal1-66 requested a review from a team as a code owner September 14, 2026 12:19
@github-actions

Copy link
Copy Markdown

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@jackal1-66 jackal1-66 changed the title Added runtime user hook for triggered events Added runtime user hook for triggered events to LambdaB gen Sep 14, 2026
@jackal1-66
jackal1-66 requested a lite review from Copilot September 14, 2026 12:24
@jackal1-66

Copy link
Copy Markdown
Collaborator Author

Tagging @MRazza879 for a review on this as well

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Involuntary requested review. - Marco

@alcaliva
alcaliva enabled auto-merge (squash) September 14, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants