File indexing completed on 2025-05-14 07:56:52
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
0015 #include <cstddef>
0016 #include <map>
0017 #include <memory>
0018 #include <string>
0019
0020 class TProfile;
0021
0022 namespace ActsExamples {
0023
0024
0025 class TrackQualityPlotTool {
0026 public:
0027
0028 struct Config {
0029 std::map<std::string, PlotHelpers::Binning> varBinning = {
0030 {"Eta", PlotHelpers::Binning("#eta", 40, -4, 4)},
0031 {"Phi", PlotHelpers::Binning("#phi", 100, -3.15, 3.15)},
0032 {"Pt", PlotHelpers::Binning("pT [GeV/c]", 40, 0, 100)},
0033 {"Num", PlotHelpers::Binning("N", 30, -0.5, 29.5)}};
0034 };
0035
0036
0037 struct Cache {
0038 TProfile* completeness_vs_pT;
0039 TProfile* completeness_vs_eta;
0040 TProfile* completeness_vs_phi;
0041 TProfile* purity_vs_pT;
0042 TProfile* purity_vs_eta;
0043 TProfile* purity_vs_phi;
0044 };
0045
0046
0047
0048
0049
0050 TrackQualityPlotTool(const Config& cfg, Acts::Logging::Level lvl);
0051
0052
0053
0054
0055 void book(Cache& cache) const;
0056
0057
0058
0059
0060
0061
0062
0063 void fill(Cache& cache, const Acts::BoundTrackParameters& fittedParameters,
0064 double completeness, double purity) const;
0065
0066
0067
0068
0069 void write(const Cache& cache) const;
0070
0071
0072
0073
0074 void clear(Cache& cache) const;
0075
0076 private:
0077
0078 Config m_cfg;
0079
0080 std::unique_ptr<const Acts::Logger> m_logger;
0081
0082
0083 const Acts::Logger& logger() const { return *m_logger; }
0084 };
0085
0086 }