Skip to content

Commit

Permalink
refactor: Remove TruthSeedSelector from Examples (acts-project#3808)
Browse files Browse the repository at this point in the history
After removing `TruthSeedRanges` with acts-project#3742 we can also safely remove `TruthSeedSelector` which does very much the same as the `ParticleSelector` by now.
  • Loading branch information
andiwand authored Nov 2, 2024
1 parent 4893a20 commit 52681f7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 245 deletions.

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

0 comments on commit 52681f7

Please sign in to comment.