File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4131,6 +4131,12 @@ struct HfTrackIndexSkimCreatorLfCascades {
41314131 continue ;
41324132 }
41334133
4134+ // bachelor1 momentum is invariant across the inner (bachelor2) loop;
4135+ // pVector() is a dynamic column with no caching (it recomputes
4136+ // sin/cos on every call), so evaluate it once here instead of on
4137+ // every bachelor2 iteration.
4138+ const std::array<float , 3 > pVecCharmBachelor1 = trackCharmBachelor1.pVector ();
4139+
41344140 // second loop over tracks
41354141 for (auto trackIdCharmBachelor2 = trackIdCharmBachelor1 + 1 ; trackIdCharmBachelor2 != groupedBachTrackIndices.end (); ++trackIdCharmBachelor2) {
41364142
@@ -4154,7 +4160,7 @@ struct HfTrackIndexSkimCreatorLfCascades {
41544160 continue ;
41554161 }
41564162
4157- if (!isPreselectedCandidateXic (pVecCasc, trackCharmBachelor1. pVector () , trackCharmBachelor2.pVector ())) {
4163+ if (!isPreselectedCandidateXic (pVecCasc, pVecCharmBachelor1 , trackCharmBachelor2.pVector ())) {
41584164 continue ;
41594165 }
41604166
You can’t perform that action at this time.
0 commit comments