ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackSummaryPlotTool.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackSummaryPlotTool.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2019 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 #include <map>
12 #include <memory>
13 #include <string>
14 
18 
19 namespace FW {
20 
21 // Tools to make track info plots to show tracking track info.
23  public:
25  struct Config {
26  std::map<std::string, PlotHelpers::Binning> varBinning = {
27  {"Eta", PlotHelpers::Binning("#eta", 40, -4, 4)},
28  {"Phi", PlotHelpers::Binning("#phi", 100, -3.15, 3.15)},
29  {"Pt", PlotHelpers::Binning("pT [GeV/c]", 20, 0, 100)},
30  {"Num", PlotHelpers::Binning("N", 30, -0.5, 29.5)}};
31  };
32 
35  TProfile* nStates_vs_eta;
37  TProfile* nHoles_vs_eta;
38  TProfile* nOutliers_vs_eta;
39  TProfile* nStates_vs_pt;
40  TProfile*
42  TProfile* nHoles_vs_pt;
43  TProfile* nOutliers_vs_pt;
44  };
45 
51 
54  void book(TrackSummaryPlotCache& trackSummaryPlotCache) const;
55 
64  void fill(TrackSummaryPlotCache& trackSummaryPlotCache,
65  const ActsFatras::Particle& truthParticle, size_t nStates,
66  size_t nMeasurments, size_t Outliers, size_t nHoles) const;
67 
70  void write(const TrackSummaryPlotCache& trackSummaryPlotCache) const;
71 
74  void clear(TrackSummaryPlotCache& trackSummaryPlotCache) const;
75 
76  private:
78  std::unique_ptr<const Acts::Logger> m_logger;
79 
81  const Acts::Logger& logger() const { return *m_logger; }
82 };
83 
84 } // namespace FW