GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TGo4FitterConfig Class Reference

#include <TGo4FitterConfig.h>

+ Inheritance diagram for TGo4FitterConfig:

Public Member Functions

 TGo4FitterConfig ()
 
 TGo4FitterConfig (const char *iName, const char *iTitle)
 
virtual ~TGo4FitterConfig ()
 
void AddParNew (const char *ParName, Double_t iValue=0)
 
virtual Bool_t SetParFixed (const char *ParName, Bool_t iFixed=kTRUE)
 
virtual Bool_t SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax)
 
virtual Bool_t SetParEpsilon (const char *ParName, Double_t Epsilon)
 
virtual Bool_t GetParFixed (const char *ParName)
 
virtual Bool_t GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
 
virtual Bool_t GetParEpsilon (const char *ParName, Double_t &Epsilon)
 
void SetParInit (const char *FullName, Double_t iValue)
 
void SetParInit (const char *FullName, const char *iExpression)
 
void SetParDepend (const char *FullName, const char *iExpression)
 
void AddResult (const char *Expression)
 
void AddResult (Double_t Value)
 
TGo4FitParsListGetParsCfg ()
 
TGo4FitParsListGetParsNew ()
 
TObjArray & GetParsInit ()
 
TObjArray & GetParsDepend ()
 
TObjArray & GetResults ()
 
void DoAction (TGo4FitterAbstract *Fitter) override
 
void Print (Option_t *option="") const override
 
- Public Member Functions inherited from TGo4FitterAction
 TGo4FitterAction ()
 
 TGo4FitterAction (const char *Name, const char *Title, TNamed *Owner=nullptr)
 
virtual ~TGo4FitterAction ()
 
virtual Bool_t CanChangeFitter () const
 
virtual Bool_t NeedBuffers () const
 
- Public Member Functions inherited from TGo4FitNamed
 TGo4FitNamed ()
 
 TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr)
 
virtual ~TGo4FitNamed ()
 
const char * GetFullName ()
 
const char * GetOwnerFullName ()
 
void SetOwner (TNamed *iOwner)
 
TNamed * GetOwner ()
 
void Print (Option_t *option="") const override
 

Protected Member Functions

TGo4FitParameterMakeParForProperties (const char *ParName)
 
TGo4FitDependencyFindDepen (const char *FullName, TObjArray *list)
 

Protected Attributes

TGo4FitParsList fxParsCfg
 
TGo4FitParsList fxParsNew
 
TObjArray fxParsInit
 
TObjArray fxParsDepend
 
TObjArray fxResults
 
Bool_t fbFixedByDefault {kFALSE}
 

Detailed Description

Fitter configuration action By default all fitter parameters are used in optimization as independent from each other. But there are a lot of situation, then one would like to introduce some kind of dependency between parameters. For instance, two lines have constant difference in positions. In other cases some of the parameter properties should be redefined without touching parameter object itself. For such a cases configuration class TGo4FitterConfig was introduced. There are several routines of TGo4FitterConfig class, which provide useful fitter configurations: SetParFixed() - fix value of given parameter; SetParRange() - fix range for given parameter; SetParEpsilon() - set initial error for given parameter. SetParInit() - set initial value for parameter (can be double value or expression); SetParDepend() - set dependency of given parameter via expression; AddParNew() - create new parameter, which can be used in expressions. Several configuration objects can be added to actions list. It may be useful, if several minimization routines are used. Then before each minimization action new configuration can be applied.

Definition at line 36 of file TGo4FitterConfig.h.

Constructor & Destructor Documentation

◆ TGo4FitterConfig() [1/2]

TGo4FitterConfig::TGo4FitterConfig ( )

Default constructor.

Definition at line 22 of file TGo4FitterConfig.cxx.

◆ TGo4FitterConfig() [2/2]

TGo4FitterConfig::TGo4FitterConfig ( const char *  iName,
const char *  iTitle 
)

Creates TGo4FiierConfig object with given name and Title.

Definition at line 27 of file TGo4FitterConfig.cxx.

References fxParsDepend, fxParsInit, and fxResults.

◆ ~TGo4FitterConfig()

TGo4FitterConfig::~TGo4FitterConfig ( )
virtual

Destroys TGo4FitterConfig object.

Definition at line 36 of file TGo4FitterConfig.cxx.

Member Function Documentation

◆ AddParNew()

void TGo4FitterConfig::AddParNew ( const char *  ParName,
Double_t  iValue = 0 
)
inline

Add new parameter with given name and initial value. This parameter can be used later in dependency calculations in minimizations.

Definition at line 58 of file TGo4FitterConfig.h.

References AddResult(), TGo4FitParsList::CreatePar(), fxParsNew, GetParEpsilon(), GetParFixed(), GetParRange(), SetParDepend(), SetParEpsilon(), SetParFixed(), SetParInit(), and SetParRange().

