Skip to content

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Oct 23, 2025

No description provided.

@hahnjo
Copy link
Member Author

hahnjo commented Oct 23, 2025

Tutorial output:

hist1 with expected mean = 10
entries = 25000, mean = 9.99652, stddev = 4.99767
 |                                        |
 |                                        |
 |                                        |
 |                                        |
 |                                        |
 |                   *                    |
 |                ********                |
 |              ************              |
 |           *****************            |
 |          ********************          |
*|        ************************        |*
*|      ***************************       |*
*|    ********************************    |*
*|   ***********************************  |*
*|****************************************|*

hist2 with distorted normal distribution
entries = 25000, mean = 13.2862, stddev = 4.69151
 |                                        |*
 |                                        |*
 |                          *             |*
 |                      *******           |*
 |                     **********         |*
 |                    **************      |*
 |                   ***************      |*
 |                  *****************     |*
 |                ********************    |*
 |               ************************ |*
 |              **************************|*
 |             ***************************|*
 |           *****************************|*
 |         *******************************|*
*|      **********************************|*

bin errors of hist3 (not to scale)
 |                                        |*
 |                                        |*
 |                                        |*
 |                                        |*
 |                                        |*
 |                              * *       |*
 |                         ************ * |*
 |                        *************** |*
 |                     *******************|*
 |                   *********************|*
 |                 ***********************|*
 |                ************************|*
 |             ***************************|*
 |          ******************************|*
*|      **********************************|*

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

Test Results

    21 files      21 suites   3d 15h 17m 25s ⏱️
 3 691 tests  3 690 ✅ 0 💤 1 ❌
75 646 runs  75 645 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit e01ec94.

♻️ This comment has been updated with latest results.

///
/// Weighted filling of RHist and RBinWithError bin content type.
///
/// \macro_code
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the output to the doxygen-generated page?
Example

Suggested change
/// \macro_code
/// \macro_code
/// \macro_output

#include <random>
#include <variant>

// It is currently not possible to directly draw RHist's, so this function implements an output with ASCII characters.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// It is currently not possible to directly draw RHist's, so this function implements an output with ASCII characters.
// It is currently not possible to directly draw RHist, so this function implements an output with ASCII characters.

void hist002_RHist_weighted()
{
// Create an axis that can be used for multiple histograms.
ROOT::Experimental::RRegularAxis axis(40, {0, 20});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we show the types?

Suggested change
ROOT::Experimental::RRegularAxis axis(40, {0, 20});
ROOT::Experimental::RRegularAxis axis(40, {0., 20.});

DrawHistogram(hist2);
std::cout << "\n";

// Create and fill a third histogram with the special RBinWithError bin content type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many users will understand immediately when squared weights are mentioned:

Suggested change
// Create and fill a third histogram with the special RBinWithError bin content type.
// Create and fill a third histogram with the special RBinWithError bin content type.
// This tracks both the sum of weights and the sum of squared weights.

@@ -1 +1 @@
\defgroup tutorial_histv7 Histogram tutorials
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be renamed? See (see screenshot below):

Suggested change
\defgroup tutorial_histv7 RHist tutorials
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants