Fit a function not a PDF

I have to fit (maximum likelihood) a function to a dataset. How is this done in RooFit? All the examples I found on the web use pdfs.

My pdf would be: exp( (y_data(x)-f(x))^2 / sigma_data )
Likelihood: exp( Sum_i(y_data(x_i)-f(x_i))^2 )

y_data(x)=measured data on position x
sigma_data(x)=sigma estimation of the data value on position x

f(x)=value of physical model on position x

Since I am puzzled for days I would be very happy for any hint.

Ivo

This is marked as Solved…
Did you find a solution ?