diff --git a/CI/physmon/reference/performance_ambi_ttbar.root b/CI/physmon/reference/performance_ambi_ttbar.root index ce0e9b66afa..b6aed8bb0be 100644 Binary files a/CI/physmon/reference/performance_ambi_ttbar.root and b/CI/physmon/reference/performance_ambi_ttbar.root differ diff --git a/CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root b/CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root index 716ac95ba34..58493d78b9f 100644 Binary files a/CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root and b/CI/physmon/reference/performance_amvf_gridseeder_ttbar_hist.root differ diff --git a/CI/physmon/reference/performance_amvf_ttbar_hist.root b/CI/physmon/reference/performance_amvf_ttbar_hist.root index c15b9a9bc19..4c1b98a9039 100644 Binary files a/CI/physmon/reference/performance_amvf_ttbar_hist.root and b/CI/physmon/reference/performance_amvf_ttbar_hist.root differ diff --git a/CI/physmon/reference/performance_ckf_ttbar.root b/CI/physmon/reference/performance_ckf_ttbar.root index b383a51a774..41a07227f18 100644 Binary files a/CI/physmon/reference/performance_ckf_ttbar.root and b/CI/physmon/reference/performance_ckf_ttbar.root differ diff --git a/CI/physmon/reference/performance_seeding_ttbar.root b/CI/physmon/reference/performance_seeding_ttbar.root index 942faf22914..e99cd72f2f4 100644 Binary files a/CI/physmon/reference/performance_seeding_ttbar.root and b/CI/physmon/reference/performance_seeding_ttbar.root differ diff --git a/CI/physmon/reference/tracksummary_ckf_ttbar_hist.root b/CI/physmon/reference/tracksummary_ckf_ttbar_hist.root index 2decf8ad676..d029c70d2d3 100644 Binary files a/CI/physmon/reference/tracksummary_ckf_ttbar_hist.root and b/CI/physmon/reference/tracksummary_ckf_ttbar_hist.root differ diff --git a/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.cpp b/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.cpp index bad3b902771..fe39105ba55 100644 --- a/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.cpp +++ b/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.cpp @@ -1,6 +1,6 @@ // This file is part of the Acts project. // -// Copyright (C) 2017-2019 CERN for the benefit of the Acts project +// Copyright (C) 2017-2024 CERN for the benefit of the Acts project // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -115,10 +115,15 @@ Pythia8Generator::operator()(RandomEngine& rng) { // only secondaries have a defined vertex position if (m_cfg.labelSecondaries && genParticle.hasVertex()) { // either add to existing secondary vertex if exists or create new one - // TODO can we do this w/o the manual search and position check? - auto it = std::find_if( - vertices.begin(), vertices.end(), - [=](const SimVertex& other) { return pos4 == other.position4; }); + + // check if an existing vertex is close enough + auto it = + std::find_if(vertices.begin(), vertices.end(), + [&pos4, this](const SimVertex& other) { + return (pos4.head<3>() - other.position()).norm() < + m_cfg.spatialVertexThreshold; + }); + if (it != vertices.end()) { particleId.setVertexSecondary(std::distance(vertices.begin(), it)); it->outgoing.insert(particleId); diff --git a/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.hpp b/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.hpp index f7f852b1d7a..4b6f8a20614 100644 --- a/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.hpp +++ b/Examples/Algorithms/GeneratorsPythia8/ActsExamples/Generators/Pythia8ProcessGenerator.hpp @@ -1,6 +1,6 @@ // This file is part of the Acts project. // -// Copyright (C) 2017-2019 CERN for the benefit of the Acts project +// Copyright (C) 2017-2024 CERN for the benefit of the Acts project // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -45,7 +45,9 @@ class Pythia8Generator : public EventGenerator::ParticlesGenerator { /// Turn on/off the labeling of secondary vertices /// TODO this is essentially broken as the current code will label any kind /// of decay as secondary - bool labelSecondaries = false; + bool labelSecondaries = true; + /// The spatial threshold to consider a particle originating from a vertex + double spatialVertexThreshold = 1.0 * Acts::UnitConstants::um; }; Pythia8Generator(const Config& cfg, Acts::Logging::Level lvl); diff --git a/Examples/Python/tests/root_file_hashes.txt b/Examples/Python/tests/root_file_hashes.txt index 2c54bb27aa7..9f977c62425 100644 --- a/Examples/Python/tests/root_file_hashes.txt +++ b/Examples/Python/tests/root_file_hashes.txt @@ -1,4 +1,4 @@ -test_pythia8__pythia8_particles.root: 79fa44dadc3193c9349c108c7a784d6121d343f88e8059ca11eed442ab1d49db +test_pythia8__pythia8_particles.root: 49b89c3458a51aa9407f887be50e6bbcd9a2a0c897e6f2be5a5d6a29d1bf3505 test_fatras__particles_simulation.root: 4ce0feb0ecb234143f418789a7a0d377f4a653d529c49bf999dda1878c50cee1 test_fatras__hits.root: 2e47d9ba55fa1b377f70c361107fe811e9880d14c42cb3d7a9cd4616a6f33a54 test_geant4__particles_simulation.root: 3052d64dfe627c22521c3dd95397a3c02c1c63fd5d6d07606005541014b40b1d