Hello!
How to fit array of values in RooFit?
For example, I have experimental array:
How to fit it?
“RooDataSet” class has “add” method, but its input type is “RooArgSet”.
Have I use “setRealValue” of “RooArgSet” class in order to fill container?
My example:
[code]void RooFit_my()
{
RooRealVar t(“t”,“time”, 0, 250);
RooRealVar tau(“tau”,“tau parameter”, 50, 1, 100);
RooGenericPdf genpdf(“genpdf”,“genpdf”,"( 1 / tau * exp( - t / tau ) )", RooArgSet(t, tau));
double x[5] = {0, 5, 4, 8, 0};
//RooDataSet* data = genpdf.generate(t, 500);
genpdf.fitTo(*data);
tau.Print();
RooPlot* tframe = t.frame(Title("Interpreted expression pdf"));
data->plotOn(tframe);
genpdf.plotOn(tframe);
TCanvas* c = new TCanvas("rf103_interprfuncs","rf103_interprfuncs",800,400);
tframe->GetYaxis()->SetTitleOffset(1.4);
tframe->Draw();
}[/code]
Could you give me a simple example how to fill in RooDataSet object with experimental data?