Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion PWGHF/TableProducer/trackIndexSkimCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4131,6 +4131,12 @@ struct HfTrackIndexSkimCreatorLfCascades {
continue;
}

// 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();
Comment on lines +4134 to +4138
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.

Comment on lines +4134 to +4138
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();


// second loop over tracks
for (auto trackIdCharmBachelor2 = trackIdCharmBachelor1 + 1; trackIdCharmBachelor2 != groupedBachTrackIndices.end(); ++trackIdCharmBachelor2) {

Expand All @@ -4154,7 +4160,7 @@ struct HfTrackIndexSkimCreatorLfCascades {
continue;
}

if (!isPreselectedCandidateXic(pVecCasc, trackCharmBachelor1.pVector(), trackCharmBachelor2.pVector())) {
if (!isPreselectedCandidateXic(pVecCasc, pVecCharmBachelor1, trackCharmBachelor2.pVector())) {
continue;
}

Expand Down
Loading