RooFit: evaluate function in a given point

Hi
check out two previous posts:

and

I have yet to get this to actually work. Please let me know if you do get it to work.

I have found an easier approach is to instead just make a TF1 and use the standard root tools to evaluate.
see

Only in my case, I was not using actual pointers for my RooRealVar etc. So my TF1 conversion looks like this:

[code]
RooRealVar x(“x”,“x”,initial,start,end);
RooRealVar m1(“m1”,“m1”, initial,start,end);

TF1 func=(TF1)model_gg.asTF(RooArgList(x), RooArgList(m1,m2,s1,s2,b),x );[/code]

Hope that helps…