File indexing completed on 2025-01-18 09:28:02
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/TrackParameters.hpp"
0012 #include "Acts/Utilities/Logger.hpp"
0013 #include "ActsExamples/Utilities/Helpers.hpp"
0014 #include "ActsFatras/EventData/Particle.hpp"
0015
0016 #include <cstddef>
0017 #include <map>
0018 #include <memory>
0019 #include <string>
0020
0021 class TProfile;
0022
0023 namespace ActsExamples {
0024
0025
0026 class TrackSummaryPlotTool {
0027 public:
0028
0029 struct Config {
0030 std::map<std::string, PlotHelpers::Binning> varBinning = {
0031 {"Eta", PlotHelpers::Binning("#eta", 40, -4, 4)},
0032 {"Phi", PlotHelpers::Binning("#phi", 100, -3.15, 3.15)},
0033 {"Pt", PlotHelpers::Binning("pT [GeV/c]", 40, 0, 100)},
0034 {"Num", PlotHelpers::Binning("N", 30, -0.5, 29.5)}};
0035 };
0036
0037
0038 struct TrackSummaryPlotCache {
0039 TProfile* nStates_vs_eta;
0040 TProfile*
0041 nMeasurements_vs_eta;
0042 TProfile* nHoles_vs_eta;
0043 TProfile* nOutliers_vs_eta;
0044 TProfile* nSharedHits_vs_eta;
0045 TProfile* nStates_vs_pt;
0046 TProfile*
0047 nMeasurements_vs_pt;
0048 TProfile* nHoles_vs_pt;
0049 TProfile* nOutliers_vs_pt;
0050 TProfile* nSharedHits_vs_pt;
0051 };
0052
0053
0054
0055
0056
0057 TrackSummaryPlotTool(const Config& cfg, Acts::Logging::Level lvl);
0058
0059
0060
0061
0062 void book(TrackSummaryPlotCache& trackSummaryPlotCache) const;
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072 void fill(TrackSummaryPlotCache& trackSummaryPlotCache,
0073 const Acts::BoundTrackParameters& fittedParameters,
0074 std::size_t nStates, std::size_t nMeasurements,
0075 std::size_t Outliers, std::size_t nHoles,
0076 std::size_t nSharedHits) const;
0077
0078
0079
0080
0081 void write(const TrackSummaryPlotCache& trackSummaryPlotCache) const;
0082
0083
0084
0085
0086 void clear(TrackSummaryPlotCache& trackSummaryPlotCache) const;
0087
0088 private:
0089 Config m_cfg;
0090 std::unique_ptr<const Acts::Logger> m_logger;
0091
0092
0093 const Acts::Logger& logger() const { return *m_logger; }
0094 };
0095
0096 }