13#ifndef ROOT_Fit_Chi2FCN
14#define ROOT_Fit_Chi2FCN
45template<
class DerivFunType,
class ModelFunType = ROOT::Math::IParamMultiFunction>
50 typedef typename ModelFunType::BackendType
T;
113 using BaseObjFunction::operator();
117 virtual double DataElement(
const double *
x,
unsigned int i,
double *
g,
double *
h =
nullptr,
bool fullHessian =
false)
const {
144 virtual double DoEval (
const double *
x)
const {
155 return fGrad[icoord];
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
BasicFCN class: base class for the objective functions used in the fits It has a reference to the dat...
void SetData(const std::shared_ptr< DataType > &data)
Set the data pointer.
std::shared_ptr< IModelFunction > ModelFunctionPtr() const
access to function pointer
void SetModelFunction(const std::shared_ptr< IModelFunction > &func)
Set the function pointer.
virtual const DataType & Data() const
access to const reference to the data
std::shared_ptr< DataType > DataPtr() const
access to data pointer
virtual const IModelFunction & ModelFunction() const
access to const reference to the model function
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
Chi2FCN class for binned fits using the least square methods.
BaseObjFunction::BaseFunction BaseFunction
unsigned int fNEffPoints
number of effective points used in the fit
virtual double DoDerivative(const double *x, unsigned int icoord) const
virtual BaseObjFunction::Type_t Type() const
get type of fit method function
::ROOT::EExecutionPolicy fExecutionPolicy
virtual void Gradient(const double *x, double *g) const
std::vector< double > fGrad
for derivatives
::ROOT::Math::IParamMultiFunctionTempl< T > IModelFunction
Chi2FCN(const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func, const ::ROOT::EExecutionPolicy &executionPolicy=::ROOT::EExecutionPolicy::kSequential)
Constructor from data set (binned ) and model function.
BasicFCN< DerivFunType, ModelFunType, BinData > BaseFCN
ModelFunType::BackendType T
virtual BaseFunction * Clone() const
virtual void SetNFitPoints(unsigned int n) const
set number of fit points (need to be called in const methods, make it const)
Chi2FCN(const Chi2FCN &f)
Copy constructor.
::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
virtual double DoEval(const double *x) const
Evaluation of the function (required by interface)
BaseObjFunction::Type_t Type_t
virtual double DataElement(const double *x, unsigned int i, double *g, double *h=nullptr, bool fullHessian=false) const
i-th chi-square residual
Chi2FCN & operator=(const Chi2FCN &rhs)
Assignment operator.
virtual ~Chi2FCN()
Destructor (no operations)
Chi2FCN(const BinData &data, const IModelFunction &func, const ::ROOT::EExecutionPolicy &executionPolicy=::ROOT::EExecutionPolicy::kSequential)
Same Constructor from data set (binned ) and model function cloning the function and the data.
Type_t
enumeration specifying the possible fit method types
static bool IsAGradFCN()
Static function to indicate if a function is supporting gradient.
FunctionType::BaseFunc BaseFunction
virtual void UpdateNCalls() const
update number of calls
IParamFunction interface (abstract class) describing multi-dimensional parametric functions It is a d...
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Chi2FCN< ROOT::Math::IMultiGenFunction, ROOT::Math::IParamMultiFunction > Chi2Function
Chi2FCN< ROOT::Math::IMultiGradFunction, ROOT::Math::IParamMultiFunction > Chi2GradFunction
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static double EvalChi2Effective(const IModelFunctionTempl< double > &func, const BinData &data, const double *p, unsigned int &nPoints)
static void EvalChi2Gradient(const IModelFunctionTempl< double > &func, const BinData &data, const double *p, double *g, unsigned int &nPoints, ::ROOT::EExecutionPolicy executionPolicy=::ROOT::EExecutionPolicy::kSequential, unsigned nChunks=0)
static double EvalChi2(const IModelFunction &func, const BinData &data, const double *p, unsigned int &nPoints, ::ROOT::EExecutionPolicy executionPolicy, unsigned nChunks=0)
static double EvalChi2Residual(const IModelFunctionTempl< double > &func, const BinData &data, const double *p, unsigned int i, double *g, double *h, bool hasGrad, bool fullHessian)