◆ AddResult() [1/2]

void TGo4FitterConfig::AddResult ( const char *  Expression)

Add expression for calculating result value.

Definition at line 122 of file TGo4FitterConfig.cxx.

References fxResults.

Referenced by AddParNew().

◆ AddResult() [2/2]

void TGo4FitterConfig::AddResult ( Double_t  Value)

Add constant value as result value.

Definition at line 127 of file TGo4FitterConfig.cxx.

References fxResults.

◆ DoAction()

void TGo4FitterConfig::DoAction ( TGo4FitterAbstract Fitter)
overridevirtual

Do configuration action. Calls TGoFitterAbstract::ApplyConfig(this) method.

Implements TGo4FitterAction.

Definition at line 132 of file TGo4FitterConfig.cxx.

References TGo4FitterAbstract::ApplyConfig().

Referenced by GetResults().

◆ FindDepen()

TGo4FitDependency * TGo4FitterConfig::FindDepen ( const char *  FullName,
TObjArray *  list 
)
protected

Definition at line 85 of file TGo4FitterConfig.cxx.

References TGo4FitDependency::GetParameter().

Referenced by GetResults(), SetParDepend(), and SetParInit().

◆ GetParEpsilon()

Bool_t TGo4FitterConfig::GetParEpsilon ( const char *  ParName,
Double_t &  Epsilon 
)
virtual

Return kTRUE, if parameter ParName has explicit configuration for epsilon value in minimization. ParName may be standard or full name of parameter.

Definition at line 80 of file TGo4FitterConfig.cxx.

References fxParsCfg, and TGo4FitParsList::GetParEpsilon().

Referenced by AddParNew(), and TGo4FitterAbstract::GetParEpsilon().

◆ GetParFixed()

Bool_t TGo4FitterConfig::GetParFixed ( const char *  ParName)
virtual

Return kTRUE, if parameter ParName should be fixed in minimization. ParName may be standard or full name of parameter.

Definition at line 70 of file TGo4FitterConfig.cxx.

References fxParsCfg, and TGo4FitParsList::GetParFixed().

Referenced by AddParNew(), and TGo4FitterAbstract::GetParFixed().

◆ GetParRange()

Bool_t TGo4FitterConfig::GetParRange ( const char *  ParName,
Double_t &  RangeMin,
Double_t &  RangeMax 
)
virtual

Return kTRUE, if parameter ParName has explicit configuration for valid range in minimization. ParName may be standard or full name of parameter.

Definition at line 75 of file TGo4FitterConfig.cxx.

References fxParsCfg, and TGo4FitParsList::GetParRange().

Referenced by AddParNew(), and TGo4FitterAbstract::GetParRange().

◆ GetParsCfg()

TGo4FitParsList& TGo4FitterConfig::GetParsCfg ( )
inline

Get list of TGo4FitParameter objects, used as explicit configuration for minimizing.

Definition at line 134 of file TGo4FitterConfig.h.

References fxParsCfg.

Referenced by TGo4FitPanel::UpdateItem().

◆ GetParsDepend()

TObjArray& TGo4FitterConfig::GetParsDepend ( )
inline

Returns list of TGo4FitDependency objects, used for dependencies calculations.

Definition at line 149 of file TGo4FitterConfig.h.

References fxParsDepend.

Referenced by TGo4FitterAbstract::ApplyConfig(), TGo4FitterAbstract::ExecuteDependencies(), TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().

◆ GetParsInit()

TObjArray& TGo4FitterConfig::GetParsInit ( )
inline

Returns list of TGo4FitDependency objects, used for parameters initialization.

Definition at line 144 of file TGo4FitterConfig.h.

References fxParsInit.

Referenced by TGo4FitterAbstract::ApplyConfig(), TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().

◆ GetParsNew()

TGo4FitParsList& TGo4FitterConfig::GetParsNew ( )
inline

Get list of TGo4FitParameter objects, which can be used in minimization and dependency calculations.

Definition at line 139 of file TGo4FitterConfig.h.

References fxParsNew.

Referenced by TGo4FitterAbstract::CollectAllPars(), and TGo4FitPanel::UpdateItem().

◆ GetResults()

TObjArray& TGo4FitterConfig::GetResults ( )
inline

Returns list of TGo4FitDependency objects, used for calculating result values for fitter.

Definition at line 154 of file TGo4FitterConfig.h.

References DoAction(), FindDepen(), fxResults, MakeParForProperties(), and Print().

Referenced by TGo4FitterAbstract::ApplyConfig(), TGo4FitterAbstract::Finalize(), TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().

◆ MakeParForProperties()

TGo4FitParameter * TGo4FitterConfig::MakeParForProperties ( const char *  ParName)
protected

◆ Print()

void TGo4FitterConfig::Print ( Option_t *  option = "") const
override

Print information on standard output.

