20void hist014_TH1_cumulative()
22 TH1 *
h =
new TH1D(
"h",
"h", 100, -5., 5.);
24 h->FillRandom(
"gaus", 1u << 16);
26 TH1 *hc =
h->GetCumulative();
30 assert(std::abs(integral[i] *
h->GetEntries() - hc->
GetBinContent(i)) < 1
e-7);
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
1-D histogram with a double per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual Int_t GetNbinsX() const
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.