Hello Rooters,
I have developed an GUI applications that is going to perform a serie of on-line functions. I’m testing a simple version for a long-term running using gRoot random numbers. After half a billion of samples, it appears a “plateau” in my self-refreshed test canvas like this:
I think that the plateau of the “theorical” gauss-shaped THs is due to a limit in the bin content, but I want to be sure
These are my histograms:
//histos
fHpx = new TH1F("hpx","px distribution",100,-4,4);
fHpy = new TH1F("hpy","py distribution",100,-4,4);
fHpxpy = new TH2F("hpxpy","py vs px",40,-4,4,40,-4,4); [/code]
And here the way that I use to fill it (it's a function)
[code] {
samples++;
xmain = gRandom->Gaus(-1,1.5); //mean, sigma
xs1 = gRandom->Gaus(-0.5,0.5);
xs2 = gRandom->Gaus(1,0.3);
//fHpx->SetBinContent(i,xs1);
fHpx->Fill(xs1);
fHpy->Fill(xs2);
fHpxpy->Fill(xs1,xs2);
}//---------------------------
and the way to refresh the canvas (another function):
[code]Refresh(int i){
const Int_t kUPDATE = 500; //refreshing rate
if (!(i % kUPDATE)) {
if (i == kUPDATE) {
c1->cd();
fHpx->Draw();
c2->cd();
fHpxpy->Draw("cont");
c3->cd();
fHpy->Draw();
}
c1->Modified();
c1->Update();
c2->Modified();
c2->Update();
c3->Modified();
c3->Update();
}
}//-----------------------------
[/code]
So… am I right?
The plateau is because there is a limit filling the bins?
If you want the whole code, just ask
Regards,
Physlock