33 auto h1 = std::make_shared<TH1F>(
"h1",
"Example histogram",100,-3,3);
36 for (
int i=0;i<10000;i++)
40 auto hint1 = std::make_shared<TH1F>(
"hint1",
"h1 bins integral",100,-3,3);
41 hint1->SetDirectory(
nullptr);
44 for (
int i=1;i<=100;i++) {
46 hint1->SetBinContent(i,
sum);
48 hint1->SetLineColor(
kRed);
49 hint1->GetYaxis()->SetAxisColor(
kRed);
50 hint1->GetYaxis()->SetLabelColor(
kRed);
53 auto canvas = RCanvas::Create(
"Two TH1 with two independent Y scales");
R__EXTERN TRandom * gRandom
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
static uint64_t sum(uint64_t i)