Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove TruthSeedSelector from Examples #3808

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion Examples/Algorithms/TruthTracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_library(
ActsExamples/TruthTracking/TrackParameterSelector.cpp
ActsExamples/TruthTracking/TrackModifier.cpp
ActsExamples/TruthTracking/TrackTruthMatcher.cpp
ActsExamples/TruthTracking/TruthSeedSelector.cpp
ActsExamples/TruthTracking/TruthTrackFinder.cpp
ActsExamples/TruthTracking/TruthVertexFinder.cpp
ActsExamples/TruthTracking/TruthSeedingAlgorithm.cpp
Expand Down
15 changes: 0 additions & 15 deletions Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,21 +1741,6 @@ def addExaTrkX(
) -> None:
customLogLevel = acts.examples.defaultLogging(s, logLevel)

# Run the particle selection
# The pre-selection will select truth particles satisfying provided criteria
# from all particles read in by particle reader for further processing. It
# has no impact on the truth hits themselves
s.addAlgorithm(
acts.examples.TruthSeedSelector(
level=customLogLevel(),
ptMin=500 * u.MeV,
nHitsMin=9,
inputParticles="particles_initial",
inputMeasurementParticlesMap="measurement_particles_map",
outputParticles="particles_seed_selected",
)
)

# Create space points
s.addAlgorithm(
acts.examples.SpacePointMaker(
Expand Down
46 changes: 0 additions & 46 deletions Examples/Python/src/TruthTracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
#include "ActsExamples/TruthTracking/TrackModifier.hpp"
#include "ActsExamples/TruthTracking/TrackParameterSelector.hpp"
#include "ActsExamples/TruthTracking/TrackTruthMatcher.hpp"
#include "ActsExamples/TruthTracking/TruthSeedSelector.hpp"
#include "ActsExamples/TruthTracking/TruthSeedingAlgorithm.hpp"
#include "ActsExamples/TruthTracking/TruthTrackFinder.hpp"
#include "ActsExamples/TruthTracking/TruthVertexFinder.hpp"
#include "ActsExamples/Utilities/HitSelector.hpp"
#include "ActsExamples/Utilities/Range.hpp"

#include <array>
#include <cstddef>
#include <memory>

#include <pybind11/pybind11.h>
Expand All @@ -45,48 +41,6 @@ void addTruthTracking(Context& ctx) {
ActsExamples::TruthTrackFinder, mex, "TruthTrackFinder", inputParticles,
inputMeasurementParticlesMap, outputProtoTracks);

{
using Alg = ActsExamples::TruthSeedSelector;
using Config = Alg::Config;

auto alg = py::class_<Alg, IAlgorithm, std::shared_ptr<Alg>>(
mex, "TruthSeedSelector")
.def(py::init<const Alg::Config&, Acts::Logging::Level>(),
py::arg("config"), py::arg("level"))
.def_property_readonly("config", &Alg::config);

auto c = py::class_<Config>(alg, "Config").def(py::init<>());

ACTS_PYTHON_STRUCT_BEGIN(c, Config);
ACTS_PYTHON_MEMBER(inputParticles);
ACTS_PYTHON_MEMBER(inputMeasurementParticlesMap);
ACTS_PYTHON_MEMBER(outputParticles);
ACTS_PYTHON_MEMBER(rhoMin);
ACTS_PYTHON_MEMBER(rhoMax);
ACTS_PYTHON_MEMBER(zMin);
ACTS_PYTHON_MEMBER(zMax);
ACTS_PYTHON_MEMBER(phiMin);
ACTS_PYTHON_MEMBER(phiMax);
ACTS_PYTHON_MEMBER(etaMin);
ACTS_PYTHON_MEMBER(etaMax);
ACTS_PYTHON_MEMBER(absEtaMin);
ACTS_PYTHON_MEMBER(absEtaMax);
ACTS_PYTHON_MEMBER(ptMin);
ACTS_PYTHON_MEMBER(ptMax);
ACTS_PYTHON_MEMBER(keepNeutral);
ACTS_PYTHON_MEMBER(nHitsMin);
ACTS_PYTHON_MEMBER(nHitsMax);
ACTS_PYTHON_STRUCT_END();

pythonRangeProperty(c, "rho", &Config::rhoMin, &Config::rhoMax);
pythonRangeProperty(c, "z", &Config::zMin, &Config::zMax);
pythonRangeProperty(c, "phi", &Config::phiMin, &Config::phiMax);
pythonRangeProperty(c, "eta", &Config::etaMin, &Config::etaMax);
pythonRangeProperty(c, "absEta", &Config::absEtaMin, &Config::absEtaMax);
pythonRangeProperty(c, "pt", &Config::ptMin, &Config::ptMax);
pythonRangeProperty(c, "nHits", &Config::nHitsMin, &Config::nHitsMax);
}

ACTS_PYTHON_DECLARE_ALGORITHM(
ActsExamples::ParticleSmearing, mex, "ParticleSmearing", inputParticles,
outputTrackParameters, sigmaD0, sigmaD0PtA, sigmaD0PtB, sigmaZ0,
Expand Down
2 changes: 0 additions & 2 deletions Examples/Python/tests/test_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
EventGenerator,
FatrasSimulation,
MaterialMapping,
TruthSeedSelector,
TruthTrackFinder,
ParticleSelector,
TruthVertexFinder,
Expand Down Expand Up @@ -42,7 +41,6 @@
EventGenerator,
FatrasSimulation,
MaterialMapping,
TruthSeedSelector,
TruthTrackFinder,
ParticleSelector,
TruthVertexFinder,
Expand Down
Loading