File tree Expand file tree Collapse file tree
PWGCF/TwoParticleCorrelations/Tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2816,12 +2816,12 @@ struct LambdaProtonBalanceFunction {
28162816 std::vector<PartInfo> antiProtonInfo;
28172817 protonInfo.reserve (selectedPrimProtons.size ());
28182818 antiProtonInfo.reserve (selectedPrimAntiProtons.size ());
2819- for ( auto const & t : selectedPrimProtons) {
2820- protonInfo. push_back ( makeProtonInfo (t));
2821- }
2822- for ( auto const & t : selectedPrimAntiProtons) {
2823- antiProtonInfo. push_back ( makeProtonInfo (t));
2824- }
2819+ std::transform ( selectedPrimProtons. begin (), selectedPrimProtons. end (),
2820+ std::back_inserter (protonInfo),
2821+ [ this ]( auto const & t) { return makeProtonInfo (t); });
2822+ std::transform ( selectedPrimAntiProtons. begin (), selectedPrimAntiProtons. end (),
2823+ std::back_inserter (antiProtonInfo),
2824+ [ this ]( auto const & t) { return makeProtonInfo (t); });
28252825
28262826 // ── pp rho2 fills (eta and y) ───────────────────────────────────────────
28272827 for (auto const & p1 : selectedPrimProtons) {
You can’t perform that action at this time.
0 commit comments