Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:17:03

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/Utilities/Histogram.hpp"
0012 
0013 #include <vector>
0014 
0015 class TEfficiency;
0016 class TH1F;
0017 class TH2F;
0018 class TProfile;
0019 
0020 namespace ActsPlugins {
0021 
0022 /// Convert Histogram1 to ROOT TH1F
0023 ///
0024 /// Creates a new ROOT TH1F histogram with the same binning, content, and
0025 /// errors as the input boost histogram.
0026 ///
0027 /// @param boostHist The boost 1D histogram to convert
0028 /// @return Raw pointer to new TH1F (caller owns and must delete)
0029 std::unique_ptr<TH1F> toRoot(const Acts::Experimental::Histogram1& boostHist);
0030 
0031 /// Convert Histogram2 to ROOT TH2F
0032 ///
0033 /// Creates a new ROOT TH2F histogram with the same binning, content, and
0034 /// errors as the input boost histogram.
0035 ///
0036 /// @param boostHist The boost 2D histogram to convert
0037 /// @return Raw pointer to new TH2F (caller owns and must delete)
0038 std::unique_ptr<TH2F> toRoot(const Acts::Experimental::Histogram2& boostHist);
0039 
0040 /// Convert ProfileHistogram1 to ROOT TProfile
0041 ///
0042 /// Creates a new ROOT TProfile histogram with the same binning and mean values
0043 /// as the input boost profile histogram.
0044 ///
0045 /// @param boostProfile The boost profile histogram to convert
0046 /// @return Raw pointer to new TProfile (caller owns and must delete)
0047 std::unique_ptr<TProfile> toRoot(
0048     const Acts::Experimental::ProfileHistogram1& boostProfile);
0049 
0050 /// Convert Efficiency1 to ROOT TEfficiency
0051 ///
0052 /// Creates a new ROOT TEfficiency object with the same binning, passed counts,
0053 /// and total counts as the input boost efficiency histogram.
0054 ///
0055 /// @param boostEff The boost 1D efficiency histogram to convert
0056 /// @return Raw pointer to new TEfficiency (caller owns and must delete)
0057 std::unique_ptr<TEfficiency> toRoot(
0058     const Acts::Experimental::Efficiency1& boostEff);
0059 
0060 /// Convert Efficiency2 to ROOT TEfficiency
0061 ///
0062 /// Creates a new ROOT TEfficiency object (2D) with the same binning, passed
0063 /// counts, and total counts as the input boost efficiency histogram.
0064 ///
0065 /// @param boostEff The boost 2D efficiency histogram to convert
0066 /// @return Raw pointer to new TEfficiency (caller owns and must delete)
0067 std::unique_ptr<TEfficiency> toRoot(
0068     const Acts::Experimental::Efficiency2& boostEff);
0069 
0070 }  // namespace ActsPlugins