Skip to content

[PWGHF] Correlated backgrounds in derived data creators - #18043

Merged
stefanopolitano merged 5 commits into
AliceO2Group:masterfrom
Marcellocosti:corr_bkgs
Sep 25, 2026
Merged

stefanopolitano merged 5 commits into
AliceO2Group:masterfrom
Marcellocosti:corr_bkgs

Conversation

@Marcellocosti

Copy link
Copy Markdown
Contributor

Follows the strategy currently adopted in tree creators

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 0 warnings, 🔕 0 disabled

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 2a8dcd2 at 2026-09-24 15:34:

No log files found

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 2a8dcd2 at 2026-09-24 15:34:

No log files found

Full log here.

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 2a8dcd2 at 2026-09-24 15:35:

No log files found

Full log here.


Filter filterSelectCandidates = (aod::hf_sel_candidate_dplus::isSelDplusToPiKPi & static_cast<int>(BIT(aod::SelectionStep::RecoMl - 1))) != 0; // select candidates which passed all cuts at least up to RecoMl - 1
Filter filterMcGenMatching = nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi);
Filter filterMcGenMatching = (nabs(aod::hf_cand_mc_flag::flagMcMatchGen) == static_cast<int8_t>(hf_decay::hf_cand_3prong::DecayChannelMain::DplusToPiKPi)) || (fillCorrelatedBkgs && aod::hf_cand_mc_flag::flagMcMatchGen != 0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is correct. It seems to me that this will select all flagged 3-prong-candidate decays, not just D+.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same applies to the rec. level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think that this is correct, i.e. one gets all candidates passing e.g. the Dplus selection but some of them come from correlated background sources which can be flagged and selected at the analysis level. Am I missing something?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Where do you reject all the other species (Ds, Lc, Dstar, Xic, cd)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I understood correctly, one should run the candidateCreator3Prong with createDplus only switched on. This way, one accepts only candidates reconstructed as D+ in the skimming. Some of these may stem from correlated bkgs and are tagged by the MC flags, but with different flag with respect to the signal. In order to access all sources, i just put the condition != 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, so when one wants to study the correlated backgrounds he can run the data creator with acceptCorrelatedBkgs=true and have access to both the true signal and the backgrounds using the same train. This way, one can compute ratios of number of reconstructed candidates with respect to the signals and can anchor the various sources without needing the generated information and full reconstruction efficiencies.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

OK, thanks for the clarification. I understand better now. But then, don't you need the same for the gen. level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As far as I know, it is currently not used in analysis. But I can add it back for consistency if you think it would be clearer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added the same implementation for the generated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks

Comment thread PWGHF/TableProducer/derivedDataCreatorD0ToKPi.cxx Outdated
@Marcellocosti

Copy link
Copy Markdown
Contributor Author

Hi @vkucera, I see that all checks are successful. If the logic of the implementation is clarified, would it be possible to proceed with the merge? Thanks in advance!

@stefanopolitano
stefanopolitano enabled auto-merge (squash) September 25, 2026 19:16
@stefanopolitano
stefanopolitano merged commit 305fb17 into AliceO2Group:master Sep 25, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

4 participants