13 #ifndef ROOT_Fit_LogLikelihoodFCN 14 #define ROOT_Fit_LogLikelihoodFCN 40 template<
class DerivFunType,
class ModelFunType = ROOT::Math::IParamMultiFunction>
45 typedef typename ModelFunType::BackendType
T;
63 fGrad (
std::vector<double> ( func->NPar() ) ),
75 fGrad (
std::vector<double> ( func.NPar() ) ),
121 virtual double DataElement(
const double *
x,
unsigned int i,
double *
g)
const {
155 virtual double DoEval (
const double *
x)
const {
163 return fGrad[icoord];
::ROOT::Math::IParamMultiFunctionTempl< T > IModelFunction
virtual void UpdateNCalls() const
update number of calls
Type_t
enumeration specyfing the possible fit method types
virtual const IModelFunction & ModelFunction() const
access to const reference to the model function
void SetData(const std::shared_ptr< UnBinData > &data)
Set the data pointer.
void SetModelFunction(const std::shared_ptr< IModelFunction > &func)
Set the function pointer.
Namespace for new ROOT classes and functions.
LogLikelihoodFCN & operator=(const LogLikelihoodFCN &rhs)
Assignment operator.
std::shared_ptr< UnBinData > DataPtr() const
access to data pointer
static double EvalLogL(const IModelFunctionTempl< double > &func, const UnBinData &data, const double *p, int iWeight, bool extended, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy, unsigned nChunks=0)
LogLikelihoodFCN(const LogLikelihoodFCN &f)
Copy constructor.
virtual unsigned int NFitPoints() const
LogLikelihoodFCN class for likelihood fits.
void UseSumOfWeightSquare(bool on=true)
virtual BaseFunction * Clone() const
clone the function (need to return Base for Windows)
Class describing the unbinned data sets (just x coordinates values) of any dimensions.
ROOT::Fit::ExecutionPolicy fExecutionPolicy
virtual const UnBinData & Data() const
access to const reference to the data
virtual BaseObjFunction::Type_t Type() const
get type of fit method function
BaseObjFunction::BaseFunction BaseFunction
BasicFCN< DerivFunType, ModelFunType, UnBinData > BaseFCN
LogLikelihoodFCN(const std::shared_ptr< UnBinData > &data, const std::shared_ptr< IModelFunction > &func, int weight=0, bool extended=false, const ROOT::Fit::ExecutionPolicy &executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial)
Constructor from unbin data set and model function (pdf)
LogLikelihoodFCN< ROOT::Math::IMultiGradFunction, ROOT::Math::IParamMultiFunction > LogLikelihoodGradFunction
BasicFCN class: base class for the objective functions used in the fits It has a reference to the dat...
BaseObjFunction::Type_t Type_t
DerivFunType ::BaseFunc BaseFunction
LogLikelihoodFCN< ROOT::Math::IMultiGenFunction, ROOT::Math::IParamMultiFunction > LogLikelihoodFunction
virtual double DoDerivative(const double *x, unsigned int icoord) const
static void EvalLogLGradient(const IModelFunctionTempl< double > &func, const UnBinData &data, const double *p, double *g, unsigned int &nPoints, ROOT::Fit::ExecutionPolicy executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial, unsigned nChunks=0)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
std::vector< double > fGrad
double EvaluatePdf(const IModelFunction &func, const UnBinData &data, const double *x, unsigned int ipoint, double *g=0)
evaluate the pdf contribution to the LogL given a model function and the BinPoint data...
virtual void Gradient(const double *x, double *g) const
virtual double DataElement(const double *x, unsigned int i, double *g) const
i-th likelihood contribution and its gradient
virtual double DoEval(const double *x) const
Evaluation of the function (required by interface)
ModelFunType::BackendType T
std::shared_ptr< IModelFunction > ModelFunctionPtr() const
access to function pointer
LogLikelihoodFCN(const UnBinData &data, const IModelFunction &func, int weight=0, bool extended=false, const ROOT::Fit::ExecutionPolicy &executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial)
Constructor from unbin data set and model function (pdf) for object managed by users.
virtual ~LogLikelihoodFCN()
Destructor (no operations)
::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
static constexpr double g