{ TRandom3 rnd; TH1F *h1 = new TH1F("h1","A Random Histogram",120,-6,6.); for(int i=0;i<100000;i++) { double r1 = rnd.Rndm(); double r2 = rnd.Rndm(); double x = sqrt(-2.*log(r1))*cos(2.*M_PI*r2); h1->Fill(x); } h1->SetFillColor(50); h1->Draw(); }