Analysis Software
Documentation for sPHENIX simulation 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 
15 
16 #include <cstddef>
17 #include <map>
18 #include <memory>
19 #include <string>
20 
21 class TProfile;
22 
23 namespace ActsExamples {
24 
25 // Tools to make track info plots to show tracking track info.
27  public:
29  struct Config {
30  std::map<std::string, PlotHelpers::Binning> varBinning = {
31  {"Eta", PlotHelpers::Binning("#eta", 40, -4, 4)},
32  {"Phi", PlotHelpers::Binning("#phi", 100, -3.15, 3.15)},
33  {"Pt", PlotHelpers::Binning("pT [GeV/c]", 40, 0, 100)},
34  {"Num", PlotHelpers::Binning("N", 30, -0.5, 29.5)}};
35  };
36 
39  TProfile* nStates_vs_eta;
40  TProfile*
42  TProfile* nHoles_vs_eta;
43  TProfile* nOutliers_vs_eta;
44  TProfile* nSharedHits_vs_eta;
45  TProfile* nStates_vs_pt;
46  TProfile*
48  TProfile* nHoles_vs_pt;
49  TProfile* nOutliers_vs_pt;
50  TProfile* nSharedHits_vs_pt;
51  };
52 
58 
62  void book(TrackSummaryPlotCache& trackSummaryPlotCache) const;
63 
72  void fill(TrackSummaryPlotCache& trackSummaryPlotCache,
73  const Acts::BoundTrackParameters& fittedParameters, size_t nStates,
74  size_t nMeasurements, size_t Outliers, size_t nHoles,
75  size_t nSharedHits) const;
76 
80  void write(const TrackSummaryPlotCache& trackSummaryPlotCache) const;
81 
85  void clear(TrackSummaryPlotCache& trackSummaryPlotCache) const;
86 
87  private:
89  std::unique_ptr<const Acts::Logger> m_logger;
90 
92  const Acts::Logger& logger() const { return *m_logger; }
93 };
94 
95 } // namespace ActsExamples