Can you make a TF1 be a composition of other TF1s?

Subject says it all.
Thanks,
-P

Hi,

do you mean something like

root [0] TF1 f("f","x",-3,3)
(TF1 &) Name: f Title: x
root [1] TF1 g("g","x*x",-3,3)
(TF1 &) Name: g Title: x*x
root [2] TF1 h("h","f+g",-3,3)

Cheers,
Danilo

I mean the TF1 equivalent of

y=f(x)
z=g(y)=g(f(x))

-P

HI,

This is possible for TF1 functions which are created using a string expression (a TFormula, see 1-3 in
root.cern.ch/doc/master/classTF1.html.

It is not possible for TF1 created using a C++ function (types 4 to 6).

For example, this works:

root [0] TF1 f("f","x*x");
root [1] TF1 g("g","sin(f)");

Best Regards

Lorenzo