Candle Decay, illustrate a time development of a certain value.
void candledecay()
{
auto c1 =
new TCanvas(
"c1",
"Candle Decay",800,600);
auto h1 =
new TH2I(
"h1",
"Decay",1000,0,1000,20,0,20);
float myRand;
for (
int i = 0;
i < 19;
i++) {
for (int j = 0; j < 1000000; j++) {
myRand = rng->Gaus(350+
i*8,20+2*
i);
}
}
h1->GetYaxis()->SetTitle(
"time");
h1->GetXaxis()->SetTitle(
"probability density");
h1->Draw(
"violiny(112000000)");
h2->DrawCopy(
"candley2");
}
2-D histogram with an int per channel (see TH1 documentation)
This is the base class for the ROOT Random number generators.
- Author
- Georg Troska
Definition in file candledecay.C.