39 static constexpr int Scale = 100;
40 std::cout << (value >= (row * Scale) ?
'*' :
' ');
48 for (
auto bin : axis.GetNormalRange()) {
59void hist002_RHist_weighted()
70 std::normal_distribution normal(10.0, 5.0);
71 for (std::size_t i = 0; i < 25000; i++) {
72 hist1.Fill(normal(gen));
73 double value = normal(gen);
74 double weight = 0.2 + 0.008 * value * value;
79 std::cout <<
"hist1 with expected mean = " << normal.mean() <<
"\n";
83 std::cout <<
"hist2 with distorted normal distribution\n";
90 for (std::size_t i = 0; i < 25000; i++) {
91 double value = normal(gen);
92 double weight = 0.2 + 0.008 * value * value;
97 std::cout <<
"bin errors of hist3 (not to scale)\n";
100 auto error = std::sqrt(hist3.GetBinContent(bin).fSum2);
101 static constexpr int Scale = 5;
102 std::cout << (error >= (row * Scale) ?
'*' :
' ');
110 for (
auto bin : axis.GetNormalRange()) {
A bin index with special values for underflow and overflow bins.
static RBinIndex Overflow()
static RBinIndex Underflow()
A histogram for aggregation of data along multiple dimensions.
double ComputeMean(std::size_t dim=0) const
Compute the arithmetic mean of unbinned values.
double ComputeStdDev(std::size_t dim=0) const
Compute the standard deviation of unbinned values.
const BinContentType & GetBinContent(const std::array< RBinIndex, N > &indices) const
Get the content of a single bin.
const std::vector< RAxisVariant > & GetAxes() const
std::uint64_t GetNEntries() const
A regular axis with equidistant bins in the interval .
A weight for filling histograms.