Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType > Class Template Reference

template<class DerivFunType, class ModelFunType = ROOT::Math::IParamMultiFunction>
class ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >

class evaluating the log likelihood for binned Poisson likelihood fits it is template to distinguish gradient and non-gradient case

Definition at line 46 of file PoissonLikelihoodFCN.h.

Public Types

typedef BasicFCN< DerivFunType, ModelFunType, BinDataBaseFCN
 
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
 
typedef ::ROOT::Math::IParamMultiFunctionTempl< TIModelFunction
 
typedef ModelFunType::BackendType T
 
typedef BaseObjFunction::Type_t Type_t
 
- Public Types inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType >
typedef FunctionType::BaseFunc BaseFunction
 
enum  Type_t
 enumeration specyfing the possible fit method types More...
 

Public Member Functions

 PoissonLikelihoodFCN (const BinData &data, const IModelFunction &func, int weight=0, bool extended=true, const ::ROOT::EExecutionPolicy &executionPolicy=::ROOT::EExecutionPolicy::kSequential)
 Constructor from unbin data set and model function (pdf) managed by the users.
 
 PoissonLikelihoodFCN (const PoissonLikelihoodFCN &f)
 Copy constructor.
 
 PoissonLikelihoodFCN (const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func, int weight=0, bool extended=true, const ::ROOT::EExecutionPolicy &executionPolicy=::ROOT::EExecutionPolicy::kSequential)
 Constructor from unbin data set and model function (pdf)
 
virtual ~PoissonLikelihoodFCN ()
 Destructor (no operations)
 
virtual BaseFunctionClone () const
 clone the function (need to return Base for Windows)
 
virtual double DataElement (const double *x, unsigned int i, double *g) const
 i-th likelihood element and its gradient
 
virtual void Gradient (const double *x, double *g) const
 evaluate gradient
 
bool IsWeighted () const
 
virtual unsigned int NFitPoints () const
 
PoissonLikelihoodFCNoperator= (const PoissonLikelihoodFCN &rhs)
 Assignment operator.
 
virtual BaseObjFunction::Type_t Type () const
 get type of fit method function
 
void UseSumOfWeights ()
 
void UseSumOfWeightSquare (bool on=true)
 
- Public Member Functions inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, DataType >
virtual const DataType & Data () const
 access to const reference to the data
 
std::shared_ptr< DataType > DataPtr () const
 access to data pointer
 
virtual const IModelFunctionModelFunction () const
 access to const reference to the model function
 
std::shared_ptr< IModelFunctionModelFunctionPtr () const
 access to function pointer
 
- Public Member Functions inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType >
 BasicFitMethodFunction (int dim, int npoint)
 
virtual ~BasicFitMethodFunction ()
 Virtual Destructor (no operations)
 
virtual unsigned int NCalls () const
 return the total number of function calls (overrided if needed)
 
virtual unsigned int NDim () const
 Number of dimension (parameters) .
 
virtual unsigned int NPoints () const
 return the number of data points used in evaluating the function
 
virtual void ResetNCalls ()
 reset number of function calls
 
virtual void UpdateNCalls () const
 update number of calls
 

Private Member Functions

virtual double DoDerivative (const double *x, unsigned int icoord) const
 
virtual double DoEval (const double *x) const
 Evaluation of the function (required by interface)
 

Private Attributes

::ROOT::EExecutionPolicy fExecutionPolicy
 
std::vector< doublefGrad
 
bool fIsExtended
 
unsigned int fNEffPoints
 
int fWeight
 

Additional Inherited Members

- Protected Types inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, DataType >
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
 
typedef ::ROOT::Math::IParamMultiFunctionTempl< TIModelFunction
 
typedef ModelFunType::BackendType T
 
- Protected Member Functions inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, DataType >
 BasicFCN (const std::shared_ptr< DataType > &data, const std::shared_ptr< IModelFunction > &func)
 Constructor from data set and model function.
 
virtual ~BasicFCN ()
 Destructor (no operations)
 
void SetData (const std::shared_ptr< DataType > &data)
 Set the data pointer.
 
void SetModelFunction (const std::shared_ptr< IModelFunction > &func)
 Set the function pointer.
 
- Protected Attributes inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, DataType >
std::shared_ptr< DataType > fData
 
std::shared_ptr< IModelFunctionfFunc
 

#include <Fit/PoissonLikelihoodFCN.h>

Inheritance diagram for ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >:
[legend]

Member Typedef Documentation

◆ BaseFCN

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef BasicFCN<DerivFunType,ModelFunType,BinData> ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::BaseFCN

Definition at line 50 of file PoissonLikelihoodFCN.h.

◆ BaseFunction

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef BaseObjFunction::BaseFunction ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::BaseFunction

Definition at line 53 of file PoissonLikelihoodFCN.h.

◆ BaseObjFunction

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef ::ROOT::Math::BasicFitMethodFunction<DerivFunType> ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::BaseObjFunction

Definition at line 52 of file PoissonLikelihoodFCN.h.

◆ IModelFunction

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef ::ROOT::Math::IParamMultiFunctionTempl<T> ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::IModelFunction

