void riempi4() { TH1F histo("pippo","Numeri casuali",100,0.,1.); int num= 10000; for (int i = 0; iRndm(); float rnd=gRandom->Gaus(0.5,0.05); //float rnd=gRandom->Poisson(4.); histo.Fill(rnd); } gStyle->SetOptStat(111111); gStyle->SetOptFit(111111); histo.SetMinimum(0); histo.Fit("gaus"); histo.DrawCopy(); TF1* gaus = (TF1*)( histo.GetFunction("gaus")); cout << gaus << endl; float mean = gaus->GetParameter(1); float meanErr = gaus->GetParError(1); cout << "mean " << mean << "+/-" << meanErr<< endl; // TF1 pippo("pp","pol2",0.35,0.65); // histo.Fit("pp","R"); // //histo.Fit("pol2"); // //(histo.GetFunction("pp"))->Draw(); // histo.DrawCopy("hist"); // histo.DrawCopy("func same"); //pippo.Draw(); cout << histo.GetRMS() << endl; cout << "under " <