Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:21

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2022 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // Local include(s).
0011 #include "traccc/utils/helpers.hpp"
0012 
0013 // ROOT include(s).
0014 #ifdef TRACCC_HAVE_ROOT
0015 #include <TEfficiency.h>
0016 #include <TH1.h>
0017 #include <TH2.h>
0018 #include <TProfile.h>
0019 #endif  // TRACCC_HAVE_ROOT
0020 
0021 // System include(s).
0022 #include <memory>
0023 #include <string_view>
0024 
0025 namespace traccc::plot_helpers {
0026 
0027 #ifdef TRACCC_HAVE_ROOT
0028 
0029 /// @brief book a 1D histogram
0030 /// @param histName the name of histogram
0031 /// @param histTitle the title of histogram
0032 /// @param varBinning the binning info of variable
0033 /// @return histogram pointer
0034 ///
0035 std::unique_ptr<TH1> book_histo(std::string_view hist_name,
0036                                 std::string_view hist_title,
0037                                 const binning& var_binning);
0038 
0039 /// @brief book a 1D histogram
0040 /// @param hist_name the name of histogram
0041 /// @param hist_title the title of histogram
0042 /// @param var_x_binning the binning info of x variable
0043 /// @param var_y_binning the binning info of y variable
0044 /// @return histogram pointer
0045 ///
0046 std::unique_ptr<TH2> book_histo(std::string_view hist_name,
0047                                 std::string_view hist_title,
0048                                 const binning& var_x_binning,
0049                                 const binning& var_y_binning);
0050 
0051 /// @brief book a 1D efficiency plot
0052 /// @param effName the name of plot
0053 /// @param effTitle the title of plot
0054 /// @param varBinning the binning info of variable
0055 /// @return TEfficiency pointer
0056 ///
0057 std::unique_ptr<TEfficiency> book_eff(std::string_view eff_name,
0058                                       std::string_view eff_title,
0059                                       const binning& var_binning);
0060 
0061 std::unique_ptr<TProfile> book_prof(std::string_view prof_name,
0062                                     std::string_view prof_title,
0063                                     const binning& var_x_binning,
0064                                     const binning& var_y_binning);
0065 
0066 #endif  // TRACCC_HAVE_ROOT
0067 
0068 }  // namespace traccc::plot_helpers