22 namespace ActsExamples {
23 struct AlgorithmContext;
30 throw std::invalid_argument(
"Missing input truth particles collection");
33 throw std::invalid_argument(
"Missing output proto vertices collection");
44 const auto&
particles = m_inputParticles(ctx);
49 auto addProtoVertex = [&](SimParticleContainer::const_iterator
begin,
50 const SimParticleContainer::const_iterator&
end) {
57 protoVertices.push_back(
std::move(protoVertex));
60 if (
m_cfg.excludeSecondaries) {
64 if (vtxId.vertexSecondary() != 0
u) {
67 addProtoVertex(vtxParticles.begin(), vtxParticles.end());
71 if (
m_cfg.separateSecondaries) {
74 addProtoVertex(vtxParticles.begin(), vtxParticles.end());
79 addProtoVertex(vtxParticles.begin(), vtxParticles.end());
84 ACTS_VERBOSE(
"Write " << protoVertices.size() <<
" proto vertex to "
85 <<
m_cfg.outputProtoVertices);
86 m_outputProtoVertices(ctx,
std::move(protoVertices));