Skip to content

[PWGHF] trackIndexSkimCreator: Avoid computing the pVector of bachelor1 in the inner loop#16569

Open
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16569
Open

[PWGHF] trackIndexSkimCreator: Avoid computing the pVector of bachelor1 in the inner loop#16569
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr16569

Conversation

@ktf
Copy link
Copy Markdown
Member

@ktf ktf commented Jun 8, 2026

No description provided.

@github-actions github-actions Bot added the pwghf PWG-HF label Jun 8, 2026
@github-actions github-actions Bot changed the title Avoid computing the pVector of bachelor1 in the inner loop. [PWGHF] Avoid computing the pVector of bachelor1 in the inner loop. Jun 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 8, 2026

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

Comment on lines +4134 to +4138
// bachelor1 momentum is invariant across the inner (bachelor2) loop;
// pVector() is a dynamic column with no caching (it recomputes
// sin/cos on every call), so evaluate it once here instead of on
// every bachelor2 iteration.
const std::array<float, 3> pVecCharmBachelor1 = trackCharmBachelor1.pVector();
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 @ktf . I think the verbose comment is not needed.

@vkucera vkucera changed the title [PWGHF] Avoid computing the pVector of bachelor1 in the inner loop. [PWGHF] trackIndexSkimCreator: Avoid computing the pVector of bachelor1 in the inner loop Jun 8, 2026
Comment on lines +4134 to +4138
// bachelor1 momentum is invariant across the inner (bachelor2) loop;
// pVector() is a dynamic column with no caching (it recomputes
// sin/cos on every call), so evaluate it once here instead of on
// every bachelor2 iteration.
const std::array<float, 3> pVecCharmBachelor1 = trackCharmBachelor1.pVector();
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.

Suggested change
// bachelor1 momentum is invariant across the inner (bachelor2) loop;
// pVector() is a dynamic column with no caching (it recomputes
// sin/cos on every call), so evaluate it once here instead of on
// every bachelor2 iteration.
const std::array<float, 3> pVecCharmBachelor1 = trackCharmBachelor1.pVector();
const auto pVecCharmBachelor1 = trackCharmBachelor1.pVector();

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.

2 participants