Definition at line 55 of file PoissonLikelihoodFCN.h.

◆ T

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef ModelFunType::BackendType ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::T

Definition at line 49 of file PoissonLikelihoodFCN.h.

◆ Type_t

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
typedef BaseObjFunction::Type_t ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::Type_t

Definition at line 56 of file PoissonLikelihoodFCN.h.

Constructor & Destructor Documentation

◆ PoissonLikelihoodFCN() [1/3]

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::PoissonLikelihoodFCN ( const std::shared_ptr< BinData > &  data,
const std::shared_ptr< IModelFunction > &  func,
int  weight = 0,
bool  extended = true,
const ::ROOT::EExecutionPolicy executionPolicy = ::ROOT::EExecutionPolicy::kSequential 
)
inline

Constructor from unbin data set and model function (pdf)

Definition at line 61 of file PoissonLikelihoodFCN.h.

◆ PoissonLikelihoodFCN() [2/3]

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::PoissonLikelihoodFCN ( const BinData data,
const IModelFunction func,
int  weight = 0,
bool  extended = true,
const ::ROOT::EExecutionPolicy executionPolicy = ::ROOT::EExecutionPolicy::kSequential 
)
inline

Constructor from unbin data set and model function (pdf) managed by the users.

Definition at line 73 of file PoissonLikelihoodFCN.h.

◆ ~PoissonLikelihoodFCN()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::~PoissonLikelihoodFCN ( )
inlinevirtual

Destructor (no operations)

Definition at line 86 of file PoissonLikelihoodFCN.h.

◆ PoissonLikelihoodFCN() [3/3]

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::PoissonLikelihoodFCN ( const PoissonLikelihoodFCN< DerivFunType, ModelFunType > &  f)
inline

Copy constructor.

Definition at line 91 of file PoissonLikelihoodFCN.h.

Member Function Documentation

◆ Clone()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual BaseFunction * ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::Clone ( ) const
inlinevirtual

clone the function (need to return Base for Windows)

Definition at line 115 of file PoissonLikelihoodFCN.h.

◆ DataElement()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual double ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::DataElement ( const double x,
unsigned int  i,
double g 
) const
inlinevirtual

i-th likelihood element and its gradient

Implements ROOT::Math::BasicFitMethodFunction< DerivFunType >.

Definition at line 121 of file PoissonLikelihoodFCN.h.

◆ DoDerivative()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual double ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::DoDerivative ( const double x,
unsigned int  icoord 
) const
inlineprivatevirtual

Definition at line 169 of file PoissonLikelihoodFCN.h.

◆ DoEval()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual double ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::DoEval ( const double x) const
inlineprivatevirtual

Evaluation of the function (required by interface)

Definition at line 162 of file PoissonLikelihoodFCN.h.

◆ Gradient()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual void ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::Gradient ( const double x,
double g 
) const
inlinevirtual

evaluate gradient

Definition at line 127 of file PoissonLikelihoodFCN.h.

◆ IsWeighted()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
bool ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::IsWeighted ( ) const
inline

Definition at line 137 of file PoissonLikelihoodFCN.h.

◆ NFitPoints()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual unsigned int ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::NFitPoints ( ) const
inlinevirtual

Definition at line 118 of file PoissonLikelihoodFCN.h.

◆ operator=()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
PoissonLikelihoodFCN & ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::operator= ( const PoissonLikelihoodFCN< DerivFunType, ModelFunType > &  rhs)
inline

Assignment operator.

Definition at line 103 of file PoissonLikelihoodFCN.h.

◆ Type()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual BaseObjFunction::Type_t ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::Type ( ) const
inlinevirtual

get type of fit method function

Reimplemented from ROOT::Math::BasicFitMethodFunction< DerivFunType >.

Definition at line 135 of file PoissonLikelihoodFCN.h.

◆ UseSumOfWeights()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
void ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::UseSumOfWeights ( )
inline

Definition at line 140 of file PoissonLikelihoodFCN.h.

◆ UseSumOfWeightSquare()

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
void ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::UseSumOfWeightSquare ( bool  on = true)
inline

Definition at line 147 of file PoissonLikelihoodFCN.h.

Member Data Documentation

◆ fExecutionPolicy

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
::ROOT::EExecutionPolicy ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::fExecutionPolicy
private

Definition at line 184 of file PoissonLikelihoodFCN.h.

◆ fGrad

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
std::vector<double> ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::fGrad
mutableprivate

Definition at line 182 of file PoissonLikelihoodFCN.h.

◆ fIsExtended

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
bool ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::fIsExtended
private

Definition at line 177 of file PoissonLikelihoodFCN.h.

◆ fNEffPoints

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
unsigned int ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::fNEffPoints
mutableprivate

Definition at line 180 of file PoissonLikelihoodFCN.h.

◆ fWeight

template<class DerivFunType , class ModelFunType = ROOT::Math::IParamMultiFunction>
int ROOT::Fit::PoissonLikelihoodFCN< DerivFunType, ModelFunType >::fWeight
private

Definition at line 178 of file PoissonLikelihoodFCN.h.

  • math/mathcore/inc/Fit/PoissonLikelihoodFCN.h