13 #ifndef ROOT_Fit_BasicFCN 14 #define ROOT_Fit_BasicFCN 39 template<
class DerivFunType,
class ModelFunType,
class DataType>
44 typedef typename ModelFunType::BackendType
T;
54 BasicFCN (
const std::shared_ptr<DataType> & data,
const std::shared_ptr<IModelFunction> & func) :
55 BaseObjFunction(func->NPar(), data->Size() ),
71 virtual const DataType &
Data()
const {
return *
fData; }
88 void SetData(
const std::shared_ptr<DataType> & data) {
fData = data; }
94 std::shared_ptr<DataType>
fData;
95 std::shared_ptr<IModelFunction>
fFunc;
virtual const IModelFunction & ModelFunction() const
access to const reference to the model function
void SetData(const std::shared_ptr< DataType > &data)
Set the data pointer.
void SetModelFunction(const std::shared_ptr< IModelFunction > &func)
Set the function pointer.
Namespace for new ROOT classes and functions.
std::shared_ptr< DataType > fData
std::shared_ptr< DataType > DataPtr() const
access to data pointer
virtual ~BasicFCN()
Destructor (no operations)
std::shared_ptr< IModelFunction > fFunc
virtual const DataType & Data() const
access to const reference to the data
ModelFunType::BackendType T
::ROOT::Math::IParamMultiFunctionTempl< T > IModelFunction
::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
BasicFCN(const std::shared_ptr< DataType > &data, const std::shared_ptr< IModelFunction > &func)
Constructor from data set and model function.
BasicFCN class: base class for the objective functions used in the fits It has a reference to the dat...
DerivFunType ::BaseFunc BaseFunction
BaseObjFunction::BaseFunction BaseFunction
FitMethodFunction class Interface for objective functions (like chi2 and likelihood used in the fit) ...
std::shared_ptr< IModelFunction > ModelFunctionPtr() const
access to function pointer