13 #ifndef ROOT_Fit_PoissonLikelihoodFCN 14 #define ROOT_Fit_PoissonLikelihoodFCN 16 #ifndef ROOT_Fit_BasicFCN 20 #ifndef ROOT_Math_IParamFunction 24 #ifndef ROOT_Fit_BinData 28 #ifndef ROOT_Fit_FitUtil 55 template<
class FunType>
71 PoissonLikelihoodFCN (
const std::shared_ptr<BinData> &
data,
const std::shared_ptr<IModelFunction> &
func,
int weight = 0,
bool extended =
true ) :
127 virtual double DataElement(
const double *
x,
unsigned int i,
double * g)
const {
133 virtual void Gradient(
const double *
x,
double *g)
const {
166 virtual double DoEval (
const double *
x)
const {
174 return fGrad[icoord];
virtual void UpdateNCalls() const
update number of calls
Type_t
enumeration specyfing the possible fit method types
virtual unsigned int NFitPoints() const
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
double EvaluatePoissonBinPdf(const IModelFunction &func, const BinData &data, const double *x, unsigned int ipoint, double *g=0)
evaluate the pdf contribution to the Poisson LogL given a model function and the BinPoint data...
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 double DataElement(const double *x, unsigned int i, double *g) const
i-th likelihood element and its gradient
virtual BaseObjFunction::Type_t Type() const
get type of fit method function
PoissonLikelihoodFCN(const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func, int weight=0, bool extended=true)
Constructor from unbin data set and model function (pdf)
PoissonLikelihoodFCN(const PoissonLikelihoodFCN &f)
Copy constructor.
std::vector< double > fGrad
void EvaluatePoissonLogLGradient(const IModelFunction &func, const BinData &data, const double *x, double *grad)
evaluate the Poisson LogL given a model function and the data at the point x.
class evaluating the log likelihood for binned Poisson likelihood fits it is template to distinguish ...
virtual ~PoissonLikelihoodFCN()
Destructor (no operations)
virtual const BinData & Data() const
access to const reference to the data
void UseSumOfWeightSquare(bool on=true)
virtual double DoDerivative(const double *x, unsigned int icoord) const
void SetData(const std::shared_ptr< BinData > &data)
Set the data pointer.
BasicFCN class: base class for the objective functions used in the fits It has a reference to the dat...
std::shared_ptr< IModelFunction > ModelFunctionPtr() const
access to function pointer
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
double EvaluatePoissonLogL(const IModelFunction &func, const BinData &data, const double *x, int iWeight, bool extended, unsigned int &nPoints)
evaluate the Poisson LogL given a model function and the data at the point x.
FunType ::BaseFunc BaseFunction
PoissonLikelihoodFCN< ROOT::Math::IMultiGenFunction > PoissonLLFunction
virtual BaseFunction * Clone() const
clone the function (need to return Base for Windows)
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)
PoissonLikelihoodFCN< ROOT::Math::IMultiGradFunction > PoissonLLGradFunction
IParametricFunctionMultiDim IParamMultiFunction
virtual double DoEval(const double *x) const
Evaluation of the function (required by interface)
BaseObjFunction::BaseFunction BaseFunction
virtual void Gradient(const double *x, double *g) const
evaluate gradient
PoissonLikelihoodFCN & operator=(const PoissonLikelihoodFCN &rhs)
Assignment operator.
BasicFCN< FunType, BinData > BaseFCN
::ROOT::Math::IParamMultiFunction IModelFunction
std::shared_ptr< BinData > DataPtr() const
access to data pointer
::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
PoissonLikelihoodFCN(const BinData &data, const IModelFunction &func, int weight=0, bool extended=true)
Constructor from unbin data set and model function (pdf) managed by the users.