21void hist005_RHist_convert_TH1()
28 std::normal_distribution normal(10.0, 4.0);
29 for (std::size_t i = 0; i < 1000; i++) {
30 hist.Fill(normal(gen));
37 std::cout <<
"hist with expected mean = " << normal.mean() <<
"\n";
38 std::cout <<
"entries = " <<
h1->GetEntries();
39 std::cout <<
", mean = " <<
h1->GetMean();
40 std::cout <<
", stddev = " <<
h1->GetStdDev();
44 auto *
c =
new TCanvas(
"c",
"", 10, 10, 900, 500);
45 h1->DrawCopy(
"",
"h1");
A histogram for aggregation of data along multiple dimensions.
std::unique_ptr< TH1I > ConvertToTH1I(const RHistEngine< int > &engine)
Convert a one-dimensional histogram to TH1I.