File indexing completed on 2026-07-16 08:07:57
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Utilities/Histogram.hpp"
0010
0011 namespace Acts::Experimental {
0012
0013
0014 Histogram1 projectionX(const Histogram2& hist2d) {
0015 auto projectedHist = boost::histogram::algorithm::project(
0016 hist2d.histogram(), std::integral_constant<unsigned, 0>{});
0017
0018
0019 std::array<AxisVariant, 1> axes = {projectedHist.axis(0)};
0020
0021 return Histogram1(hist2d.name() + "_projX", hist2d.title() + " projection X",
0022 axes);
0023 }
0024
0025 Histogram1 projectionY(const Histogram2& hist2d) {
0026 auto projectedHist = boost::histogram::algorithm::project(
0027 hist2d.histogram(), std::integral_constant<unsigned, 1>{});
0028
0029
0030 std::array<AxisVariant, 1> axes = {projectedHist.axis(0)};
0031
0032 return Histogram1(hist2d.name() + "_projY", hist2d.title() + " projection Y",
0033 axes);
0034 }
0035
0036 }