Draw 2D fit projections

Hi all,
how can I draw the x- and y- projections of a 2D fit of a TH2D with a TF2. I can draw the 2D contours superimposed to the data, but I would like to see also the projections in 1D.
My 2D function is defined by a static member of a class (it’s a quite complicated function), for instance:

TF2* fitFcn= new TF2("fitFcn",MyClass::Model2D,xmin,xmax,ymin,ymax,npar);

Probably it possible to do it by using RooFit (converting TF2 to a RooGenericPdf?) but I don’t know exactly how, so any help is quite appreciated.

Many thanks,