How to save fit curve and erros in file (roofit)?

Hello!

I make unbinned fit in Roofit.

[code]RooRealVar t(“t”,“time”, 1, 50000);
RooRealVar tau(“tau”,“tau parameter”, 50, 1, 200);
RooGenericPdf genpdf(“genpdf”,“genpdf”,"( 1 / tau * exp( - t / tau ) )", RooArgSet(t, tau));

RooDataSet* data = genpdf.generate(t, 5000);

t.setRange(“Rfull”, 25, 1500);
genpdf.fitTo(*data, Range(“Rfull”),Save());

RooPlot* tframe = t.frame(Title(“Interpreted expression pdf”));
data->plotOn(tframe, Binning(10000));
genpdf.plotOn(tframe);

TCanvas* c = new TCanvas(“rf103_interprfuncs”,“rf103_interprfuncs”,800,800);
tframe->GetYaxis()->SetTitleOffset(1.4);
tframe->Draw();[/code]

How to export (save in file) fit curve (PDE vs t) and get erros of bins in order to save in file?
I want to use Origin to draw this hist.

Thanks in advance.
Vladislav.

Hi,

You can save in binary form the objects (the RooPlot) in a ROOT file. But if you want to export to something else, I presume you might need to save the information in a text file.
You can then get the underlined objects from the RooPlot using getHist or getCurve methods and then get their contents. The objects are TGraphAsymmErrors and from them you can get the vector of values and errors that you can pass to another graphics tool.

Best Regards

Lorenzo