13 auto c1 =
new TCanvas(
"c1",
"Candle Decay",800,600);
15 auto rng =
new TRandom();
16 auto h1 =
new TH2I(
"h1",
"Decay",1000,0,1000,20,0,20);
19 for (
int i = 0; i < 19; i++) {
20 for (
int j = 0; j < 1000000; j++) {
21 myRand = rng->Gaus(350+i*8,20+2*i);
27 h1->SetFillColor(kGray);
28 h1->SetLineColor(kBlue);
29 h1->GetYaxis()->SetTitle(
"time");
30 h1->GetXaxis()->SetTitle(
"probability density");
33 h1->Draw(
"violiny(112000000)");
35 auto h2 = (TH2I*)h1->Clone(
"h2");
37 h2->DrawCopy(
"candley2");