Skip to content

Conversation

@stefanopolitano
Copy link
Collaborator

This PR adds the possibility to select the rapidity range of V0s in the correlation function

@github-actions github-actions bot added the pwgcf label Jul 23, 2025
@github-actions
Copy link

github-actions bot commented Jul 23, 2025

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

Please consider the following formatting changes to AliceO2Group#12210
@stefanopolitano stefanopolitano changed the title [PWGCF] Adding selection on V0 rapidity in cf correlation function [PWGCF] Adding selection on V0 rapidity in cf correlation Jul 23, 2025
@stefanopolitano stefanopolitano marked this pull request as ready for review July 23, 2025 17:05
Copy link
Collaborator

@victor-gonzalez victor-gonzalez left a comment

Choose a reason for hiding this comment

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

I would suggest following linter recommendations specially the one regarding prefixing with std::
abs alone is an error

@stefanopolitano
Copy link
Collaborator Author

Hi @victor-gonzalez ! Thanks for your comment, I implemented the suggestion from the linter regarding this PR. Let me know if there are further comments/suggestions

@victor-gonzalez victor-gonzalez enabled auto-merge (squash) July 25, 2025 07:48
@victor-gonzalez victor-gonzalez merged commit 6aea84f into AliceO2Group:master Jul 25, 2025
12 of 13 checks passed
if (cfgDecayParticleMask != 0 && (cfgDecayParticleMask & (1u << static_cast<uint32_t>(track1.decay()))) == 0u) {
continue; // skip particles that do not match the decay mask
}
if (cfgV0RapidityMax > 0 && std::abs(getV0Rapidity(track1)) > cfgV0RapidityMax) {
Copy link
Collaborator

@jaelpark jaelpark Jul 31, 2025

Choose a reason for hiding this comment

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

Hi @stefanopolitano, I think this line is buggy, because for unidentified types it returns -999, but your abs makes it always larger than your default cfgV0RapidityMax, which is 0.8 by default. This rejects all D0s, for example. Perhaps the default should be negative?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @jaelpark! Indeed, this cut was not ment for D0s since the rapidity cut is typically applied at the skimming/task level, but only for LF V0s. I can change the default value to avoid misunderstanding, although one can always set the configuration value to 0 to switch the selection off

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks. I think we shouldn't let new users of the D0 code be confused why everything is rejected. Another option is to return two values (std::tuple<float, bool>) from getV0Rapidity to indicate with a bool whether the selection applies.

jpxrk pushed a commit to jpxrk/O2Physics that referenced this pull request Aug 12, 2025
jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
alibuild added a commit to alibuild/O2Physics that referenced this pull request Dec 5, 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.

4 participants