19void multicolor(
Int_t isStack=0) {
22 TH2F *
h1 =
new TH2F(
"h1",
"h1",nbins,-4,4,nbins,-4,4);
24 TH2F *
h2 =
new TH2F(
"h2",
"h2",nbins,-4,4,nbins,-4,4);
26 TH2F *
h3 =
new TH2F(
"h3",
"h3",nbins,-4,4,nbins,-4,4);
34 for (
i=0;
i<20000;
i++)
h1->Fill(
r.Gaus(),
r.Gaus());
40 if (val <= 0)
continue;
41 if (!isStack)
h1->SetBinContent(bin,0);
43 if (!isStack)
h2->SetBinContent(bin,0);
44 h3->SetBinContent(bin,val);
46 if (!isStack)
h3->SetBinContent(bin,0);
47 h2->SetBinContent(bin,val);
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
2-D histogram with a float per channel (see TH1 documentation)
The Histogram stack class.
virtual void Add(TH1 *h, Option_t *option="")
Add a new histogram to the list.
void Draw(Option_t *chopt="") override
Draw this stack with its current attributes.
This is the base class for the ROOT Random number generators.