File indexing completed on 2026-07-26 08:22:21
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010
0011 #include "../utils/helpers.hpp"
0012 #include "traccc/resolution/res_plot_tool_config.hpp"
0013
0014
0015 #include "traccc/edm/particle.hpp"
0016 #include "traccc/edm/track_parameters.hpp"
0017
0018
0019 #include <map>
0020 #include <memory>
0021 #include <string>
0022
0023 namespace traccc {
0024
0025 class res_plot_tool {
0026 public:
0027
0028 struct res_plot_cache {
0029 #ifdef TRACCC_HAVE_ROOT
0030
0031 std::map<std::string, std::unique_ptr<TH1>> residuals;
0032 std::map<std::string, std::unique_ptr<TH1>> pulls;
0033 std::map<std::string, std::shared_ptr<TH1>> resolutions_eta;
0034 std::map<std::string, std::shared_ptr<TH1>> resolutions_pT;
0035 std::map<std::string, std::unique_ptr<TH2>> residuals_eta;
0036 std::map<std::string, std::unique_ptr<TH2>> residuals_pT;
0037 std::map<std::string, std::map<std::size_t, std::shared_ptr<TH1>>>
0038 residuals_per_eta;
0039 std::map<std::string, std::map<std::size_t, std::shared_ptr<TH1>>>
0040 residuals_per_pT;
0041 #endif
0042 };
0043
0044
0045
0046
0047 res_plot_tool(const res_plot_tool_config& cfg);
0048
0049
0050
0051
0052 void book(res_plot_cache& cache) const;
0053
0054
0055
0056
0057
0058
0059 void fill(res_plot_cache& cache, const bound_track_parameters<>& truth_param,
0060 const bound_track_parameters<>& fit_param,
0061 const particle& ptc) const;
0062
0063
0064
0065
0066 void write(res_plot_cache& cache) const;
0067
0068 private:
0069 res_plot_tool_config m_cfg;
0070 };
0071
0072 }