{ TH1F h ("h1", "histogram title", 100, -5.0 , 5.0); // Create a 1D histogram object of floats // Filling up histogram with random events: TRandom rGen (0); // Creates a random number generator object with seed 0 for (int i=0; i<10000; i++) { // Repeat 10000 times float x = rGen.Gaus(0.0, 1.0); // Generate a random number according to the gaus distribution with mean=0, sigma=1 h.Fill(x); // Fill the histogram with x } h.Draw(); // Draw the histogram }