Normalizing a Histogram
Image produced by .x NormalizeHistogram.C
Two different methods of normalizing histograms are shown, each with the original histogram. next to the normalized one.
{
const std::array<double, 6>
binsx{0, 5, 10, 20, 50, 100};
for (int i = 0; i < 100000; ++i) {
double r =
rand.Rndm() * 100;
}
norm->SetTitle(
"Normalized Histogram");
norm->Scale(1. /
norm->Integral(),
"width");
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TStyle * gStyle
1-D histogram with a double per channel (see TH1 documentation)
Random number generator class based on the maximally quidistributed combined Tausworthe generator by ...
void SetTitleFontSize(Float_t size=0)
- Date
- November 2024
- Author
- Advait Dhingra
Definition in file hist009_TH1_normalize.C.