{ TRandom3 rnd; TH1F *h1 = new TH1F("h1","A Random Histogram",120,-1,11.); for(int i=0;i<100000;i++) { double r = rnd.Rndm(); double x = -log(1.-r); h1->Fill(x); } h1->SetFillColor(50); h1->Draw(); }