Using ROOT 6.18.04, it seems as though all the implemented methods for chi2FitTo are not exposed to all PDFs, but rather only the one used in the tutorial rf609_xychi2fit.
Python 3.7.4 (default, Sep 7 2019, 18:27:02)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT as R
>>> R.RooPolyVar.chi2FitTo()
RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: none of the 4 overloaded methods succeeded. Full details:
RooFitResult* RooAbsReal::chi2FitTo(RooDataHist& data, const RooCmdArg& arg1 = RooCmdArg::none(), const RooCmdArg& arg2 = RooCmdArg::none(), const RooCmdArg& arg3 = RooCmdArg::none(), const RooCmdArg& arg4 = RooCmdArg::none(), const RooCmdArg& arg5 = RooCmdArg::none(), const RooCmdArg& arg6 = RooCmdArg::none(), const RooCmdArg& arg7 = RooCmdArg::none(), const RooCmdArg& arg8 = RooCmdArg::none()) =>
unbound method RooAbsReal::chi2FitTo must be called with a RooAbsReal instance as first argument
RooFitResult* RooAbsReal::chi2FitTo(RooDataHist& data, const RooLinkedList& cmdList) =>
unbound method RooAbsReal::chi2FitTo must be called with a RooAbsReal instance as first argument
RooFitResult* RooAbsReal::chi2FitTo(RooDataSet& xydata, const RooCmdArg& arg1 = RooCmdArg::none(), const RooCmdArg& arg2 = RooCmdArg::none(), const RooCmdArg& arg3 = RooCmdArg::none(), const RooCmdArg& arg4 = RooCmdArg::none(), const RooCmdArg& arg5 = RooCmdArg::none(), const RooCmdArg& arg6 = RooCmdArg::none(), const RooCmdArg& arg7 = RooCmdArg::none(), const RooCmdArg& arg8 = RooCmdArg::none()) =>
unbound method RooAbsReal::chi2FitTo must be called with a RooAbsReal instance as first argument
RooFitResult* RooAbsReal::chi2FitTo(RooDataSet& xydata, const RooLinkedList& cmdList) =>
unbound method RooAbsReal::chi2FitTo must be called with a RooAbsReal instance as first argument
>>> R.RooGaussian.chi2FitTo()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: RooFitResult* RooAbsPdf::chi2FitTo(RooDataHist& data, const RooLinkedList& cmdList) =>
unbound method RooAbsPdf::chi2FitTo must be called with a RooAbsPdf instance as first argument
>>> R.RooGenericPdf.chi2FitTo()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: RooFitResult* RooAbsPdf::chi2FitTo(RooDataHist& data, const RooLinkedList& cmdList) =>
unbound method RooAbsPdf::chi2FitTo must be called with a RooAbsPdf instance as first argument
>>>
Is there a way to make these exposed in user code?