Deriving a class from RooAbsPdf

Hi @StephanH,

Thanks very much for the minimal example - it will be very helpful! If I can ask one more question, do you know which member functions need to be defined in order to make variables known to RooAbsPdf::fitTo()? I would like to be able to use this class in a fit, but the fit needs to know which variables to modify.

I have tried to implement getComponents, getParameters, and getVariables. I’ve tried functions like:

RooArgSet* morph::getComponents() const {
    RooArgSet* ret = new RooArgSet();
    ret->add(*lambda,kTRUE);
    return ret;
}

Is there a mistake in this sort of implementation? Or is there another function that must be defined? Thanks!