ROOT  6.06/09
Reference Guide
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 66 of file Chi2FCN.h.

Public Types

typedef BasicFCN< FunType, BinDataBaseFCN
 
typedef ::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
 
typedef BaseObjFunction::BaseFunction BaseFunction
 
typedef ::ROOT::Math::IParamMultiFunction IModelFunction
 
typedef BaseObjFunction::Type_t Type_t
 
- Public Types inherited from ROOT::Math::BasicFitMethodFunction< FunType >
enum  Type_t
 enumeration specyfing the possible fit method types More...
 
typedef FunType::BaseFunc BaseFunction
 

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...
 
virtual ~Chi2FCN ()
 Destructor (no operations) More...
 
 Chi2FCN (const Chi2FCN &f)
 Copy constructor. More...
 
Chi2FCNoperator= (const Chi2FCN &rhs)
 Assignment operator. 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
 
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 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 unsigned int NCalls () const
 return the total number of function calls (overrided if needed) More...
 
virtual void UpdateNCalls () const
 update number of calls More...
 
virtual void ResetNCalls ()
 reset number of function 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 DoEval (const double *x) const
 Evaluation of the function (required by interface) More...
 
virtual double DoDerivative (const double *x, unsigned int icoord) const
 

Private Attributes

unsigned int fNEffPoints
 
std::vector< doublefGrad
 

Additional Inherited Members

- Protected Types inherited from ROOT::Fit::BasicFCN< FunType, BinData >
typedef ::ROOT::Math::BasicFitMethodFunction< FunType > BaseObjFunction
 
typedef BaseObjFunction::BaseFunction BaseFunction
 
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 >:
+ Collaboration diagram for ROOT::Fit::Chi2FCN< FunType >:

Member Typedef Documentation

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

Definition at line 70 of file Chi2FCN.h.

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

Definition at line 73 of file Chi2FCN.h.

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

Definition at line 72 of file Chi2FCN.h.

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

Definition at line 76 of file Chi2FCN.h.

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

Definition at line 77 of file Chi2FCN.h.

Constructor & Destructor Documentation

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 82 of file Chi2FCN.h.

Referenced by ROOT::Fit::Chi2FCN< FunType >::Clone().

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 92 of file Chi2FCN.h.

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

Destructor (no operations)

Definition at line 101 of file Chi2FCN.h.

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

Copy constructor.

Definition at line 105 of file Chi2FCN.h.

Member Function Documentation

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

Definition at line 124 of file Chi2FCN.h.

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 134 of file Chi2FCN.h.

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

Definition at line 173 of file Chi2FCN.h.

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 160 of file Chi2FCN.h.

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

Definition at line 140 of file Chi2FCN.h.

Referenced by ROOT::Fit::Chi2FCN< FunType >::DoDerivative().

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

Assignment operator.

Definition at line 114 of file Chi2FCN.h.

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 153 of file Chi2FCN.h.

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 146 of file Chi2FCN.h.

Referenced by ROOT::Fit::Fitter::DoLeastSquareFit().

Member Data Documentation

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

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