Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

SctFitter::FitStrategy Class Reference

Motivated by the need to fitting rapidly, abstracted fit strategy allows different fit algorithms to be used. More...

#include <FitStrategy.h>

Inheritance diagram for SctFitter::FitStrategy:

noncopyable SctFitter::MinuitFitStrategy SctFitter::NagFitStrategy SctFitter::RootFitStrategy

Public Member Functions

virtual void fitTH1 (const TH1 &hist, TF1 &fit) const=0 throw (Sct::LogicError, Sct::MathsError)
 Fit Root TH1 using the current options.

virtual void fitTGraph (const TGraph &graph, TF1 &fit) const=0 throw (Sct::LogicError, Sct::MathsError)
 Fit Root TGraph using the current options.

virtual void fitTGraphErrors (const TGraphErrors &graph, TF1 &fit) const=0 throw (Sct::LogicError, Sct::MathsError)
 Fit Root TGraph using the current options.

void setOptions (string opt) throw ()
const string & getOptions () const throw ()
virtual const string & getName () const=0 throw ()

Protected Member Functions

 FitStrategy (string opt=string("")) throw ()
 Clients can make a FitStrategy Object.

virtual ~FitStrategy ()
 virtual destructor.


Private Attributes

string options
 a string containing fit options for this strategy


Detailed Description

Motivated by the need to fitting rapidly, abstracted fit strategy allows different fit algorithms to be used.

Allows easy switch from say ROOT fitting to a custom fitter. Concrete strategies should add themselves to the map using the addToMap function, at static initialization. It is assumed that:
o The histogram errors have been set
o The function limits have been set
o The histogram is truly a TH1 (not a silly ROOT TH2 which inherits from TH1!)

Author:
Alan Barr
Date:
17/5/03

Definition at line 28 of file FitStrategy.h.


Constructor & Destructor Documentation

SctFitter::FitStrategy::FitStrategy string    opt = string("") throw () [protected]
 

Clients can make a FitStrategy Object.

Definition at line 20 of file FitStrategy.cpp.

SctFitter::FitStrategy::~FitStrategy   [protected, virtual]
 

virtual destructor.

Definition at line 14 of file FitStrategy.cpp.


Member Function Documentation

virtual void SctFitter::FitStrategy::fitTGraph const TGraph &    graph,
TF1 &    fit
const throw (Sct::LogicError, Sct::MathsError) [pure virtual]
 

Fit Root TGraph using the current options.

Parameters:
hist input histogram to be fitted
fit output

Implemented in SctFitter::MinuitFitStrategy, SctFitter::NagFitStrategy, and SctFitter::RootFitStrategy.

virtual void SctFitter::FitStrategy::fitTGraphErrors const TGraphErrors &    graph,
TF1 &    fit
const throw (Sct::LogicError, Sct::MathsError) [pure virtual]
 

Fit Root TGraph using the current options.

Parameters:
hist input histogram to be fitted
fit output

Implemented in SctFitter::MinuitFitStrategy, SctFitter::NagFitStrategy, and SctFitter::RootFitStrategy.

virtual void SctFitter::FitStrategy::fitTH1 const TH1 &    hist,
TF1 &    fit
const throw (Sct::LogicError, Sct::MathsError) [pure virtual]
 

Fit Root TH1 using the current options.

Parameters:
hist input histogram to be fitted
fit output

Implemented in SctFitter::MinuitFitStrategy, SctFitter::NagFitStrategy, and SctFitter::RootFitStrategy.

Referenced by SctFitter::FitAlgorithm::doFit().

virtual const string& SctFitter::FitStrategy::getName   const throw () [pure virtual]
 

Implemented in SctFitter::MinuitFitStrategy, SctFitter::NagFitStrategy, and SctFitter::RootFitStrategy.

const string & SctFitter::FitStrategy::getOptions   const throw ()
 

Definition at line 16 of file FitStrategy.cpp.

Referenced by SctFitter::NagFitStrategy::quiet(), and SctFitter::NagFitStrategy::ranged().

void SctFitter::FitStrategy::setOptions string    opt throw ()
 

Definition at line 10 of file FitStrategy.cpp.


Field Documentation

string SctFitter::FitStrategy::options [private]
 

a string containing fit options for this strategy

Definition at line 62 of file FitStrategy.h.


The documentation for this class was generated from the following files:
Generated on Mon Dec 15 19:38:03 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3