{ TH1F * h = new TH1F( "myhist", "gaussian distribution" , 100 , 0 , 20 ); for ( int i=0 ; i<10000 ; i++ ) { double x = gRandom->Gaus(10,2); h->Fill(x); } for ( int i=0 ; i<500 ; i++ ) { double x = gRandom->Gaus(14,0.5); h->Fill(x); } h->Draw(); //h->Fit( "gaus" , "" , "" , 7 , 14 ); }