13 #ifndef ROOT_Fit_BasicFCN
14 #define ROOT_Fit_BasicFCN
16 #ifndef ROOT_Math_FitMethodFunction
20 #ifndef ROOT_Math_IParamFunction
42 template<
class FunType,
class DataType>
56 BasicFCN (
const std::shared_ptr<DataType> & data,
const std::shared_ptr<IModelFunction> &
func) :
57 BaseObjFunction(func->
NPar(), data->
Size() ),
73 virtual const DataType &
Data()
const {
return *
fData; }
90 void SetData(
const std::shared_ptr<DataType> & data) {
fData = data; }
96 std::shared_ptr<DataType>
fData;
97 std::shared_ptr<IModelFunction>
fFunc;
::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
Namespace for new ROOT classes and functions.
virtual const IModelFunction & ModelFunction() const
access to const reference to the model function
void SetModelFunction(const std::shared_ptr< IModelFunction > &func)
Set the function pointer.
virtual const DataType & Data() const
access to const reference to the data
BasicFCN(const std::shared_ptr< DataType > &data, const std::shared_ptr< IModelFunction > &func)
Constructor from data set and model function.
std::shared_ptr< DataType > fData
std::shared_ptr< IModelFunction > fFunc
void SetData(const std::shared_ptr< DataType > &data)
Set the data pointer.
BasicFCN class: base class for the objective functions used in the fits It has a reference to the dat...
FunType::BaseFunc BaseFunction
FitMethodFunction class Interface for objective functions (like chi2 and likelihood used in the fit) ...
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
double func(double *x, double *p)
std::shared_ptr< IModelFunction > ModelFunctionPtr() const
access to function pointer
::ROOT::Math::IParamMultiFunction IModelFunction
IParametricFunctionMultiDim IParamMultiFunction
BaseObjFunction::BaseFunction BaseFunction
std::shared_ptr< DataType > DataPtr() const
access to data pointer
virtual ~BasicFCN()
Destructor (no operations)