RooClassFactory help

Hello, I’m trying to create a PDF. This PDF’s coefficients are created from a user function that reads through a bunch of vectors and spits out four coefficients. These coefficients are then used to add four TF1 objects in linear combination. These coefficients and one of the TF1 are based on 6 parameters which will be minimized. I’m trying to use RooClassFactory to create a pdf but it doesn’t like having a TF1 object as an argument:

Here is the code template I’m attempting to make work:

[code]ClassImp(MyPDF)

MyPDF::MyPDF(const char *name, const char *title,
RooAbsReal& NeutrinoEnergy,
RooAbsReal& _ C0,
RooAbsReal& _ C1,
RooAbsReal& _ C2,
RooAbsReal& _ C3,
RooAbsReal& _ C4,
RooAbsReal& _ C5,
TF1 & _ MyFunc) :
RooAbsPdf(name,title),
NeutrinoEnergy(“NeutrinoEnergy”,“NeutrinoEnergy”,this,NeutrinoEnergy),
C0(" C0"," C0",this,
C0),
C1(" C1"," C1",this,
C1),
C2(" C2"," C2",this,_ C2),
C3(" C3"," C3",this,_ C3),
C4(" C4"," C4",this,_ C4),
C5(" C5"," C5",this,_ C5),
MyFunc(" MyFunc"," MyFunc",this,_ MyFunc)
{
}

MyPDF::MyPDF(const MyPDF& other, const char* name) :
RooAbsPdf(other,name),
NeutrinoEnergy(“NeutrinoEnergy”,this,other.NeutrinoEnergy),
C0(" C0",this,other. C0),
C1(" C1",this,other. C1),
C2(" C2",this,other. C2),
C3(" C3",this,other. C3),
C4(" C4",this,other. C4),
C5(" C5",this,other. C5),
MyFunc(" MyFunc",this,other. MyFunc)
{
}

Double_t MyPDF::evaluate() const
{
MyFunc->SetParameters(C0, C1, C2, C3, C4, C5);
return MyFunc->Eval(NeutrinoEnergy);
} [/code]

Thank you very much