Simple binned chi2 fit in RooFit

Hi all,

I would like to use RooFit to do a simple chi2 fit but I’m having
trouble figuring out how to do it. I have

a) a collection of points, each with a value and an uncertainty
b) a model that makes a prediction for each point

The model depends on a few parameters that I want to fit for
by doing a simple chi2 minimization. My problem is that
the model is not a PDF that is a function of some variable x
(i.e. f(x)). That is, each point in (a) is just some number with an uncertainty, but
it doesn’t correspond to a bin of a histogram of a variable x
for which I have an analytic PDF f(x) that depends on some parameters
I want to estimate.

It’s almost like I want to do a fit that consists entirely of constraints,
one for each point. I can easily define a Gaussian constraint for
each point where the mean and width are from (a) and the “x” or
3rd argument of RooGaussian is from (b) defined with simple RooFormulaVars.
The log of the product of all of these Gaussians is the chi2 or the fcn that
should go to minuit.

I got this far, but then realized that fitTo needs a dataset, but
I have no dataset. It’s been built into my likelihood.

Is it possible to set up a simple fit like this in RooFit?

Thanks,
Owen

Hi,

You can just minimize the likelihood function using RooMinimizer or RooMinuit.

Lorenzo