a different solution could be
seedCollection.emplace_back(PTraj,std::move(seedHits),alongMomentum);
if (filter && (!filter->compatible(seedCollection.back()) seedCollection.pop_back();
in particular if compatible is very likely