see a simple example below
Rene Brun
void simpleRandom() {
TH1F *h1 = new TH1F("h1","original histogram",100,-5,15);
h1->FillRandom("landau",10000);
TCanvas *c1 = new TCanvas("c1","c1",800,1000);
c1->Divide(1,2); c1->cd(1); h1->Draw(); c1->cd(2);
h2->Fill(h1->GetRandom());
}
h2->Draw();
}
On Mon, 1 Aug
2005, agrigor_at_henphyt.yerphi.am
wrote:
> Hi,
> Could anyone explain me how to work with
> the instructions from the part
> Random Numbers and Histograms (page 27) concerning
> the use of the own distribution (histogram h (TH1).
> 1. How should I use the GetRandom (nothing is explained there)?
> 2. How to handle practically with the existing? h histogram.
> Could anyone give me clear instriction? With an example,
> please.
> Thank you in advance for your answer,
> Ara
>
>
Received on Thu Aug 11 2005 - 11:15:29 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET