Skip to content

[PWGHF] Fix PID assignment in Xic0 and Omegac0 candidate creator#16352

Draft
mtorresc15 wants to merge 2 commits into
AliceO2Group:masterfrom
mtorresc15:master
Draft

[PWGHF] Fix PID assignment in Xic0 and Omegac0 candidate creator#16352
mtorresc15 wants to merge 2 commits into
AliceO2Group:masterfrom
mtorresc15:master

Conversation

@mtorresc15
Copy link
Copy Markdown
Contributor

@mtorresc15 mtorresc15 commented May 22, 2026

This PR fixes the PID assignment passed to getTrackParCovFromKFP() in candidateCreatorXic0Omegac0.cxx.

KFParticle::GetPDG() returns a PDG code, while getTrackParCovFromKFP() expects an o2::track::PID enum. This PR adds a helper function to convert the PDG code to the corresponding PID enum before calling getTrackParCovFromKFP().

@fcatalan92 @jinhyunni

@github-actions
Copy link
Copy Markdown

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

@github-actions github-actions Bot changed the title Fix PID assignment in Xic0 and Omegac0 candidate creator [PWGHF] Fix PID assignment in Xic0 and Omegac0 candidate creator May 22, 2026
@mtorresc15 mtorresc15 marked this pull request as draft May 22, 2026 16:48
};

// Convert the KFParticle PDG code to the O2 track PID enum needed by getTrackParCovFromKFP()
o2::track::PID::ID getTrackPIDFromPDG(const int pdg)
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.

There is no way this conversion does not exist in some common utilities yet.

Comment on lines +103 to +106
case 211:
return o2::track::PID::Pion;
case 321:
return o2::track::PID::Kaon;
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.

Don't use magic numbers.

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.

3 participants