ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Experimental::ProfileHistogram< Dim > Class Template Reference

Multi-dimensional profile histogram using boost::histogram. More...

#include <Acts/Utilities/Histogram.hpp>

Inheritance diagram for Acts::Experimental::ProfileHistogram< Dim >:
[legend]

Public Member Functions

 ProfileHistogram (std::string name, std::string title, const std::array< AxisVariant, Dim > &axes, std::string sampleAxisTitle, Range1D< double > sampleRange={})
 Construct multi-dimensional profile histogram from axes.
void fill (const std::array< double, Dim > &values, double sample)
 Fill profile with values and sample.
const BoostProfileHisthistogram () const
 Direct access to boost::histogram (for converters and tests).
const std::string & name () const
 Get histogram name.
const std::string & sampleAxisTitle () const
 Get title of the sample axis.
const std::string & title () const
 Get histogram title.

Static Public Member Functions

static constexpr std::size_t rank ()
 Get number of dimensions (compile-time constant).

Detailed Description

template<std::size_t Dim>
class Acts::Experimental::ProfileHistogram< Dim >

Multi-dimensional profile histogram using boost::histogram.

This class wraps boost::histogram to provide a ROOT-independent profile histogram implementation with compile-time dimensionality. For each bin, it tracks the mean and variance of sample values.

Template Parameters
DimNumber of dimensions

Constructor & Destructor Documentation

◆ ProfileHistogram()

template<std::size_t Dim>
Acts::Experimental::ProfileHistogram< Dim >::ProfileHistogram ( std::string name,
std::string title,
const std::array< AxisVariant, Dim > & axes,
std::string sampleAxisTitle,
Range1D< double > sampleRange = {} )

Construct multi-dimensional profile histogram from axes.

Parameters
nameHistogram name (for identification and output)
titleHistogram title (for plotting)
axesArray of axes with binning and metadata
sampleAxisTitleTitle for the sampled axis (profiled quantity)
sampleRangeSamples are discarded when outside range

Member Function Documentation

◆ fill()

template<std::size_t Dim>
void Acts::Experimental::ProfileHistogram< Dim >::fill ( const std::array< double, Dim > & values,
double sample )

Fill profile with values and sample.

Parameters
valuesBin coordinate values (one per axis)
sampleSample value (profiled quantity)

◆ histogram()

template<std::size_t Dim>
const BoostProfileHist & Acts::Experimental::ProfileHistogram< Dim >::histogram ( ) const

Direct access to boost::histogram (for converters and tests).

◆ name()

template<std::size_t Dim>
const std::string & Acts::Experimental::ProfileHistogram< Dim >::name ( ) const

Get histogram name.

◆ rank()

template<std::size_t Dim>
constexpr std::size_t Acts::Experimental::ProfileHistogram< Dim >::rank ( )
staticconstexpr

Get number of dimensions (compile-time constant).

◆ sampleAxisTitle()

template<std::size_t Dim>
const std::string & Acts::Experimental::ProfileHistogram< Dim >::sampleAxisTitle ( ) const

Get title of the sample axis.

◆ title()

template<std::size_t Dim>
const std::string & Acts::Experimental::ProfileHistogram< Dim >::title ( ) const

Get histogram title.