#include <TGo4FitterAbstract.h>
Inheritance diagram for TGo4FitterAbstract:
Public Member Functions | |
TGo4FitterAbstract () | |
Default constructor. | |
TGo4FitterAbstract (const char *iName, const char *iTitle) | |
Create TGo4FitterAbstract object with given name and tiile. | |
virtual | ~TGo4FitterAbstract () |
Destroy TGo4FitterAbstract object. | |
virtual void | Clear (Option_t *option="") |
Clear fitter. | |
virtual Int_t | NumPars () |
Return total number of parameters, which should be fitted. | |
void | SetParsListChange () |
Should be used, when number of parameters are changed. | |
void | CopyParsValuesFrom (TGo4FitterAbstract *fitter) |
If provided fitter has a same list of parameters, their values will be copied to fitter. | |
virtual Bool_t | GetParFixed (const char *ParName) |
Return kTRUE, if parameter should be fixed. | |
virtual Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) |
Return kTRUE, if range condition specified for parameter and range boundaries. | |
virtual Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) |
Return kTRUE, if epsilon value specified for parameter. | |
Bool_t | IsSuitableConfig (TGo4FitterConfig *Config) |
Checks, if config object corresponds to fitter parameters. | |
Bool_t | ApplyConfig (TGo4FitterConfig *Config) |
Set active configuration object. | |
Double_t | CalculateFitFunction (Double_t *pars=0) |
Calculates value of fit function. | |
void | AddAction (TGo4FitterAction *Action) |
Add action to action list. | |
void | AddActionAt (TGo4FitterAction *Action, Int_t indx) |
Add action to action list at specified index. | |
Int_t | GetNumActions () |
Returns number of action in actions list. | |
TGo4FitterAction * | GetAction (Int_t num) |
Returns pointer on action with given index. | |
void | DeleteActions () |
Remove and delete all actions from actions list. | |
void | DeleteAction (TGo4FitterAction *action) |
Remove action from actions list and destroy it. | |
void | ReplaceAction (TGo4FitterAction *action, Int_t dir) |
Shift action in action list upward (dir=-1) or downward (dir=+1). | |
void | DoActions (Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=0) |
Executes actions list. | |
void | DoAction (TGo4FitterAction *Action) |
Executes specified action. | |
void | DoAction (Int_t indx) |
Executes specified action from actions list. | |
TObjArray * | ProcessObjects (TObjArray *objs, Bool_t CloneFitter=kTRUE, Bool_t OnlyRequired=kTRUE, TObjArray *rownames=0, TObjArray *colnames=0) |
void | AddSimpleMinuit () |
Creates and add TGo4FitMinuit object to actions list. | |
TGo4FitterOutput * | AddOutputAction (const char *Action, const char *Option=0) |
Creates and add TGo4FitterOutput action with given parameters to actions list. | |
void | DeleteOutputActions () |
Remove and delete all output actions from actions list. | |
Int_t | NeedPadsNumber () |
Returns required number of TPad for actions output. | |
void | SetPad (Int_t indx, TVirtualPad *pad) |
Set pad, which will be used for output of TGo4FitterOutput object. | |
Bool_t | IsParsAsResults () |
Return kTRUE, if parameters were taken as result values. | |
Int_t | GetNumResults () const |
Return number of result values. | |
Double_t | GetResultValue (Int_t n) const |
Return value of result with given index. | |
Double_t | GetResultFF () const |
Return result value of fit function. | |
Int_t | GetResultNDF () const |
Return result value of number of degree of freedom. | |
const TArrayD * | GetResults () |
Returns pointer on array of result values. | |
void | PrintResults () const |
Print result values to standard output. | |
virtual void | Print (Option_t *option) const |
Print information about fitter to standar output. | |
Protected Member Functions | |
virtual Bool_t | Initialize () |
Initialize fitter. | |
Bool_t | IsInitialized () |
Return kTRUE, if Initialize() was done. | |
virtual void | Finalize () |
Remove all buffer, created in Initialize() routine. | |
virtual void | CollectAllPars () |
Should collect parameters from all associated to fitter objects. | |
virtual TGo4FitParameter * | Get (Int_t n) |
Return pointer on parameter of given index. | |
void | CheckParsListChanging () |
If appropriate flag sets (via SetParsListChange() method), function recollect all parameters from all objects, associated to fitter. | |
virtual Double_t | DoCalculation () |
Calculates value of fit function according current values of parameters. | |
virtual Int_t | DoNDFCalculation () |
Calculates number of dimensions of freedom; Should be implemented in inherited classes. | |
Bool_t | InitializeDependencies (TObjArray &Dependencies, Bool_t BlockPars, Bool_t DoInit) |
Initialize a list of dependencies (TGo4FitDependecy object), which used in configuration. | |
void | RunDependenciesList (TObjArray &Dependencies, Double_t *pars) |
Execute dependency equations. | |
void | FinalizeDependencies (TObjArray &Dependencies) |
Relese memory, allocated for dependency executions. | |
void | ExecuteDependencies (Double_t *pars) |
Execute dependenices in currently associated configuration (if exist). | |
virtual Bool_t | InitFitterData () |
Initialize fitter data. | |
virtual void | FinalizeFitterData () |
Finalize fitter data. | |
Protected Attributes | |
TObjArray | fxActions |
Array of actions onkects (inherited from TGo4FitterAction). | |
TArrayD | fxResults |
Array of result values. | |
TGo4FitterConfig * | fxCurrentConfig |
Pointer on currently activated config object. | |
Bool_t | fbParsChange |
Boolean variable, showing that number of parameters is changed. | |
Bool_t | fbInitializationDone |
Flag showing, that initialization was complete. | |
Bool_t | fbNeedToFinalize |
Flag, showing, that finalize method should be called before fitter will be destroyed. | |
Bool_t | fbParsAsResults |
This is abstract class, which implement a general behaviour of fitter. It has a list of all parameters (class inherited from TGo4FitParsList) and function, which should be fitted. It has a list of action, which may be performed on the fitter. The specific things, like list of data and list of models, are implemented in inherited TGo4Fitter class.
Definition at line 37 of file TGo4FitterAbstract.h.
|
Default constructor.
Definition at line 37 of file TGo4FitterAbstract.cxx. |
|
Create TGo4FitterAbstract object with given name and tiile. TGo4FitterAbstract object should not be create directly, because it is abstract class. TGo4Fitter or other implementation class should be used. Definition at line 45 of file TGo4FitterAbstract.cxx. References fxActions. |
|
Destroy TGo4FitterAbstract object.
Definition at line 54 of file TGo4FitterAbstract.cxx. References fbNeedToFinalize, and Finalize(). |
|
Clear fitter. Removes and delete all actions from actions list. Reimplemented in TGo4Fitter. Definition at line 59 of file TGo4FitterAbstract.cxx. References DeleteActions(). Referenced by TGo4Fitter::Clear(). |
|
Return total number of parameters, which should be fitted. Parameters are collects from all associated objects like data or models. Reimplemented from TGo4FitParsList. Definition at line 67 of file TGo4FitterAbstract.h. References CheckParsListChanging(), and TGo4FitParsList::NumPars(). Referenced by ApplyConfig(), CopyParsValuesFrom(), Finalize(), InitializeDependencies(), and ProcessObjects(). |
|
Should be used, when number of parameters are changed. Next time, when somebody will access fitter parameter list, fitter automatically recollect parameters from associated objects. Definition at line 73 of file TGo4FitterAbstract.h. References fbParsChange. Referenced by TGo4Fitter::AddData(), TGo4Fitter::AddModel(), TGo4Fitter::AssignModelTo(), TGo4Fitter::ClearModelAssignmentTo(), TGo4Fitter::DeleteAllData(), TGo4Fitter::DeleteAllModels(), TGo4Fitter::DeleteModelsAssosiatedTo(), TGo4Fitter::RemoveData(), and TGo4Fitter::RemoveModel(). |
|
If provided fitter has a same list of parameters, their values will be copied to fitter.
Definition at line 73 of file TGo4FitterAbstract.cxx. References CollectAllPars(), Get(), TGo4FitNamed::GetFullName(), TGo4FitParameter::GetValue(), NumPars(), and TGo4FitParameter::SetValue(). |
|
Return kTRUE, if parameter should be fixed. If configuration object assigned to fitter, this flag will be tested there first and only then original parameter configuration will be used.ÿ Reimplemented from TGo4FitParsList. Definition at line 86 of file TGo4FitterAbstract.cxx. References fxCurrentConfig, TGo4FitterConfig::GetParFixed(), and TGo4FitParsList::GetParFixed(). |
|
Return kTRUE, if range condition specified for parameter and range boundaries. If configuration object assigned to fitter, range values will be tested there first and only then original parameter configuration will be used. Reimplemented from TGo4FitParsList. Definition at line 94 of file TGo4FitterAbstract.cxx. References fxCurrentConfig, TGo4FitParsList::GetParRange(), and TGo4FitterConfig::GetParRange(). |
|
Return kTRUE, if epsilon value specified for parameter. If configuration object assigned to fitter, epsilon value will be tested there first and only then original parameter configuration will be used. Reimplemented from TGo4FitParsList. Definition at line 103 of file TGo4FitterAbstract.cxx. References fxCurrentConfig, TGo4FitParsList::GetParEpsilon(), and TGo4FitterConfig::GetParEpsilon(). |
|
Checks, if config object corresponds to fitter parameters.
Definition at line 171 of file TGo4FitterAbstract.cxx. References CollectAllPars(), fxCurrentConfig, TGo4FitterConfig::GetParsDepend(), TGo4FitterConfig::GetParsInit(), TGo4FitterConfig::GetResults(), and InitializeDependencies(). |
|
Set active configuration object. This function calls in TGo4FitterConfig::DoAction() method. Definition at line 194 of file TGo4FitterAbstract.cxx. References CollectAllPars(), FinalizeDependencies(), fxCurrentConfig, TGo4FitterConfig::GetParsDepend(), TGo4FitterConfig::GetParsInit(), TGo4FitParsList::GetParsValues(), TGo4FitterConfig::GetResults(), InitializeDependencies(), NumPars(), RunDependenciesList(), and TGo4FitParsList::SetParsValues(). Referenced by Finalize(). |
|
Calculates value of fit function. Fitter should be initialized before. Instead of using values of parameters (from parameters list) array of values can be sets directly. Definition at line 250 of file TGo4FitterAbstract.cxx. References DoCalculation(), ExecuteDependencies(), and TGo4FitParsList::SetParsValues(). Referenced by TMinuitEx::Eval(). |
|
Add action to action list. Action is a object, derived from TGo4FitterAction class. Action object always owned by fitter, thus it will be destroyed when fitter is destroing. Therefore, stack object should not be added to fitter. Definition at line 291 of file TGo4FitterAbstract.cxx. References fxActions. Referenced by TGo4Fitter::AddAmplEstimation(), AddOutputAction(), AddSimpleMinuit(), and BuildFitter(). |
|
Add action to action list at specified index.
Definition at line 296 of file TGo4FitterAbstract.cxx. References fxActions. Referenced by Example11(). |
|
Returns number of action in actions list.
Definition at line 131 of file TGo4FitterAbstract.h. References fxActions. Referenced by NeedPadsNumber(), and SetPad(). |
|
Returns pointer on action with given index.
Definition at line 301 of file TGo4FitterAbstract.cxx. References fxActions. Referenced by DoAction(), NeedPadsNumber(), and SetPad(). |
|
Remove and delete all actions from actions list.
Definition at line 141 of file TGo4FitterAbstract.h. References fxActions. Referenced by Clear(). |
|
Remove action from actions list and destroy it.
Definition at line 307 of file TGo4FitterAbstract.cxx. References fxActions. |
|
Shift action in action list upward (dir=-1) or downward (dir=+1).
Definition at line 317 of file TGo4FitterAbstract.cxx. References fxActions. |
|
Executes actions list. First Initialize() method will be called to create buffers (if required by actions). Then for each action in actions list will be called DoAction() method. AllowFitterChange flag specify, if action which may change fitter, can be executed. Alternative array with actions can also be specified to function. In the end Finalize() method close all buffers. Definition at line 328 of file TGo4FitterAbstract.cxx. References TGo4FitterAction::CanChangeFitter(), CheckParsListChanging(), TGo4FitterAction::DoAction(), Finalize(), fxActions, and Initialize(). Referenced by Example1(), Example10(), Example11(), Example12(), Example13(), Example2(), Example3(), Example4(), Example5(), Example6(), Example7(), Example8(), ProcessObjects(), and TXXXCalibPar::UpdateFrom(). |
|
Executes specified action.
Definition at line 353 of file TGo4FitterAbstract.cxx. References TGo4FitterAction::DoAction(), Finalize(), Initialize(), and TGo4FitterAction::NeedBuffers(). Referenced by DoAction(). |
|
Executes specified action from actions list.
Definition at line 367 of file TGo4FitterAbstract.cxx. References DoAction(), and GetAction(). |
|
|
Creates and add TGo4FitMinuit object to actions list. TGo4FitMinuit object contain the only command: MIGRAD 500 1 Definition at line 488 of file TGo4FitterAbstract.cxx. References AddAction(), and TGo4FitMinuit::AddCommand(). Referenced by TGo4Fitter::AddStandardActions(), Example13(), and Example8(). |
|
Creates and add TGo4FitterOutput action with given parameters to actions list.
Definition at line 495 of file TGo4FitterAbstract.cxx. References AddAction(). Referenced by Example3(). |
|
Remove and delete all output actions from actions list.
Definition at line 502 of file TGo4FitterAbstract.cxx. References fxActions. |
|
Returns required number of TPad for actions output. Currently only "Draw" command of TGo4FitterOutput method requires pad for output. Definition at line 511 of file TGo4FitterAbstract.cxx. References GetAction(), GetNumActions(), and TGo4FitterOutput::NeedPad(). |
|
Set pad, which will be used for output of TGo4FitterOutput object. If pad will not be set or command will not create new pad, current gPad object will be used for output. Thus, if several "Draw" command occur, result of last command will be seen on current pad. Definition at line 521 of file TGo4FitterAbstract.cxx. References GetAction(), GetNumActions(), TGo4FitterOutput::NeedPad(), and TGo4FitterOutput::SetPad(). |
|
Return kTRUE, if parameters were taken as result values.
Definition at line 209 of file TGo4FitterAbstract.h. References fbParsAsResults. Referenced by ProcessObjects(). |
|
Return number of result values.
Definition at line 214 of file TGo4FitterAbstract.h. References fxResults. Referenced by GetResultValue(), PrintResults(), and ProcessObjects(). |
|
Return value of result with given index. Normally at the end of execution of actions list values of parameters stores to results array. This array can be accessed later by GetNumResults(), GetResultValue() or GetResults() methods. If configuration was assigned during action, it may provide alternative way to calculating result values, which will be stored in fitter. Definition at line 533 of file TGo4FitterAbstract.cxx. References fxResults, and GetNumResults(). Referenced by PrintResults(). |
|
Return result value of fit function.
Definition at line 539 of file TGo4FitterAbstract.cxx. References fxResults. Referenced by PrintResults(). |
|
Return result value of number of degree of freedom.
Definition at line 545 of file TGo4FitterAbstract.cxx. References fxResults. Referenced by PrintResults(). |
|
Returns pointer on array of result values.
Definition at line 237 of file TGo4FitterAbstract.h. References fxResults. Referenced by ProcessObjects(). |
|
Print result values to standard output.
Definition at line 551 of file TGo4FitterAbstract.cxx. References GetNumResults(), GetResultFF(), GetResultNDF(), and GetResultValue(). Referenced by TGo4Fitter::Print(). |
|
Print information about fitter to standar output.
Reimplemented from TGo4FitParsList. Reimplemented in TGo4Fitter. Definition at line 560 of file TGo4FitterAbstract.cxx. References fxActions, TGo4FitParsList::Print(), and TGo4FitNamed::Print(). Referenced by TGo4FitterOutput::DoAction(), and TGo4Fitter::Print(). |
|
Initialize fitter. Called automatically before any actions execution. Definition at line 230 of file TGo4FitterAbstract.cxx. References TGo4FitSlotList::CheckObjects(), TGo4FitParsList::ClearParsBlocking(), CollectAllPars(), fbInitializationDone, fbNeedToFinalize, Finalize(), and InitFitterData(). Referenced by DoAction(), and DoActions(). |
|
Return kTRUE, if Initialize() was done.
Definition at line 260 of file TGo4FitterAbstract.h. References fbInitializationDone. Referenced by TGo4FitAmplEstimation::CalculateWithBuffers(). |
|
Remove all buffer, created in Initialize() routine.
Definition at line 260 of file TGo4FitterAbstract.cxx. References ApplyConfig(), DoCalculation(), DoNDFCalculation(), TGo4FitDependency::ExecuteDependency(), fbInitializationDone, fbNeedToFinalize, FinalizeFitterData(), fxCurrentConfig, fxResults, TGo4FitParsList::GetParsValues(), TGo4FitterConfig::GetResults(), and NumPars(). Referenced by DoAction(), DoActions(), Initialize(), and ~TGo4FitterAbstract(). |
|
Should collect parameters from all associated to fitter objects. This function should be extend in inherited classes. Reimplemented in TGo4Fitter. Definition at line 65 of file TGo4FitterAbstract.cxx. References TGo4FitParsList::ClearPars(), fbParsChange, fxCurrentConfig, and TGo4FitterConfig::GetParsNew(). Referenced by ApplyConfig(), CheckParsListChanging(), TGo4Fitter::CollectAllPars(), CopyParsValuesFrom(), Initialize(), and IsSuitableConfig(). |
|
Return pointer on parameter of given index. First check, if parameters should be recollected. Reimplemented from TGo4FitParsList. Definition at line 277 of file TGo4FitterAbstract.h. References CheckParsListChanging(), and TGo4FitParsList::Get(). Referenced by CopyParsValuesFrom(). |
|
If appropriate flag sets (via SetParsListChange() method), function recollect all parameters from all objects, associated to fitter.
Definition at line 282 of file TGo4FitterAbstract.h. References CollectAllPars(), and fbParsChange. Referenced by DoActions(), Get(), and NumPars(). |
|
Calculates value of fit function according current values of parameters. Should be implemented in inherited classes. Reimplemented in TGo4Fitter. Definition at line 288 of file TGo4FitterAbstract.h. Referenced by CalculateFitFunction(), and Finalize(). |
|
Calculates number of dimensions of freedom; Should be implemented in inherited classes.
Reimplemented in TGo4Fitter. Definition at line 294 of file TGo4FitterAbstract.h. Referenced by Finalize(). |
|
Initialize a list of dependencies (TGo4FitDependecy object), which used in configuration.
Definition at line 113 of file TGo4FitterAbstract.cxx. References TGo4FitParsList::Find(), TGo4FitDependency::GetExpression(), TGo4FitDependency::GetParameter(), TGo4FitParsList::GetParFullName(), TGo4FitParsList::GetParIndex(), TGo4FitDependency::Initialize(), NumPars(), and TGo4FitParameter::SetBlocked(). Referenced by ApplyConfig(), and IsSuitableConfig(). |
|
Execute dependency equations.
Definition at line 151 of file TGo4FitterAbstract.cxx. Referenced by ApplyConfig(), and ExecuteDependencies(). |
|
Relese memory, allocated for dependency executions.
Definition at line 157 of file TGo4FitterAbstract.cxx. References TGo4FitDependency::Finalize(). Referenced by ApplyConfig(). |
|
Execute dependenices in currently associated configuration (if exist).
Definition at line 165 of file TGo4FitterAbstract.cxx. References fxCurrentConfig, TGo4FitterConfig::GetParsDepend(), and RunDependenciesList(). Referenced by CalculateFitFunction(), and TGo4Fitter::CalculateFitFunction(). |
|
Initialize fitter data. Called during Initialize() method. Should be reimplemented in derived classes. Reimplemented in TGo4Fitter. Definition at line 321 of file TGo4FitterAbstract.h. Referenced by Initialize(). |
|
Finalize fitter data. Called during Finalize() method. Should be reimplemented in derived classes. Reimplemented in TGo4Fitter. Definition at line 328 of file TGo4FitterAbstract.h. Referenced by Finalize(). |
|
Array of actions onkects (inherited from TGo4FitterAction).
Definition at line 333 of file TGo4FitterAbstract.h. Referenced by AddAction(), AddActionAt(), DeleteAction(), DeleteActions(), DeleteOutputActions(), DoActions(), GetAction(), GetNumActions(), Print(), ReplaceAction(), and TGo4FitterAbstract(). |
|
Array of result values. If no specific configuration is used, this just values of fitter parameters. Result array creates in the end of actions execution. Definition at line 340 of file TGo4FitterAbstract.h. Referenced by Finalize(), GetNumResults(), GetResultFF(), GetResultNDF(), GetResults(), and GetResultValue(). |
|
Pointer on currently activated config object.
Definition at line 345 of file TGo4FitterAbstract.h. Referenced by ApplyConfig(), CollectAllPars(), ExecuteDependencies(), Finalize(), GetParEpsilon(), GetParFixed(), GetParRange(), and IsSuitableConfig(). |
|
Boolean variable, showing that number of parameters is changed.
Definition at line 351 of file TGo4FitterAbstract.h. Referenced by CheckParsListChanging(), CollectAllPars(), and SetParsListChange(). |
|
Flag showing, that initialization was complete.
Definition at line 357 of file TGo4FitterAbstract.h. Referenced by Finalize(), Initialize(), and IsInitialized(). |
|
Flag, showing, that finalize method should be called before fitter will be destroyed.
Definition at line 363 of file TGo4FitterAbstract.h. Referenced by Finalize(), Initialize(), and ~TGo4FitterAbstract(). |
|
Definition at line 365 of file TGo4FitterAbstract.h. Referenced by IsParsAsResults(). |