Compound Formula Class

Hi,

I’m trying to write a compound formula class which inherits from TFormula but evaluates the (almost) arbitrary combination of several TF1s. Which methods of TFormula are required to interface with the Fit() methods of the TH1 and TGraph families? I want to be able to use Fit() but I know I’m going to have to override some of these functions to make it work.

Perhaps there already exists a class which does exactly what I’m trying to achieve?

Thanks,

Hugh

Hi,

TFormula defined with a string expression can already by combined.
TFormula defined with a C/C++ function must be combined by using a C/C++ function combining them.
For complex case, you may want to check out RooFit which may or may not already cover your use cases.

To answer your question compare the list of function in TFormula and TF1; the function that TF1 overload are the one you may also have to overload.

Cheers,
Philippe.