14#ifndef TGO4FITTERABSTRACT_H
15#define TGO4FITTERABSTRACT_H
60 void Clear(Option_t *option =
"")
override;
93 Bool_t
GetParRange(
const char *ParName, Double_t& RangeMin, Double_t& RangeMax)
override;
164 void DoActions(Bool_t AllowFitterChange = kFALSE, TObjArray *Actions =
nullptr);
177 TObjArray *
ProcessObjects(TObjArray *objs, Bool_t CloneFitter = kTRUE, Bool_t OnlyRequired = kTRUE, TObjArray *rownames =
nullptr, TObjArray *colnames =
nullptr);
207 void SetPad(Int_t indx, TVirtualPad *pad);
250 void Print(Option_t *option =
"")
const override;
Model and data objects parameter.
List of TGo4FitParameter objects.
virtual TGo4FitParameter * Get(Int_t n)
virtual Int_t NumPars()
Return number of parameters in list.
virtual Int_t DoNDFCalculation()
Calculates number of dimensions of freedom; Should be implemented in inherited classes.
virtual void Finalize()
Remove all buffer, created in Initialize() routine.
TGo4FitterAbstract(const char *iName, const char *iTitle)
Create TGo4FitterAbstract object with given name and title.
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
Executes actions list.
Bool_t GetParRange(const char *ParName, Double_t &RangeMin, Double_t &RangeMax) override
Return kTRUE, if range condition specified for parameter and range boundaries.
virtual ~TGo4FitterAbstract()
Destroy TGo4FitterAbstract object.
void SetParsListChange()
Should be used, when number of parameters are changed.
TGo4FitterConfig * fxCurrentConfig
Pointer on currently activated config object.
virtual void FinalizeFitterData()
Finalize fitter data.
Bool_t IsInitialized() const
Return kTRUE, if Initialize() was done.
TObjArray * ProcessObjects(TObjArray *objs, Bool_t CloneFitter=kTRUE, Bool_t OnlyRequired=kTRUE, TObjArray *rownames=nullptr, TObjArray *colnames=nullptr)
void Clear(Option_t *option="") override
Clear fitter.
void DeleteOutputActions()
Remove and delete all output actions from actions list.
Bool_t GetParEpsilon(const char *ParName, Double_t &Epsilon) override
Return kTRUE, if epsilon value specified for parameter.
TObjArray fxActions
Array of actions objects (inherited from TGo4FitterAction).
void Print(Option_t *option="") const override
Print information about fitter to standard output.
void DeleteActions()
Remove and delete all actions from actions list.
Bool_t fbParsChange
Boolean variable, showing that number of parameters is changed.
const TArrayD * GetResults()
Returns pointer on array of result values.
void CheckParsListChanging()
If appropriate flag sets (via SetParsListChange() method), function recollect all parameters from all...
Bool_t GetParFixed(const char *ParName) override
Return kTRUE, if parameter should be fixed.
Bool_t InitializeDependencies(TObjArray &Dependencies, Bool_t BlockPars, Bool_t DoInit)
Initialize a list of dependencies (TGo4FitDependecy object), which used in configuration.
Double_t CalculateFitFunction(Double_t *pars=nullptr)
Calculates value of fit function.
TGo4FitterOutput * AddOutputAction(const char *Action, const char *Option=nullptr)
Creates and add TGo4FitterOutput action with given parameters to actions list.
Bool_t IsSuitableConfig(TGo4FitterConfig *Config)
Checks, if config object corresponds to fitter parameters.
Int_t NeedPadsNumber()
Returns required number of TPad for actions output.
void PrintResults() const
Print result values to standard output.
Bool_t ApplyConfig(TGo4FitterConfig *Config)
Set active configuration object.
Int_t GetResultNDF() const
Return result value of number of degree of freedom.
Bool_t fbInitializationDone
Flag showing, that initialization was complete.
Double_t GetResultFF() const
Return result value of fit function.
void SetPad(Int_t indx, TVirtualPad *pad)
Set pad, which will be used for output of TGo4FitterOutput object.
void DeleteAction(TGo4FitterAction *action)
Remove action from actions list and destroy it.
TGo4FitterAction * GetAction(Int_t num)
Returns pointer on action with given index.
void AddAction(TGo4FitterAction *Action)
Add action to action list.
virtual Bool_t Initialize()
Initialize fitter.
TGo4FitParameter * Get(Int_t n) override
Return pointer on parameter of given index.
virtual void CollectAllPars()
Should collect parameters from all associated to fitter objects.
Double_t GetResultValue(Int_t n) const
Return value of result with given index.
void CopyParsValuesFrom(TGo4FitterAbstract *fitter)
If provided fitter has a same list of parameters, their values will be copied to fitter.
void AddSimpleMinuit()
Creates and add TGo4FitMinuit object to actions list.
TGo4FitterAbstract()
Default constructor.
void FinalizeDependencies(TObjArray &Dependencies)
Relese memory, allocated for dependency executions.
void RunDependenciesList(TObjArray &Dependencies, Double_t *pars)
Execute dependency equations.
Bool_t fbNeedToFinalize
Flag, showing, that finalize method should be called before fitter will be destroyed.
virtual Double_t DoCalculation()
Calculates value of fit function according current values of parameters.
void ExecuteDependencies(Double_t *pars)
Execute dependencies in currently associated configuration (if exist).
void DoAction(TGo4FitterAction *Action)
Executes specified action.
Int_t NumPars() override
Return total number of parameters, which should be fitted.
TArrayD fxResults
Array of result values.
void ReplaceAction(TGo4FitterAction *action, Int_t dir)
Shift action in action list upward (dir=-1) or downward (dir=+1).
Int_t GetNumResults() const
Return number of result values.
Bool_t IsParsAsResults() const
Return kTRUE, if parameters were taken as result values.
virtual void CollectAllPars()
Should collect parameters from all associated to fitter objects.
void DoAction(Int_t indx)
Executes specified action from actions list.
Int_t GetNumActions() const
Returns number of action in actions list.
virtual Bool_t InitFitterData()
Initialize fitter data.
void AddActionAt(TGo4FitterAction *Action, Int_t indx)
Add action to action list at specified index.
Basic class for objects, which performs actions on fitter.
Fitter configuration action.