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:

Inheritance graph
[legend]

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.
virtual void fitTGraphAsymmErrors (const TGraphAsymmErrors &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 29 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.

Referenced by SctAnalysis::NPtGainAlgorithm::doFit().

virtual void SctFitter::FitStrategy::fitTGraphAsymmErrors const TGraphAsymmErrors &  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.


Field Documentation

string SctFitter::FitStrategy::options [private]
 

a string containing fit options for this strategy

Definition at line 69 of file FitStrategy.h.

Referenced by getOptions(), and setOptions().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:09:51 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6