16void hist009_TH1_normalize()
18 const std::array<double, 6> binsx{0, 5, 10, 20, 50, 100};
19 TH1D *orig =
new TH1D(
"orig",
"Original histogram before normalization", binsx.size() - 1, binsx.data());
21 gStyle->SetTitleFontSize(0.06);
25 for (
int i = 0; i < 100000; ++i) {
26 double r = rand.
Rndm() * 100;
31 norm->
SetTitle(
"Normalized Histogram");
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
1-D histogram with a double per channel (see TH1 documentation)
virtual Double_t Integral(Option_t *option="") const
virtual void Scale(Double_t c1=1, Option_t *option="")
void SetTitle(const char *title) override
Set the title of the TNamed.
void Draw(Option_t *option="") override
Default Draw method for all objects.
virtual Int_t Fill(Double_t x)
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
Random number generator class based on the maximally equidistributed combined Tausworthe generator by...
Double_t Rndm() override
TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers Use a mask of 0xffffffffUL to make ...