void integrate_landau() { double xmin=-3.; double xmax=35.; TF1* func = new TF1("landau","landau",xmin,xmax); func->SetParameters(1., 0., 1.); func->Draw(); fstream f1; f1.open("data/landau_integral.txt",ios::out); double middle = 1.35645; // not mathematically sound... int nbins=300000; for (int i=0; iIntegral(xmin,x); double out2 = func->Integral(middle,x); cout << "x = "<< x << ", out1 = " << out1 << ", out2 = " << out2 << endl; f1 << x << " " << out1 << " " << out2 << endl; } f1.close(); }