Example of stacked histograms: class THStack.
TH1F *h1st =
new TH1F(
"h1st",
"test hstack",100,-4,4);
TH1F *h2st =
new TH1F(
"h2st",
"test hstack",100,-4,4);
TH1F *h3st =
new TH1F(
"h3st",
"test hstack",100,-4,4);
gPad->SetFrameFillColor(17);
gPad->SetFrameFillColor(17);
"xygaus + xygaus(5) + xylandau(10)",-4,4,-4,4);
Double_t params1[] = {130,-1.4,1.8,1.5,1, 150,2,0.5,-2,0.5,
3600,-2,0.7,-3,0.3};
TH2F *h2sta =
new TH2F(
"h2sta",
"h2sta",20,-4,4,20,-4,4);
TF2 *f2 =
new TF2(
"f2",
"xygaus + xygaus(5)",-4,4,-4,4);
Double_t params2[] = {100,-1.4,1.9,1.1,2, 80,2,0.7,-2,0.5};
TH2F *h2stb =
new TH2F(
"h2stb",
"h2stb",20,-4,4,20,-4,4);
return cst;
}
- Author
- Rene Brun
Definition in file hstack.C.