Skip to content

Conversation

@Marcellocosti
Copy link
Contributor

@Marcellocosti Marcellocosti commented May 30, 2025

In this PR, the matching for the study of the correlated background decays implemented in the linked configuration script is implemented for 2-prong and 3-prong candidates both at reco and at gen level.

By now I keep the PR in draft mode as there are several debug prints for the checks on the matching I am performing and because I will need to digest the rearrangement of the MC flags proposed in the PR #11382 when merged. Nevertheless, a feedback on the general structure is more than welcome. Tagging @stefanopolitano for info.

The modifications to the D0 and D+ trees are for testing purposes.

@github-actions
Copy link

github-actions bot commented Jun 7, 2025

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

@Marcellocosti Marcellocosti force-pushed the corr_bkg branch 2 times, most recently from 1c6ef78 to c24e94d Compare June 9, 2025 15:05
@mfaggin
Copy link
Collaborator

mfaggin commented Jun 10, 2025

ciao @Marcellocosti thanks a lot for this important development. I had a look at it and I tried to understand the logic you want to implement. I have left some comments here and there to understand if I get exactly what you mean, please let me know what you think.

Marcellocosti added a commit to Marcellocosti/O2Physics that referenced this pull request Jun 10, 2025
Please consider the following formatting changes to AliceO2Group#11418
Please consider the following formatting changes to AliceO2Group#11418
@Marcellocosti Marcellocosti marked this pull request as ready for review June 17, 2025 21:17
Please consider the following formatting changes to AliceO2Group#11418
@Marcellocosti
Copy link
Contributor Author

Dear @vkucera, I implemented your comments and also changed the handling of the Dstar matching for the reconstructed to be similar to the generated candidates. Please let me know if I missed something!

Copy link
Collaborator

@vkucera vkucera left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Marcellocosti for the great work!

@vkucera vkucera enabled auto-merge (squash) June 18, 2025 19:57
@vkucera vkucera merged commit a832ad8 into AliceO2Group:master Jun 18, 2025
12 of 13 checks passed
@Marcellocosti Marcellocosti deleted the corr_bkg branch June 19, 2025 07:07
prottayCMT pushed a commit to prottayCMT/O2Physics2024 that referenced this pull request Jun 20, 2025
jpxrk pushed a commit to jpxrk/O2Physics that referenced this pull request Jul 16, 2025
if (indexRec > -1) {
flag = sign * (isDplus ? DecayChannelMain::DplusToPiKK : DecayChannelMain::DsToPiKK);
if (arrayDaughters[0].has_mcParticle()) {
swapping = int8_t(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Dear @Marcellocosti (all code owners cc), shouldn't it be kKPlus instead of kPiPlus here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor

Choose a reason for hiding this comment

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

Since the decay is $\pi KK$, so swapped means $KK\pi$, i.e. the 0-th daughter pdg code should be kaon's. Compare to $pK\pi$ decay here - there is comparison to pion's pdg code since it is the last in the original, non-swapped order.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But the expected order is defined as KKPi here in:

auto arrPdgDaughtersDToPiKK{std::array{+kKPlus, -kKPlus, +kPiPlus}};

Copy link
Contributor

Choose a reason for hiding this comment

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

But the expected order is defined as KKPi here in:

auto arrPdgDaughtersDToPiKK{std::array{+kKPlus, -kKPlus, +kPiPlus}};

Indeed, if the $K^+K^-\pi^+$ order is assumed as default (= expected), then the definition of swapped goes other way around, and the code is correct in terms of logic.
But is there any reason to define the expected order of prongs different from how they appear in the dedicated enum and its comment (link)? The way how it is implemented now requires checking the source code deeply (line which you quote), while the enum hints another expected order (very intuitive but wrong).

Copy link
Contributor

Choose a reason for hiding this comment

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

@vkucera, no, I think that the arrPdgDaughtersDToPiKK in this context is not responsible for definition of expected order (?) What is really responsible is the r.h.s. of the
swapping = int8_t(std::abs(arrayDaughters[0].mcParticle().pdgCode()) == kPiPlus);
comparison, since precisely this line defines whether swapping flag will be 0 or 1.

jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants