Logo ROOT   6.08/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< FunType > Class Template Reference

template<class FunType>
class ROOT::Fit::Chi2FCN< FunType >

Chi2FCN class for binnned fits using the least square methods.

Definition at line 68 of file Chi2FCN.h.

Public Types

typedef BasicFCN< FunType, BinDataBaseFCN
 
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
 
typedef ::ROOT::Math::IParamMultiFunction IModelFunction
 
typedef BaseObjFunction::Type_t Type_t
 
- Public Types inherited from ROOT::Math::BasicFitMethodFunction< FunType >
typedef FunType ::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)
 Constructor from data set (binned ) and model function. More...
 
 Chi2FCN (const BinData &data, const IModelFunction &func)
 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< FunType, 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< FunType >
 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< FunType, 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

std::vector< double > fGrad
 
unsigned int fNEffPoints
 

Additional Inherited Members

- Protected Types inherited from ROOT::Fit::BasicFCN< FunType, BinData >
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
 
typedef ::ROOT::Math::IParamMultiFunction IModelFunction
 
- Protected Attributes inherited from ROOT::Fit::BasicFCN< FunType, BinData >
std::shared_ptr< BinDatafData
 
std::shared_ptr< IModelFunctionfFunc
 

#include <Fit/Chi2FCN.h>

Inheritance diagram for ROOT::Fit::Chi2FCN< FunType >:
[legend]

Member Typedef Documentation

◆ BaseFCN

template<class FunType>
typedef BasicFCN<FunType,BinData> ROOT::Fit::Chi2FCN< FunType >::BaseFCN

Definition at line 72 of file Chi2FCN.h.

◆ BaseFunction

template<class FunType>
typedef BaseObjFunction::BaseFunction ROOT::Fit::Chi2FCN< FunType >::BaseFunction

Definition at line 75 of file Chi2FCN.h.

◆ BaseObjFunction

template<class FunType>
typedef ::ROOT::Math::BasicFitMethodFunction<FunType> ROOT::Fit::Chi2FCN< FunType >::BaseObjFunction

Definition at line 74 of file Chi2FCN.h.

◆ IModelFunction

template<class FunType>
typedef ::ROOT::Math::IParamMultiFunction ROOT::Fit::Chi2FCN< FunType >::IModelFunction

Definition at line 78 of file Chi2FCN.h.

◆ Type_t

template<class FunType>
typedef BaseObjFunction::Type_t ROOT::Fit::Chi2FCN< FunType >::Type_t

Definition at line 79 of file Chi2FCN.h.

Constructor & Destructor Documentation

◆ Chi2FCN() [1/3]

template<class FunType>
ROOT::Fit::Chi2FCN< FunType >::Chi2FCN ( const std::shared_ptr< BinData > &  data,
const std::shared_ptr< IModelFunction > &  func 
)
inline

Constructor from data set (binned ) and model function.

Definition at line 84 of file Chi2FCN.h.

◆ Chi2FCN() [2/3]

template<class FunType>
ROOT::Fit::Chi2FCN< FunType >::Chi2FCN ( const BinData data,
const IModelFunction func 
)
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 94 of file Chi2FCN.h.

◆ ~Chi2FCN()

template<class FunType>
virtual ROOT::Fit::Chi2FCN< FunType >::~Chi2FCN ( )
inlinevirtual

Destructor (no operations)

Definition at line 103 of file Chi2FCN.h.

◆ Chi2FCN() [3/3]

template<class FunType>
ROOT::Fit::Chi2FCN< FunType >::Chi2FCN ( const Chi2FCN< FunType > &  f)
inline

Copy constructor.

Definition at line 107 of file Chi2FCN.h.

Member Function Documentation

◆ Clone()

template<class FunType>
virtual BaseFunction* ROOT::Fit::Chi2FCN< FunType >::Clone ( ) const
inlinevirtual

Definition at line 126 of file Chi2FCN.h.

◆ DataElement()

template<class FunType>
virtual double ROOT::Fit::Chi2FCN< FunType >::DataElement ( const double *  x,
unsigned int  i,
double *  g 
) const
inlinevirtual

i-th chi-square residual

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

Definition at line 136 of file Chi2FCN.h.

◆ DoDerivative()

template<class FunType>
virtual double ROOT::Fit::Chi2FCN< FunType >::DoDerivative ( const double *  x,
unsigned int  icoord 
) const
inlineprivatevirtual

Definition at line 175 of file Chi2FCN.h.

◆ DoEval()

template<class FunType>
virtual double ROOT::Fit::Chi2FCN< FunType >::DoEval ( const double *  x) const
inlineprivatevirtual

Evaluation of the function (required by interface)

Definition at line 162 of file Chi2FCN.h.

◆ Gradient()

template<class FunType>
virtual void ROOT::Fit::Chi2FCN< FunType >::Gradient ( const double *  x,
double *  g 
) const
inlinevirtual

Definition at line 142 of file Chi2FCN.h.

◆ operator=()

template<class FunType>
Chi2FCN& ROOT::Fit::Chi2FCN< FunType >::operator= ( const Chi2FCN< FunType > &  rhs)
inline

Assignment operator.

Definition at line 116 of file Chi2FCN.h.

◆ SetNFitPoints()

template<class FunType>
virtual void ROOT::Fit::Chi2FCN< FunType >::SetNFitPoints ( unsigned int  n) const
inlineprotectedvirtual

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

Definition at line 155 of file Chi2FCN.h.

◆ Type()

template<class FunType>
virtual BaseObjFunction::Type_t ROOT::Fit::Chi2FCN< FunType >::Type ( ) const
inlinevirtual

get type of fit method function

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

Definition at line 148 of file Chi2FCN.h.

Member Data Documentation

◆ fGrad

template<class FunType>
std::vector<double> ROOT::Fit::Chi2FCN< FunType >::fGrad
mutableprivate

Definition at line 183 of file Chi2FCN.h.

◆ fNEffPoints

template<class FunType>
unsigned int ROOT::Fit::Chi2FCN< FunType >::fNEffPoints
mutableprivate

Definition at line 181 of file Chi2FCN.h.


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