diff --git a/CI/physmon/phys_perf_mon.sh b/CI/physmon/phys_perf_mon.sh index 0e9646daa0c..c711ed538d3 100755 --- a/CI/physmon/phys_perf_mon.sh +++ b/CI/physmon/phys_perf_mon.sh @@ -223,11 +223,11 @@ function trackfinding() { fi run_histcmp \ - $outdir/data/$path/performance_ckf.root \ - $refdir/$path/performance_ckf.root \ + $outdir/data/$path/performance_finding_ckf.root \ + $refdir/$path/performance_finding_ckf.root \ "CKF finding performance | ${name}" \ - $path/performance_ckf.html \ - $path/performance_ckf_plots \ + $path/performance_finding_ckf.html \ + $path/performance_finding_ckf_plots \ --config $default_config run_histcmp \ @@ -252,17 +252,17 @@ function trackfinding() { run_histcmp \ $outdir/data/$path/tracksummary_ckf_hist.root \ $refdir/$path/tracksummary_ckf_hist.root \ - "Track Summary CKF | ${name}" \ + "CKF track summary | ${name}" \ $path/tracksummary_ckf.html \ $path/tracksummary_ckf_plots - if [ -f $refdir/$path/performance_ckf_ambi.root ]; then + if [ -f $refdir/$path/performance_finding_ckf_ambi.root ]; then run_histcmp \ - $outdir/data/$path/performance_ckf_ambi.root \ - $refdir/$path/performance_ckf_ambi.root \ + $outdir/data/$path/performance_finding_ckf_ambi.root \ + $refdir/$path/performance_finding_ckf_ambi.root \ "Ambisolver finding performance | ${name}" \ - $path/performance_ckf_ambi.html \ - $path/performance_ckf_ambi + $path/performance_finding_ckf_ambi.html \ + $path/performance_finding_ckf_ambi fi } diff --git a/CI/physmon/reference/trackfinding_1muon/orthogonal/performance_ckf.root b/CI/physmon/reference/trackfinding_1muon/orthogonal/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_1muon/orthogonal/performance_ckf.root rename to CI/physmon/reference/trackfinding_1muon/orthogonal/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_1muon/seeded/performance_ckf.root b/CI/physmon/reference/trackfinding_1muon/seeded/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_1muon/seeded/performance_ckf.root rename to CI/physmon/reference/trackfinding_1muon/seeded/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_1muon/truth_estimated/performance_ckf.root b/CI/physmon/reference/trackfinding_1muon/truth_estimated/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_1muon/truth_estimated/performance_ckf.root rename to CI/physmon/reference/trackfinding_1muon/truth_estimated/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_1muon/truth_smeared/performance_ckf.root b/CI/physmon/reference/trackfinding_1muon/truth_smeared/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_1muon/truth_smeared/performance_ckf.root rename to CI/physmon/reference/trackfinding_1muon/truth_smeared/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_4muon_50vertices/performance_ckf.root b/CI/physmon/reference/trackfinding_4muon_50vertices/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_4muon_50vertices/performance_ckf.root rename to CI/physmon/reference/trackfinding_4muon_50vertices/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_4muon_50vertices/performance_ckf_ambi.root b/CI/physmon/reference/trackfinding_4muon_50vertices/performance_finding_ckf_ambi.root similarity index 100% rename from CI/physmon/reference/trackfinding_4muon_50vertices/performance_ckf_ambi.root rename to CI/physmon/reference/trackfinding_4muon_50vertices/performance_finding_ckf_ambi.root diff --git a/CI/physmon/reference/trackfinding_ttbar_pu200/performance_ckf.root b/CI/physmon/reference/trackfinding_ttbar_pu200/performance_finding_ckf.root similarity index 100% rename from CI/physmon/reference/trackfinding_ttbar_pu200/performance_ckf.root rename to CI/physmon/reference/trackfinding_ttbar_pu200/performance_finding_ckf.root diff --git a/CI/physmon/reference/trackfinding_ttbar_pu200/performance_ckf_ambi.root b/CI/physmon/reference/trackfinding_ttbar_pu200/performance_finding_ckf_ambi.root similarity index 100% rename from CI/physmon/reference/trackfinding_ttbar_pu200/performance_ckf_ambi.root rename to CI/physmon/reference/trackfinding_ttbar_pu200/performance_finding_ckf_ambi.root diff --git a/CI/physmon/workflows/physmon_trackfinding_1muon.py b/CI/physmon/workflows/physmon_trackfinding_1muon.py index ad0b9fb01ec..aaa4bc9f71d 100755 --- a/CI/physmon/workflows/physmon_trackfinding_1muon.py +++ b/CI/physmon/workflows/physmon_trackfinding_1muon.py @@ -164,8 +164,8 @@ def run_ckf_tracking(label, seeding): else [] ) + [ "tracksummary_ckf.root", + "performance_finding_ckf.root", "performance_fitting_ckf.root", - "performance_ckf.root", ]: perf_file = tp / file assert perf_file.exists(), f"Performance file not found {perf_file}" diff --git a/CI/physmon/workflows/physmon_trackfinding_4muon_50vertices.py b/CI/physmon/workflows/physmon_trackfinding_4muon_50vertices.py index 02829cef8ce..1a119c8ed6c 100755 --- a/CI/physmon/workflows/physmon_trackfinding_4muon_50vertices.py +++ b/CI/physmon/workflows/physmon_trackfinding_4muon_50vertices.py @@ -196,12 +196,12 @@ s.run() shutil.move( - tp / "performance_fitting_ambi.root", - tp / "performance_fitting_ckf_ambi.root", + tp / "performance_finding_ambi.root", + tp / "performance_finding_ckf_ambi.root", ) shutil.move( - tp / "performance_ambi.root", - tp / "performance_ckf_ambi.root", + tp / "performance_fitting_ambi.root", + tp / "performance_fitting_ckf_ambi.root", ) for vertexing in ["ivf_notime", "amvf_gauss_notime", "amvf_grid_time"]: shutil.move( @@ -212,10 +212,10 @@ for file in [ "performance_seeding.root", "tracksummary_ckf.root", + "performance_finding_ckf.root", "performance_fitting_ckf.root", - "performance_ckf.root", + "performance_finding_ckf_ambi.root", "performance_fitting_ckf_ambi.root", - "performance_ckf_ambi.root", "performance_vertexing_ivf_notime.root", "performance_vertexing_amvf_gauss_notime.root", "performance_vertexing_amvf_grid_time.root", diff --git a/CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py b/CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py index 8ce0074c60e..99f12d0170d 100755 --- a/CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py +++ b/CI/physmon/workflows/physmon_trackfinding_ttbar_pu200.py @@ -180,12 +180,12 @@ s.run() shutil.move( - tp / "performance_fitting_ambi.root", - tp / "performance_fitting_ckf_ambi.root", + tp / "performance_finding_ambi.root", + tp / "performance_finding_ckf_ambi.root", ) shutil.move( - tp / "performance_ambi.root", - tp / "performance_ckf_ambi.root", + tp / "performance_fitting_ambi.root", + tp / "performance_fitting_ckf_ambi.root", ) for vertexing in ["amvf_gauss_notime", "amvf_grid_time"]: shutil.move( @@ -196,10 +196,10 @@ for file in [ "performance_seeding.root", "tracksummary_ckf.root", + "performance_finding_ckf.root", "performance_fitting_ckf.root", - "performance_ckf.root", + "performance_finding_ckf_ambi.root", "performance_fitting_ckf_ambi.root", - "performance_ckf_ambi.root", "performance_vertexing_amvf_gauss_notime.root", "performance_vertexing_amvf_grid_time.root", ]: diff --git a/Examples/Io/Root/CMakeLists.txt b/Examples/Io/Root/CMakeLists.txt index 9bc17e8893e..353d68debab 100644 --- a/Examples/Io/Root/CMakeLists.txt +++ b/Examples/Io/Root/CMakeLists.txt @@ -25,7 +25,7 @@ add_library( src/RootAthenaDumpReader.cpp src/RootNuclearInteractionParametersWriter.cpp src/detail/NuclearInteractionParametrisation.cpp - src/CKFPerformanceWriter.cpp + src/TrackFinderPerformanceWriter.cpp src/SeedingPerformanceWriter.cpp src/TrackFinderNTupleWriter.cpp src/TrackFitterPerformanceWriter.cpp diff --git a/Examples/Io/Root/include/ActsExamples/Io/Root/CKFPerformanceWriter.hpp b/Examples/Io/Root/include/ActsExamples/Io/Root/TrackFinderPerformanceWriter.hpp similarity index 95% rename from Examples/Io/Root/include/ActsExamples/Io/Root/CKFPerformanceWriter.hpp rename to Examples/Io/Root/include/ActsExamples/Io/Root/TrackFinderPerformanceWriter.hpp index 0d9e4c96feb..b3b6c36436c 100644 --- a/Examples/Io/Root/include/ActsExamples/Io/Root/CKFPerformanceWriter.hpp +++ b/Examples/Io/Root/include/ActsExamples/Io/Root/TrackFinderPerformanceWriter.hpp @@ -41,7 +41,7 @@ struct AlgorithmContext; /// done by setting the Config::rootFile pointer to an existing file. /// /// Safe to use from multiple writer threads - uses a std::mutex lock. -class CKFPerformanceWriter final : public WriterT { +class TrackFinderPerformanceWriter final : public WriterT { public: struct Config { /// Input (found) tracks collection. @@ -68,8 +68,8 @@ class CKFPerformanceWriter final : public WriterT { }; /// Construct from configuration and log level. - CKFPerformanceWriter(Config cfg, Acts::Logging::Level lvl); - ~CKFPerformanceWriter() override; + TrackFinderPerformanceWriter(Config cfg, Acts::Logging::Level lvl); + ~TrackFinderPerformanceWriter() override; /// Finalize plots. ProcessCode finalize() override; diff --git a/Examples/Io/Root/src/CKFPerformanceWriter.cpp b/Examples/Io/Root/src/TrackFinderPerformanceWriter.cpp similarity index 95% rename from Examples/Io/Root/src/CKFPerformanceWriter.cpp rename to Examples/Io/Root/src/TrackFinderPerformanceWriter.cpp index 7b5b5aaf291..ecec2fd59ce 100644 --- a/Examples/Io/Root/src/CKFPerformanceWriter.cpp +++ b/Examples/Io/Root/src/TrackFinderPerformanceWriter.cpp @@ -6,7 +6,7 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -#include "ActsExamples/Io/Root/CKFPerformanceWriter.hpp" +#include "ActsExamples/Io/Root/TrackFinderPerformanceWriter.hpp" #include "Acts/EventData/TrackParameters.hpp" #include "Acts/Utilities/VectorHelpers.hpp" @@ -27,9 +27,9 @@ using Acts::VectorHelpers::phi; namespace ActsExamples { -CKFPerformanceWriter::CKFPerformanceWriter(CKFPerformanceWriter::Config cfg, - Acts::Logging::Level lvl) - : WriterT(cfg.inputTracks, "CKFPerformanceWriter", lvl), +TrackFinderPerformanceWriter::TrackFinderPerformanceWriter( + TrackFinderPerformanceWriter::Config cfg, Acts::Logging::Level lvl) + : WriterT(cfg.inputTracks, "TrackFinderPerformanceWriter", lvl), m_cfg(std::move(cfg)), m_effPlotTool(m_cfg.effPlotToolConfig, lvl), m_fakeRatePlotTool(m_cfg.fakeRatePlotToolConfig, lvl), @@ -76,7 +76,7 @@ CKFPerformanceWriter::CKFPerformanceWriter(CKFPerformanceWriter::Config cfg, m_trackSummaryPlotTool.book(m_trackSummaryPlotCache); } -CKFPerformanceWriter::~CKFPerformanceWriter() { +TrackFinderPerformanceWriter::~TrackFinderPerformanceWriter() { m_effPlotTool.clear(m_effPlotCache); m_fakeRatePlotTool.clear(m_fakeRatePlotCache); m_duplicationPlotTool.clear(m_duplicationPlotCache); @@ -86,7 +86,7 @@ CKFPerformanceWriter::~CKFPerformanceWriter() { } } -ProcessCode CKFPerformanceWriter::finalize() { +ProcessCode TrackFinderPerformanceWriter::finalize() { float eff_tracks = static_cast(m_nTotalMatchedTracks) / m_nTotalTracks; float fakeRate_tracks = static_cast(m_nTotalFakeTracks) / m_nTotalTracks; @@ -147,8 +147,8 @@ ProcessCode CKFPerformanceWriter::finalize() { return ProcessCode::SUCCESS; } -ProcessCode CKFPerformanceWriter::writeT(const AlgorithmContext& ctx, - const ConstTrackContainer& tracks) { +ProcessCode TrackFinderPerformanceWriter::writeT( + const AlgorithmContext& ctx, const ConstTrackContainer& tracks) { // The number of majority particle hits and fitted track parameters using Acts::VectorHelpers::perp; diff --git a/Examples/Python/python/acts/examples/reconstruction.py b/Examples/Python/python/acts/examples/reconstruction.py index 0062e9cac90..fd02c6bddac 100644 --- a/Examples/Python/python/acts/examples/reconstruction.py +++ b/Examples/Python/python/acts/examples/reconstruction.py @@ -1532,7 +1532,7 @@ def addCKFTracks( writeSummary=writeTrackSummary, writeStates=writeTrackStates, writeFitterPerformance=writePerformance, - writeCkfPerformance=writePerformance, + writeFinderPerformance=writePerformance, writeCovMat=writeCovMat, logLevel=logLevel, ) @@ -1609,7 +1609,7 @@ def addTrackWriters( writeSummary: bool = True, writeStates: bool = False, writeFitterPerformance: bool = False, - writeCkfPerformance: bool = False, + writeFinderPerformance: bool = False, logLevel: Optional[acts.logging.Level] = None, writeCovMat=False, ): @@ -1655,16 +1655,16 @@ def addTrackWriters( ) s.addWriter(trackFitterPerformanceWriter) - if writeCkfPerformance: - ckfPerfWriter = acts.examples.CKFPerformanceWriter( + if writeFinderPerformance: + trackFinderPerfWriter = acts.examples.TrackFinderPerformanceWriter( level=customLogLevel(), inputTracks=tracks, inputParticles="particles_selected", inputTrackParticleMatching="track_particle_matching", inputParticleTrackMatching="particle_track_matching", - filePath=str(outputDirRoot / f"performance_{name}.root"), + filePath=str(outputDirRoot / f"performance_finding_{name}.root"), ) - s.addWriter(ckfPerfWriter) + s.addWriter(trackFinderPerfWriter) if outputDirCsv is not None: outputDirCsv = Path(outputDirCsv) @@ -1920,7 +1920,7 @@ def addAmbiguityResolution( writeSummary=writeTrackStates, writeStates=writeTrackSummary, writeFitterPerformance=writePerformance, - writeCkfPerformance=writePerformance, + writeFinderPerformance=writePerformance, writeCovMat=writeCovMat, logLevel=logLevel, ) @@ -1974,10 +1974,10 @@ def addScoreBasedAmbiguityResolution( tracks=algScoreBased.config.outputTracks, outputDirCsv=outputDirCsv, outputDirRoot=outputDirRoot, - writeSummary=writeTrackSummary, - writeStates=writeTrackStates, + writeSummary=writeTrackStates, + writeStates=writeTrackSummary, writeFitterPerformance=writePerformance, - writeCkfPerformance=writePerformance, + writeFinderPerformance=writePerformance, writeCovMat=writeCovMat, logLevel=logLevel, ) @@ -2035,10 +2035,10 @@ def addAmbiguityResolutionML( tracks=algGreedy.config.outputTracks, outputDirCsv=outputDirCsv, outputDirRoot=outputDirRoot, - writeSummary=writeTrackSummary, - writeStates=writeTrackStates, + writeSummary=writeTrackStates, + writeStates=writeTrackSummary, writeFitterPerformance=writePerformance, - writeCkfPerformance=writePerformance, + writeFinderPerformance=writePerformance, writeCovMat=writeCovMat, logLevel=logLevel, ) @@ -2084,10 +2084,10 @@ def addAmbiguityResolutionMLDBScan( trajectories=alg.config.outputTracks, outputDirRoot=outputDirRoot, outputDirCsv=outputDirCsv, - writeSummary=writeTrackSummary, - writeStates=writeTrackStates, + writeSummary=writeTrackStates, + writeStates=writeTrackSummary, writeFitterPerformance=writePerformance, - writeCkfPerformance=writePerformance, + writeFinderPerformance=writePerformance, writeCovMat=writeCovMat, logLevel=logLevel, ) diff --git a/Examples/Python/src/Output.cpp b/Examples/Python/src/Output.cpp index 278b4ce06a8..dce56dc681e 100644 --- a/Examples/Python/src/Output.cpp +++ b/Examples/Python/src/Output.cpp @@ -26,7 +26,6 @@ #include "ActsExamples/Io/Csv/CsvTrackParameterWriter.hpp" #include "ActsExamples/Io/Csv/CsvTrackWriter.hpp" #include "ActsExamples/Io/Csv/CsvTrackingGeometryWriter.hpp" -#include "ActsExamples/Io/Root/CKFPerformanceWriter.hpp" #include "ActsExamples/Io/Root/RootBFieldWriter.hpp" #include "ActsExamples/Io/Root/RootMaterialTrackWriter.hpp" #include "ActsExamples/Io/Root/RootMaterialWriter.hpp" @@ -44,6 +43,7 @@ #include "ActsExamples/Io/Root/RootVertexWriter.hpp" #include "ActsExamples/Io/Root/SeedingPerformanceWriter.hpp" #include "ActsExamples/Io/Root/TrackFinderNTupleWriter.hpp" +#include "ActsExamples/Io/Root/TrackFinderPerformanceWriter.hpp" #include "ActsExamples/Io/Root/TrackFitterPerformanceWriter.hpp" #include "ActsExamples/Io/Root/VertexNTupleWriter.hpp" #include "ActsExamples/MaterialMapping/IMaterialWriter.hpp" @@ -163,7 +163,7 @@ void addOutput(Context& ctx) { ACTS_PYTHON_STRUCT_END(); } - // Bindings for the binning in e.g., CKFPerformanceWriter + // Bindings for the binning in e.g., TrackFinderPerformanceWriter { py::class_(mex, "Binning") .def(py::init(), "title"_a, "bins"_a, @@ -395,12 +395,13 @@ void addOutput(Context& ctx) { trackingGeometry, outputDir, outputPrecision, writeSensitive, writeBoundary, writeSurfaceGrid, writeLayerVolume, writePerEvent); - ACTS_PYTHON_DECLARE_WRITER( - ActsExamples::CKFPerformanceWriter, mex, "CKFPerformanceWriter", - inputTracks, inputParticles, inputTrackParticleMatching, - inputParticleTrackMatching, filePath, fileMode, effPlotToolConfig, - fakeRatePlotToolConfig, duplicationPlotToolConfig, - trackSummaryPlotToolConfig, writeMatchingDetails); + ACTS_PYTHON_DECLARE_WRITER(ActsExamples::TrackFinderPerformanceWriter, mex, + "TrackFinderPerformanceWriter", inputTracks, + inputParticles, inputTrackParticleMatching, + inputParticleTrackMatching, filePath, fileMode, + effPlotToolConfig, fakeRatePlotToolConfig, + duplicationPlotToolConfig, + trackSummaryPlotToolConfig, writeMatchingDetails); ACTS_PYTHON_DECLARE_WRITER( ActsExamples::RootNuclearInteractionParametersWriter, mex, diff --git a/Examples/Python/tests/root_file_hashes.txt b/Examples/Python/tests/root_file_hashes.txt index 21306d5c43f..b56415c0c05 100644 --- a/Examples/Python/tests/root_file_hashes.txt +++ b/Examples/Python/tests/root_file_hashes.txt @@ -73,7 +73,7 @@ test_root_clusters_writer[kwargsConstructor]__clusters.root: e842df4fe04eefff3df test_exatrkx[cpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc87943366f4af4440f7eea6887afb763871ac149b05 test_exatrkx[gpu-onnx]__performance_track_finding.root: 9090de10ffb1489d3f1993e2a3081a3038227e3e5c453e98a9a4f33ea3d6d817 test_exatrkx[gpu-torch]__performance_track_finding.root: 36b3045589c4c17c038dbc87943366f4af4440f7eea6887afb763871ac149b05 -test_ML_Ambiguity_Solver__performance_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006 +test_ML_Ambiguity_Solver__performance_finding_ambiML.root: 284ff5c3a08c0b810938e4ac2f8ba8fe2babb17d4c202b624ed69fff731a9006 test_refitting[odd]__trackstates_gsf_refit.root: e297749dc1e7eda3b8dea13defa0499986c584740d93e723a901b498b8e90c71 test_refitting[odd]__tracksummary_gsf_refit.root: d5085882e45a0b699194dff9f40a36e9291227bf65f9aaaf9087f9242ef5ae22 test_refitting[generic]__trackstates_gsf_refit.root: 4424fdf2f27575db825c1a59f8e53a1595946211cbd5b2c8d3a2f71cdcc77ae9 diff --git a/Examples/Python/tests/test_examples.py b/Examples/Python/tests/test_examples.py index 9a2c45c7657..26f69f4aa82 100644 --- a/Examples/Python/tests/test_examples.py +++ b/Examples/Python/tests/test_examples.py @@ -1146,7 +1146,7 @@ def test_ckf_tracks_example( root_files = [ ( - "performance_ckf.root", + "performance_finding_ckf.root", None, ), ( @@ -1290,7 +1290,7 @@ def test_full_chain_odd_example_pythia_geant4(tmp_path): def test_ML_Ambiguity_Solver(tmp_path, assert_root_hash): # This test literally only ensures that the full chain example can run without erroring out - root_file = "performance_ambiML.root" + root_file = "performance_finding_ambiML.root" output_dir = "odd_output" assert not (tmp_path / root_file).exists()