diff --git a/Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.cpp b/Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.cpp similarity index 98% rename from Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.cpp rename to Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.cpp index dfc790433f9..2f3e244f6f4 100644 --- a/Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.cpp +++ b/Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.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/Performance/VertexPerformanceWriter.hpp" +#include "ActsExamples/Io/Performance/VertexNTupleWriter.hpp" #include "Acts/Definitions/Algebra.hpp" #include "Acts/Definitions/TrackParametrization.hpp" @@ -106,9 +106,9 @@ std::uint32_t getNumberOfTruePriVertices( } // namespace -VertexPerformanceWriter::VertexPerformanceWriter( - const VertexPerformanceWriter::Config& config, Acts::Logging::Level level) - : WriterT(config.inputVertices, "VertexPerformanceWriter", level), +VertexNTupleWriter::VertexNTupleWriter(const VertexNTupleWriter::Config& config, + Acts::Logging::Level level) + : WriterT(config.inputVertices, "VertexNTupleWriter", level), m_cfg(config) { if (m_cfg.filePath.empty()) { throw std::invalid_argument("Missing output filename"); @@ -253,13 +253,13 @@ VertexPerformanceWriter::VertexPerformanceWriter( m_outputTree->Branch("trk_pullQOverPFitted", &m_pullQOverPFitted); } -VertexPerformanceWriter::~VertexPerformanceWriter() { +VertexNTupleWriter::~VertexNTupleWriter() { if (m_outputFile != nullptr) { m_outputFile->Close(); } } -ProcessCode VertexPerformanceWriter::finalize() { +ProcessCode VertexNTupleWriter::finalize() { m_outputFile->cd(); m_outputTree->Write(); m_outputFile->Close(); @@ -267,7 +267,7 @@ ProcessCode VertexPerformanceWriter::finalize() { return ProcessCode::SUCCESS; } -ProcessCode VertexPerformanceWriter::writeT( +ProcessCode VertexNTupleWriter::writeT( const AlgorithmContext& ctx, const std::vector& vertices) { const double nan = std::numeric_limits::quiet_NaN(); diff --git a/Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.hpp b/Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.hpp similarity index 97% rename from Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.hpp rename to Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.hpp index 8043dd1cac0..514dbfc8850 100644 --- a/Examples/Io/Performance/ActsExamples/Io/Performance/VertexPerformanceWriter.hpp +++ b/Examples/Io/Performance/ActsExamples/Io/Performance/VertexNTupleWriter.hpp @@ -38,15 +38,14 @@ enum class RecoVertexClassification { Split, }; -/// @class VertexPerformanceWriter +/// @class VertexNTupleWriter /// /// Writes out the number of reconstructed primary vertices along with /// the number of primary vertices in detector acceptance as well as /// reconstructable primary vertices after track fitting. /// Additionally it matches the reco vertices to their truth vertices /// and write out the difference in x,y and z position. -class VertexPerformanceWriter final - : public WriterT> { +class VertexNTupleWriter final : public WriterT> { public: struct Config { /// Input vertex collection. @@ -90,9 +89,9 @@ class VertexPerformanceWriter final /// /// @param config Configuration struct /// @param level Message level declaration - VertexPerformanceWriter(const Config& config, Acts::Logging::Level level); + VertexNTupleWriter(const Config& config, Acts::Logging::Level level); - ~VertexPerformanceWriter() override; + ~VertexNTupleWriter() override; /// End-of-run hook ProcessCode finalize() override; diff --git a/Examples/Io/Performance/CMakeLists.txt b/Examples/Io/Performance/CMakeLists.txt index b41bf76ea07..6c0623c1cd0 100644 --- a/Examples/Io/Performance/CMakeLists.txt +++ b/Examples/Io/Performance/CMakeLists.txt @@ -5,7 +5,7 @@ add_library( ActsExamples/Io/Performance/SeedingPerformanceWriter.cpp ActsExamples/Io/Performance/TrackFinderPerformanceWriter.cpp ActsExamples/Io/Performance/TrackFitterPerformanceWriter.cpp - ActsExamples/Io/Performance/VertexPerformanceWriter.cpp + ActsExamples/Io/Performance/VertexNTupleWriter.cpp ) target_include_directories( ActsExamplesIoPerformance diff --git a/Examples/Python/python/acts/examples/reconstruction.py b/Examples/Python/python/acts/examples/reconstruction.py index 3bb898ca998..cb349809cde 100644 --- a/Examples/Python/python/acts/examples/reconstruction.py +++ b/Examples/Python/python/acts/examples/reconstruction.py @@ -2180,7 +2180,7 @@ def addVertexFitting( VertexFitterAlgorithm, IterativeVertexFinderAlgorithm, AdaptiveMultiVertexFinderAlgorithm, - VertexPerformanceWriter, + VertexNTupleWriter, ) customLogLevel = acts.examples.defaultLogging(s, logLevel) @@ -2263,7 +2263,7 @@ def addVertexFitting( if not outputDirRoot.exists(): outputDirRoot.mkdir() s.addWriter( - VertexPerformanceWriter( + VertexNTupleWriter( level=customLogLevel(), inputVertices=outputVertices, inputTracks=tracks, @@ -2289,7 +2289,7 @@ def addSingleSeedVertexFinding( ) -> None: from acts.examples import ( SingleSeedVertexFinderAlgorithm, - VertexPerformanceWriter, + VertexNTupleWriter, ) customLogLevel = acts.examples.defaultLogging(s, logLevel) @@ -2310,7 +2310,7 @@ def addSingleSeedVertexFinding( outputDirRoot.mkdir() s.addWriter( - VertexPerformanceWriter( + VertexNTupleWriter( level=customLogLevel(), inputAllTruthParticles=inputParticles, inputSelectedTruthParticles=selectedParticles, diff --git a/Examples/Python/src/Output.cpp b/Examples/Python/src/Output.cpp index 11472d8e203..51178accd01 100644 --- a/Examples/Python/src/Output.cpp +++ b/Examples/Python/src/Output.cpp @@ -31,7 +31,7 @@ #include "ActsExamples/Io/Performance/SeedingPerformanceWriter.hpp" #include "ActsExamples/Io/Performance/TrackFinderPerformanceWriter.hpp" #include "ActsExamples/Io/Performance/TrackFitterPerformanceWriter.hpp" -#include "ActsExamples/Io/Performance/VertexPerformanceWriter.hpp" +#include "ActsExamples/Io/Performance/VertexNTupleWriter.hpp" #include "ActsExamples/Io/Root/RootBFieldWriter.hpp" #include "ActsExamples/Io/Root/RootMaterialTrackWriter.hpp" #include "ActsExamples/Io/Root/RootMaterialWriter.hpp" @@ -353,7 +353,7 @@ void addOutput(Context& ctx) { treeName, fileMode, writeCovMat, writeGsfSpecific, writeGx2fSpecific); ACTS_PYTHON_DECLARE_WRITER( - ActsExamples::VertexPerformanceWriter, mex, "VertexPerformanceWriter", + ActsExamples::VertexNTupleWriter, mex, "VertexNTupleWriter", inputVertices, inputTracks, inputTruthVertices, inputParticles, inputSelectedParticles, inputTrackParticleMatching, bField, filePath, treeName, fileMode, vertexMatchThreshold, trackMatchThreshold, useTracks); diff --git a/Examples/Python/tests/test_writer.py b/Examples/Python/tests/test_writer.py index a3098c743c9..14c4ffe5504 100644 --- a/Examples/Python/tests/test_writer.py +++ b/Examples/Python/tests/test_writer.py @@ -31,7 +31,7 @@ RootSimHitWriter, RootTrackStatesWriter, RootTrackSummaryWriter, - VertexPerformanceWriter, + VertexNTupleWriter, RootMeasurementWriter, CsvParticleWriter, CsvSimHitWriter, @@ -259,7 +259,7 @@ def test_csv_simhits_writer(tmp_path, fatras, conf_const): RootSimHitWriter, RootTrackStatesWriter, RootTrackSummaryWriter, - VertexPerformanceWriter, + VertexNTupleWriter, SeedingPerformanceWriter, ], )