17 auto c1 =
new TCanvas(
"c1",
"The HSUM example", 200, 10, 600, 400);
23 auto total =
new TH1F(
"total",
"This is the total distribution", 100, -4, 4);
24 auto main =
new TH1F(
"main",
"Main contributor", 100, -4, 4);
25 auto s1 =
new TH1F(
"s1",
"This is the first signal", 100, -4, 4);
26 auto s2 =
new TH1F(
"s2",
"This is the second signal", 100, -4, 4);
28 total->SetMarkerStyle(21);
29 total->SetMarkerSize(0.7);
30 main->SetFillColor(16);
34 gSystem->Unlink(
"hsumanim.gif");
41 for (
Int_t i = 0; i < 10000; i++) {
49 total->Fill(xs1, 0.3);
50 total->Fill(xs2, 0.2);
58 slider =
new TSlider(
"slider",
"test", 4.2, 0, 4.6,
total->GetMaximum(), 38);
65 if (
gROOT->IsBatch()) {
67 printf(
"i = %d\n", i);
75 total->Draw(
"sameaxis");
int Int_t
Signed integer 4 bytes (int).
float Float_t
Float 4 bytes (float).
externTBenchmark * gBenchmark
static unsigned int total
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
1-D histogram with a float per channel (see TH1 documentation)
A specialized TPad including a TSliderBox object.
virtual void SetRange(Double_t xmin=0, Double_t xmax=1)
Set Slider range in [0,1].
int main(int argc, char **argv)