-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[hist] Add tutorial for weighted filling #20178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Tutorial output: |
Test Results 21 files 21 suites 3d 15h 17m 25s ⏱️ 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 |
There was a problem hiding this comment.
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
| /// \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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // 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}); |
There was a problem hiding this comment.
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?
| 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. |
There was a problem hiding this comment.
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:
| // 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 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

No description provided.