File indexing completed on 2026-08-05 08:23:19
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Utilities/Logger.hpp"
0013 #include "ActsExamples/EventData/SimParticle.hpp"
0014 #include "ActsExamples/EventData/Track.hpp"
0015 #include "ActsExamples/EventData/TruthMatching.hpp"
0016 #include "ActsExamples/Validation/EffPlotTool.hpp"
0017 #include "ActsExamples/Validation/ResPlotTool.hpp"
0018 #include "ActsExamples/Validation/TrackSummaryPlotTool.hpp"
0019
0020 #include <cstddef>
0021 #include <map>
0022 #include <string>
0023
0024 namespace ActsExamples {
0025
0026
0027
0028
0029
0030
0031
0032
0033 class TrackFitterPerformanceCollector {
0034 public:
0035 struct Config {
0036 ResPlotTool::Config resPlotToolConfig;
0037 EffPlotTool::Config effPlotToolConfig;
0038 TrackSummaryPlotTool::Config trackSummaryPlotToolConfig;
0039
0040
0041
0042 int fitMinEntries = 10;
0043
0044 double fitSigmaRange = 3.0;
0045
0046 int fitIterations = 3;
0047 };
0048
0049 TrackFitterPerformanceCollector(Config cfg,
0050 std::unique_ptr<const Acts::Logger> logger);
0051
0052
0053
0054
0055 void fill(const Acts::GeometryContext& geoContext,
0056 const ConstTrackContainer& tracks,
0057 const SimParticleContainer& particles,
0058 const TrackParticleMatching& trackParticleMatching);
0059
0060
0061 struct Stats {
0062 std::size_t nTotalTracks = 0;
0063 std::size_t nTotalMatchedTracks = 0;
0064 std::size_t nTotalFakeTracks = 0;
0065 std::size_t nTotalParticles = 0;
0066 std::size_t nTotalMatchedParticles = 0;
0067 };
0068
0069
0070 const Stats& stats() const { return m_stats; }
0071
0072
0073 void logSummary() const;
0074
0075
0076
0077 const ResPlotTool& resPlotTool() const { return m_resPlotTool; }
0078 const EffPlotTool& effPlotTool() const { return m_effPlotTool; }
0079 const TrackSummaryPlotTool& trackSummaryPlotTool() const {
0080 return m_trackSummaryPlotTool;
0081 }
0082
0083
0084 private:
0085 const Acts::Logger& logger() const { return *m_logger; }
0086
0087 Config m_cfg;
0088 std::unique_ptr<const Acts::Logger> m_logger;
0089
0090 ResPlotTool m_resPlotTool;
0091 EffPlotTool m_effPlotTool;
0092 TrackSummaryPlotTool m_trackSummaryPlotTool;
0093
0094 Stats m_stats;
0095 };
0096
0097 }