This will return a RooABsReal function object.
You can integrate either using the function RooAbsReal::createIntegral, but I would prefer
converting the RooAbsReal to a TF1 object using RooAbsReal::asTF and then using TF1::Integral.
I see how it works.
But there is one more question to get the TF.
The command RooAbsReal::asTF need argument list.
However the function I want to call is sum of two function.
So I think the argument list should have different form.
The Tf1 will be a function of x (observables) and p (parameters)
obs is the RooFit list defining the observables (x)
pars is the list defining the parameters §
nset are the variables (observables) you want to use for returning a normalised function. If you are not interest to get a normalised function, this list should be empty
What I want to know is about pars.
I call the added function.
So the parameters are defined in each function and more parameters are applied when it added.
mean1S, sigma1S_1, alpha, n for CB1S_1.
mean1S, sigma1S_2, alpha, n for CB1S_2.
*CB1S_1, *CB1S_2, *frac for twoCB1S.
It make me confuse.
How can I arrange these parameters to obtain TF from the twoCB1S function?
That is why I called the function using “ws->function(“bkgErf”)”.
Then if I call this function directly, the called function reflect the fitting result?