Logo ROOT   6.12/07
Reference Guide
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType > Class Template Reference

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

Chi2FCN class for binnned fits using the least square methods.

Definition at line 49 of file Chi2FCN.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 DerivFunType ::BaseFunc BaseFunction
 
enum  Type_t
 enumeration specyfing the possible fit method types More...
 

Public Member Functions

 Chi2FCN (const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func, const ROOT::Fit::ExecutionPolicy &executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial)
 Constructor from data set (binned ) and model function. More...
 
 Chi2FCN (const BinData &data, const IModelFunction &func, const ROOT::Fit::ExecutionPolicy &executionPolicy=ROOT::Fit::ExecutionPolicy::kSerial)
 Same Constructor from data set (binned ) and model function but now managed by the user we clone the function but not the data. More...
 
 Chi2FCN (const Chi2FCN &f)
 Copy constructor. More...
 
virtual ~Chi2FCN ()
 Destructor (no operations) More...
 
virtual BaseFunctionClone () const
 
virtual double DataElement (const double *x, unsigned int i, double *g) const
 i-th chi-square residual More...
 
virtual void Gradient (const double *x, double *g) const
 
Chi2FCNoperator= (const Chi2FCN &rhs)
 Assignment operator. More...
 
virtual BaseObjFunction::Type_t Type () const
 get type of fit method function More...
 
- Public Member Functions inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, BinData >
virtual const BinDataData () const
 access to const reference to the data More...
 
std::shared_ptr< BinDataDataPtr () const
 access to data pointer More...
 
virtual const IModelFunctionModelFunction () const
 access to const reference to the model function More...
 
std::shared_ptr< IModelFunctionModelFunctionPtr () const
 access to function pointer More...
 
- Public Member Functions inherited from ROOT::Math::BasicFitMethodFunction< DerivFunType >
 BasicFitMethodFunction (int dim, int npoint)
 
virtual ~BasicFitMethodFunction ()
 Virtual Destructor (no operations) More...
 
virtual unsigned int NCalls () const
 return the total number of function calls (overrided if needed) More...
 
virtual unsigned int NDim () const
 Number of dimension (parameters) . More...
 
virtual unsigned int NPoints () const
 return the number of data points used in evaluating the function More...
 
virtual void ResetNCalls ()
 reset number of function calls More...
 
virtual void UpdateNCalls () const
 update number of calls More...
 

Protected Member Functions

virtual void SetNFitPoints (unsigned int n) const
 set number of fit points (need to be called in const methods, make it const) More...
 
- Protected Member Functions inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, BinData >
 BasicFCN (const std::shared_ptr< BinData > &data, const std::shared_ptr< IModelFunction > &func)
 Constructor from data set and model function. More...
 
virtual ~BasicFCN ()
 Destructor (no operations) More...
 
void SetData (const std::shared_ptr< BinData > &data)
 Set the data pointer. More...
 
void SetModelFunction (const std::shared_ptr< IModelFunction > &func)
 Set the function pointer. More...
 

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) More...
 

Private Attributes

ROOT::Fit::ExecutionPolicy fExecutionPolicy
 
std::vector< double > fGrad
 
unsigned int fNEffPoints
 

Additional Inherited Members

- Protected Types inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, BinData >
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::BasicFitMethodFunction< DerivFunType > BaseObjFunction
 
typedef ::ROOT::Math::IParamMultiFunctionTempl< TIModelFunction
 
typedef ModelFunType::BackendType T
 
- Protected Attributes inherited from ROOT::Fit::BasicFCN< DerivFunType, ModelFunType, BinData >
std::shared_ptr< BinDatafData
 
std::shared_ptr< IModelFunctionfFunc
 

#include <Fit/Chi2FCN.h>

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

Member Typedef Documentation

◆ BaseFCN

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

Definition at line 54 of file Chi2FCN.h.

◆ BaseFunction

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

Definition at line 57 of file Chi2FCN.h.

◆ BaseObjFunction

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

Definition at line 56 of file Chi2FCN.h.

◆ IModelFunction

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

Definition at line 60 of file Chi2FCN.h.

◆ T

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

Definition at line 53 of file Chi2FCN.h.

◆ Type_t

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

Definition at line 61 of file Chi2FCN.h.

Constructor & Destructor Documentation

◆ Chi2FCN() [1/3]

template<class DerivFunType, class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Chi2FCN ( const std::shared_ptr< BinData > &  data,
const std::shared_ptr< IModelFunction > &  func,
const ROOT::Fit::ExecutionPolicy executionPolicy = ROOT::Fit::ExecutionPolicy::kSerial 
)
inline

Constructor from data set (binned ) and model function.

Definition at line 66 of file Chi2FCN.h.

◆ Chi2FCN() [2/3]

template<class DerivFunType, class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::Chi2FCN ( const BinData data,
const IModelFunction func,
const ROOT::Fit::ExecutionPolicy executionPolicy = ROOT::Fit::ExecutionPolicy::kSerial 
)
inline

Same Constructor from data set (binned ) and model function but now managed by the user we clone the function but not the data.

Definition at line 77 of file Chi2FCN.h.

◆ ~Chi2FCN()

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

Destructor (no operations)

Definition at line 87 of file Chi2FCN.h.

◆ Chi2FCN() [3/3]

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

Copy constructor.

Definition at line 91 of file Chi2FCN.h.

Member Function Documentation

◆ Clone()

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

Definition at line 111 of file Chi2FCN.h.

◆ DataElement()

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

i-th chi-square residual

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

Definition at line 121 of file Chi2FCN.h.

◆ DoDerivative()

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

Definition at line 156 of file Chi2FCN.h.

◆ DoEval()

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

Evaluation of the function (required by interface)

Definition at line 147 of file Chi2FCN.h.

◆ Gradient()

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

Definition at line 127 of file Chi2FCN.h.

◆ operator=()

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

Assignment operator.

Definition at line 101 of file Chi2FCN.h.

◆ SetNFitPoints()

template<class DerivFunType, class ModelFunType = ROOT::Math::IParamMultiFunction>
virtual void ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::SetNFitPoints ( unsigned int  n) const
inlineprotectedvirtual

set number of fit points (need to be called in const methods, make it const)

Definition at line 140 of file Chi2FCN.h.

◆ Type()

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

get type of fit method function

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

Definition at line 134 of file Chi2FCN.h.

Member Data Documentation

◆ fExecutionPolicy

template<class DerivFunType, class ModelFunType = ROOT::Math::IParamMultiFunction>
ROOT::Fit::ExecutionPolicy ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >::fExecutionPolicy
private

Definition at line 165 of file Chi2FCN.h.

◆ fGrad

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

Definition at line 164 of file Chi2FCN.h.

◆ fNEffPoints

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

Definition at line 162 of file Chi2FCN.h.

Libraries for ROOT::Fit::Chi2FCN< DerivFunType, ModelFunType >:
[legend]

The documentation for this class was generated from the following file: