GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Fitter configuration action. More...
#include <TGo4FitterConfig.h>
Public Member Functions | |
TGo4FitterConfig () | |
Default constructor. | |
TGo4FitterConfig (const char *iName, const char *iTitle) | |
Creates TGo4FiierConfig object with given name and Title. | |
virtual | ~TGo4FitterConfig () |
Destroys TGo4FitterConfig object. | |
void | AddParNew (const char *ParName, Double_t iValue=0) |
Add new parameter with given name and initial value. | |
void | AddResult (const char *Expression) |
Add expression for calculating result value. | |
void | AddResult (Double_t Value) |
Add constant value as result value. | |
void | DoAction (TGo4FitterAbstract *Fitter) override |
Do configuration action. | |
virtual Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) |
Return kTRUE, if parameter ParName has explicit configuration for epsilon value in minimization. | |
virtual Bool_t | GetParFixed (const char *ParName) |
Return kTRUE, if parameter ParName should be fixed in minimization. | |
virtual Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) |
Return kTRUE, if parameter ParName has explicit configuration for valid range in minimization. | |
TGo4FitParsList & | GetParsCfg () |
Get list of TGo4FitParameter objects, used as explicit configuration for minimizing. | |
TObjArray & | GetParsDepend () |
Returns list of TGo4FitDependency objects, used for dependencies calculations. | |
TObjArray & | GetParsInit () |
Returns list of TGo4FitDependency objects, used for parameters initialization. | |
TGo4FitParsList & | GetParsNew () |
Get list of TGo4FitParameter objects, which can be used in minimization and dependency calculations. | |
TObjArray & | GetResults () |
Returns list of TGo4FitDependency objects, used for calculating result values for fitter. | |
void | Print (Option_t *option="") const override |
Print information on standard output. | |
void | SetParDepend (const char *FullName, const char *iExpression) |
Set dependency expression for parameter. | |
virtual Bool_t | SetParEpsilon (const char *ParName, Double_t Epsilon) |
Sets epsilon for parameter ParName. | |
virtual Bool_t | SetParFixed (const char *ParName, Bool_t iFixed=kTRUE) |
Sets, that parameter with ParName should be fixed or not. | |
void | SetParInit (const char *FullName, const char *iExpression) |
Set initial value for parameter, calculated from expression. | |
void | SetParInit (const char *FullName, Double_t iValue) |
Set initial value for parameter. | |
virtual Bool_t | SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax) |
Sets valid range for parameter ParName. | |
![]() | |
TGo4FitterAction () | |
Default constructor. | |
TGo4FitterAction (const char *Name, const char *Title, TNamed *Owner=nullptr) | |
Creates TGo4FitterAction object with given name and title. | |
virtual | ~TGo4FitterAction () |
virtual Bool_t | CanChangeFitter () const |
virtual Bool_t | NeedBuffers () const |
![]() | |
TGo4FitNamed () | |
Default constructor. | |
TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr) | |
Creates TGo4FitNamed object and set name and title. | |
virtual | ~TGo4FitNamed () |
Destroy TGo4FitNamed object. | |
const char * | GetFullName () |
Returns full name of object. | |
TNamed * | GetOwner () |
Return owner of object. | |
const char * | GetOwnerFullName () |
Return full name of owner. | |
void | Print (Option_t *option="") const override |
void | SetOwner (TNamed *iOwner) |
Sets owner of object. | |
Protected Member Functions | |
TGo4FitDependency * | FindDepen (const char *FullName, TObjArray *list) |
TGo4FitParameter * | MakeParForProperties (const char *ParName) |
Protected Attributes | |
Bool_t | fbFixedByDefault {kFALSE} |
Determine, if all parameters should be fixed by default. | |
TGo4FitParsList | fxParsCfg |
List of parameters objects, used for alternative configuration of parameters, which should be fitted. | |
TObjArray | fxParsDepend |
Array of dependencies (TGo4FitDependency) for introducing dependency between fitted parameters. | |
TObjArray | fxParsInit |
Array of dependencies for parameters initialization. | |
TGo4FitParsList | fxParsNew |
List of parameters object, which can be used in dependency calculations and minimization. | |
TObjArray | fxResults |
Array of TGo4FitDependency objects, which represent equations to calculate result values in fitter. | |
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:
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 39 of file TGo4FitterConfig.h.
TGo4FitterConfig::TGo4FitterConfig | ( | ) |
Default constructor.
Definition at line 22 of file TGo4FitterConfig.cxx.
References TGo4FitterAction::TGo4FitterAction(), fbFixedByDefault, fxParsCfg, fxParsDepend, fxParsInit, fxParsNew, and fxResults.
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 TGo4FitterAction::TGo4FitterAction(), fbFixedByDefault, fxParsCfg, fxParsDepend, fxParsInit, fxParsNew, and fxResults.
|
virtual |
Destroys TGo4FitterConfig object.
Definition at line 36 of file TGo4FitterConfig.cxx.
|
inline |
Add new parameter with given name and initial value.
This parameter can be used later in dependency calculations in minimizations.
Definition at line 61 of file TGo4FitterConfig.h.
References fxParsNew.
void TGo4FitterConfig::AddResult | ( | const char * | Expression | ) |
Add expression for calculating result value.
Definition at line 122 of file TGo4FitterConfig.cxx.
References fxResults.
void TGo4FitterConfig::AddResult | ( | Double_t | Value | ) |
Add constant value as result value.
Definition at line 127 of file TGo4FitterConfig.cxx.
References fxResults.
|
overridevirtual |
Do configuration action.
Calls TGoFitterAbstract::ApplyConfig(this) method.
Implements TGo4FitterAction.
Definition at line 132 of file TGo4FitterConfig.cxx.
References TGo4FitterAbstract::ApplyConfig().
|
protected |
Definition at line 85 of file TGo4FitterConfig.cxx.
References TGo4FitDependency::GetParameter().
Referenced by SetParDepend(), SetParInit(), and SetParInit().
|
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.
|
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.
|
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.
|
inline |
Get list of TGo4FitParameter objects, used as explicit configuration for minimizing.
Definition at line 137 of file TGo4FitterConfig.h.
References fxParsCfg.
Referenced by TGo4FitPanel::UpdateItem().
|
inline |
Returns list of TGo4FitDependency objects, used for dependencies calculations.
Definition at line 152 of file TGo4FitterConfig.h.
References fxParsDepend.
Referenced by TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().
|
inline |
Returns list of TGo4FitDependency objects, used for parameters initialization.
Definition at line 147 of file TGo4FitterConfig.h.
References fxParsInit.
Referenced by TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().
|
inline |
Get list of TGo4FitParameter objects, which can be used in minimization and dependency calculations.
Definition at line 142 of file TGo4FitterConfig.h.
References fxParsNew.
Referenced by TGo4FitPanel::UpdateItem().
|
inline |
Returns list of TGo4FitDependency objects, used for calculating result values for fitter.
Definition at line 157 of file TGo4FitterConfig.h.
References fxResults.
Referenced by TGo4FitterAbstract::IsSuitableConfig(), and TGo4FitPanel::UpdateItem().
|
protected |
Definition at line 38 of file TGo4FitterConfig.cxx.
References fxParsCfg.
Referenced by SetParEpsilon(), SetParFixed(), and SetParRange().
|
override |
Print information on standard output.
Definition at line 138 of file TGo4FitterConfig.cxx.
References fxParsCfg, fxParsDepend, fxParsInit, fxParsNew, fxResults, and TGo4FitNamed::Print().
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 BuildFitter().
|
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().
|
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().
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().
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 BuildFitter().
|
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().
|
protected |
Determine, if all parameters should be fixed by default.
Definition at line 203 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), and TGo4FitterConfig().
|
protected |
List of parameters objects, used for alternative configuration of parameters, which should be fitted.
Definition at line 178 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), TGo4FitterConfig(), GetParEpsilon(), GetParFixed(), GetParRange(), GetParsCfg(), MakeParForProperties(), and Print().
|
protected |
Array of dependencies (TGo4FitDependency) for introducing dependency between fitted parameters.
Definition at line 193 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), TGo4FitterConfig(), GetParsDepend(), Print(), and SetParDepend().
|
protected |
Array of dependencies for parameters initialization.
Definition at line 188 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), TGo4FitterConfig(), GetParsInit(), Print(), SetParInit(), and SetParInit().
|
protected |
List of parameters object, which can be used in dependency calculations and minimization.
Definition at line 183 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), TGo4FitterConfig(), AddParNew(), GetParsNew(), and Print().
|
protected |
Array of TGo4FitDependency objects, which represent equations to calculate result values in fitter.
Definition at line 198 of file TGo4FitterConfig.h.
Referenced by TGo4FitterConfig(), TGo4FitterConfig(), AddResult(), AddResult(), GetResults(), and Print().