Definition at line 138 of file TGo4FitterConfig.cxx.

References fxParsCfg, fxParsDepend, fxParsInit, fxParsNew, fxResults, TGo4FitNamed::Print(), and TGo4FitParsList::Print().

Referenced by GetResults().

◆ SetParDepend()

void TGo4FitterConfig::SetParDepend ( const char *  FullName,
const char *  iExpression 
)

Set dependency expression for parameter. Expression may use fitter parameters like Gauss2.Pos+Gaus3.Pos/10 Dependency expression calculated every time before fit function calculations. FullName should be full name of parameter.

Definition at line 113 of file TGo4FitterConfig.cxx.

References FindDepen(), fxParsDepend, and TGo4FitDependency::SetExpression().

Referenced by AddParNew(), and BuildFitter().

◆ SetParEpsilon()

Bool_t TGo4FitterConfig::SetParEpsilon ( const char *  ParName,
Double_t  Epsilon 
)
virtual

Sets epsilon for parameter ParName. ParName may be standard or full name of parameter.

Definition at line 62 of file TGo4FitterConfig.cxx.

References MakeParForProperties(), and TGo4FitParameter::SetEpsilon().

Referenced by AddParNew().

◆ SetParFixed()

Bool_t TGo4FitterConfig::SetParFixed ( const char *  ParName,
Bool_t  iFixed = kTRUE 
)
virtual

Sets, that parameter with ParName should be fixed or not. ParName may be standard or full name of parameter.

Definition at line 46 of file TGo4FitterConfig.cxx.

References MakeParForProperties(), and TGo4FitParameter::SetFixed().

Referenced by AddParNew().

◆ SetParInit() [1/2]

void TGo4FitterConfig::SetParInit ( const char *  FullName,
Double_t  iValue 
)

Set initial value for parameter. Init value sets to parameter once when configuration activating. FullName should be full name of parameter.

Definition at line 95 of file TGo4FitterConfig.cxx.

References FindDepen(), fxParsInit, and TGo4FitDependency::SetInitValue().

Referenced by AddParNew(), and BuildFitter().

◆ SetParInit() [2/2]

void TGo4FitterConfig::SetParInit ( const char *  FullName,
const char *  iExpression 
)

Set initial value for parameter, calculated from expression. Expression may use fitter parameters like Gauss2.Pos+Gaus3.Pos/10 Initializing expression calculated once when config activated. FullName should be full name of parameter.

Definition at line 104 of file TGo4FitterConfig.cxx.

References FindDepen(), fxParsInit, and TGo4FitDependency::SetExpression().

◆ SetParRange()

Bool_t TGo4FitterConfig::SetParRange ( const char *  ParName,
Double_t  RangeMin,
Double_t  RangeMax 
)
virtual

Sets valid range for parameter ParName. ParName may be standard or full name of parameter.

Definition at line 54 of file TGo4FitterConfig.cxx.

References MakeParForProperties(), and TGo4FitParameter::SetRange().

Referenced by AddParNew().

Member Data Documentation

◆ fbFixedByDefault

Bool_t TGo4FitterConfig::fbFixedByDefault {kFALSE}
protected

Determine, if all parameters should be fixed by default.

Definition at line 200 of file TGo4FitterConfig.h.

◆ fxParsCfg

TGo4FitParsList TGo4FitterConfig::fxParsCfg
protected

List of parameters objects, used for alternative configuration of parameters, which should be fitted.

Definition at line 175 of file TGo4FitterConfig.h.

Referenced by GetParEpsilon(), GetParFixed(), GetParRange(), GetParsCfg(), MakeParForProperties(), and Print().

◆ fxParsDepend

TObjArray TGo4FitterConfig::fxParsDepend
protected

Array of dependencies (TGo4FitDependency) for introducing dependency between fitted parameters.

Definition at line 190 of file TGo4FitterConfig.h.

Referenced by GetParsDepend(), Print(), SetParDepend(), and TGo4FitterConfig().

◆ fxParsInit

TObjArray TGo4FitterConfig::fxParsInit
protected

Array of dependencies for parameters initialization.

Definition at line 185 of file TGo4FitterConfig.h.

Referenced by GetParsInit(), Print(), SetParInit(), and TGo4FitterConfig().

◆ fxParsNew

TGo4FitParsList TGo4FitterConfig::fxParsNew
protected

List of parameters object, which can be used in dependency calculations and minimization.

Definition at line 180 of file TGo4FitterConfig.h.

Referenced by AddParNew(), GetParsNew(), and Print().

◆ fxResults

TObjArray TGo4FitterConfig::fxResults
protected

Array of TGo4FitDependency objects, which represent equations to calculate result values in fitter.

Definition at line 195 of file TGo4FitterConfig.h.

Referenced by AddResult(), GetResults(), Print(), and TGo4FitterConfig().


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