Skip to content

[PWGCF,PWGHF] Split kaon DCA secondary templates into HF and LF - #18481

Merged
fgrosa merged 4 commits into
AliceO2Group:masterfrom
FDUEnrich:master
Nov 2, 2026
Merged

fgrosa merged 4 commits into
AliceO2Group:masterfrom
FDUEnrich:master

Conversation

@FDUEnrich

@FDUEnrich FDUEnrich commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Separate kaon MC DCAxy templates into HF and LF using RecoDecay::getParticleOrigin. Include Omega contributions in LF; leave other particle classifications unchanged.

FDUEnrich and others added 2 commits October 27, 2026 16:26
Follow RecoDecay::getParticleOrigin with its default arguments and classify nonzero origins as HF, as suggested by Fabrizio. Remove the custom PDG and ancestry helpers without changing the remaining origin routing.

Co-authored-by: Fabrizio Grosa <[email protected]>
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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

@FDUEnrich
FDUEnrich requested a review from jaelpark as a code owner October 27, 2026 18:23
xinyepeng
xinyepeng previously approved these changes Oct 28, 2026
@xinyepeng
xinyepeng enabled auto-merge (squash) October 28, 2026 00:46
Comment thread PWGCF/FemtoDream/Core/femtoDreamUtils.h Outdated

/// Classify true kaons from the correct collision for the DCA templates.
template <typename T>
inline int getKaonOrigin(T const& particles, typename T::iterator const& particle)

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.

This function is used only y HF. Would it be possible to move this template to the HF charm producer instead of implementing it here?

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.

Hi @lauraser it is fine to move it to the HF producer, but you should consider to use it also for other analyses, as the fraction of kaons from HF decays is about 5% so not totally negligible, and in other femto analyses they were always considered primaries, but they are not (as they are produced micrometers away from the interaction point)

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.

Hi, Laura. I've modified according to your request. Could you please have a look?

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.

Hi, thanks a lot for the explanation @fgrosa ! I would like to ask @FDUEnrich to present this in more detail in femto PAG when possible, and then we could discuss the implications for other analyses as well. Thanks a lot!

auto-merge was automatically disabled November 2, 2026 10:57

Head branch was pushed to by a user without write access

@lauraser
lauraser enabled auto-merge (squash) November 2, 2026 12:53
@fgrosa
fgrosa disabled auto-merge November 2, 2026 15:04
@fgrosa
fgrosa merged commit 452c61a into AliceO2Group:master Nov 2, 2026
16 of 17 checks passed
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 2, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF and kSecondaryFromLF
- the phi chain (phi -> K0/K0bar -> K0s) is light-flavour feed-down and is filled
  as kSecondaryFromLF
- add RecoDecay::isDiquark and skip diquark states in RecoDecay::getParticleOrigin:
  their PDG codes (4101, 4201, 5101, ...) satisfy pdg / 1000 == 4 or 5 and would
  otherwise be taken as charm/beauty baryons
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 2, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF and kSecondaryFromLF
- add kSecondaryFromPhi: the phi chain (phi -> K0/K0bar -> K0s) is light-flavour
  feed-down, but it is kept as a separate class because the relatively long phi
  lifetime makes it a distinct source that should not be mixed with other
  light-flavour feed-down
- add RecoDecay::isDiquark and skip diquark states in RecoDecay::getParticleOrigin:
  their PDG codes (4101, 4201, 5101, ...) satisfy pdg / 1000 == 4 or 5 and would
  otherwise be taken as charm/beauty baryons
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 2, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF and kSecondaryFromLF
- add kSecondaryFromPhi: the phi chain (phi -> K0/K0bar -> K0s) is light-flavour
  feed-down, but it is kept as a separate class because the relatively long phi
  lifetime makes it a distinct source that should not be mixed with other
  light-flavour feed-down
- add RecoDecay::isDiquark and skip diquark states in RecoDecay::getParticleOrigin:
  their PDG codes (4101, 4201, 5101, ...) satisfy pdg / 1000 == 4 or 5 and would
  otherwise be taken as charm/beauty baryons
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 3, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF, kSecondaryFromLF and kSecondaryFromPhi
- add kSecondaryFromPhi: the phi chain (phi -> K0/K0bar -> K0s) is light-flavour
  feed-down, but it is kept as a separate class because the relatively long phi
  lifetime makes it a distinct source
- RecoDecay::getParticleOrigin now stops the mother walk (break) as soon as a parton
  or a diquark is reached: no heavy-flavour hadron can be found above the partonic
  level, and diquark PDG codes (4101, 4201, 5101, ...) satisfy pdg / 1000 == 4 or 5
  and were otherwise misidentified as charm/beauty baryons (RecoDecay::isDiquark is
  added for that); the parton stop follows the !searchUpToQuark idiom of getMother()
  so that the search-up-to-quark mode still reaches the charm and beauty quarks
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 3, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF, kSecondaryFromLF and kSecondaryFromPhi
- add kSecondaryFromPhi: the phi chain (phi -> K0/K0bar -> K0s) is light-flavour
  feed-down, but it is kept as a separate class because the relatively long phi
  lifetime makes it a distinct source
- RecoDecay::getParticleOrigin now stops the mother walk (break) as soon as a parton
  or a diquark is reached: no heavy-flavour hadron can be found above the partonic
  level, and diquark PDG codes (4101, 4201, 5101, ...) satisfy pdg / 1000 == 4 or 5
  and were otherwise misidentified as charm/beauty baryons; the parton stop follows
  the !searchUpToQuark idiom of getMother() so that the search-up-to-quark mode still
  reaches the charm and beauty quarks
- add RecoDecay::isDiquark() and PdgDiquarkSpin0Code/PdgDiquarkSpin1Code, built from
  the existing PDG constants and divisors (no literal PDG codes)
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Alascraker pushed a commit to Alascraker/O2Physics that referenced this pull request Nov 3, 2026
- reuse RecoDecay::getParticleOrigin (as done in AliceO2Group#18481) instead of an ad-hoc
  first-digit PDG scan, so the V0 origin is filled with kPrimary, kMaterial,
  kSecondaryFromHF, kSecondaryFromLF and kSecondaryFromPhi
- add kSecondaryFromPhi: the phi chain (phi -> K0/K0bar -> K0s) is light-flavour
  feed-down, but it is kept as a separate class because the relatively long phi
  lifetime makes it a distinct source
- RecoDecay::getParticleOrigin now stops the mother walk (break) in the hadron-level
  mode as soon as a parton or a diquark is reached: no heavy-flavour hadron can be
  found above the partonic level, and diquark PDG codes (4101, 4201, 5101, ...)
  satisfy pdg / 1000 == 4 or 5 and were otherwise misidentified as charm/beauty
  baryons; in the parton-level mode (searchUpToQuark) the walk still goes through
  diquarks, since a charm or beauty quark can be found above them
- add RecoDecay::isDiquark() and PdgDiquarkSpin0Code/PdgDiquarkSpin1Code, built from
  the existing PDG constants and divisors (no literal PDG codes)
- use o2::constants::physics::Pdg::kPhi and kK0 instead of literal PDG codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants