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

#include <TGo4FitMinuit.h>

+ Inheritance diagram for TGo4FitMinuit:

Public Member Functions

 TGo4FitMinuit ()
 
 TGo4FitMinuit (const char *Name)
 
virtual ~TGo4FitMinuit ()
 
void AddCommand (const char *iCommand)
 
Int_t GetNumCommands () const
 
const char * GetCommand (Int_t n) const
 
void ClearCommands ()
 
Int_t GetNumResults () const
 
TGo4FitMinuitResultGetResult (Int_t indx) const
 
TGo4FitMinuitResultFindResult (const char *ResName)
 
void AddResult (TGo4FitMinuitResult *res)
 
void RemoveResult (TGo4FitMinuitResult *res)
 
void ClearResults ()
 
Bool_t NeedBuffers () const override
 
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
 
- 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 Attributes

TObjArray fxCommands
 
TObjArray fxResults
 

Detailed Description

Minuit minimization action Now only TGo4FitMinuit class, provided general minimization routine, is available. It uses standard ROOT TMinuit class [3]. TGo4FitMinuit class includes Minuit commands list, which will be executed during minimizatione. There are several methods of TGo4FitMinuit class to operate with command list: AddCommand() - add command to commands list; GetNumCommands() - get number of commands in list; GetCommand() - get command from list; ClearCommands() - clear commands list. To get full description of Minuit commands, see Minuit reference manual [4]. In additional to standard Minuit commands, one adds result command, which get status and results values from Minuit and store them as TGo4FitMinuitResult objects in TGo4FitMinuit results list. The syntax of command is

result [xxxx [result_name]]

where "result"- identifier of this command, "xxxx" - flags field (default - "1000"), "result_name"- optional name of result object (default - "Result"). The each "x" in flags field can be: "0" - option switched off or "1" - switched on. The meanings of flags are:

  1. Storing of current parameters values and errors (ParValues and ParError arrays of doubles, TArrayD class).
  2. Storing result of Minos error analysis (EPLUS, EMINUS, EPARAB & GLOBCC arrays of doubles). Normally should be used after "MINOs" command of Minuit.
  3. Storing error matrice estimations to ERRORMATRIX (TMatrix class). Columns and strings in matrix, corresponds to fixed elements, will be set to 0.
  4. Storing contour plot in CONTOX, CONTOY (both are arrays of doubles) and CONTOCH (array of char, TArrayC). Normally should be switched on after "MNContour" command of Minuit. Result object always store status values of Minuit (see MNSTAT command in Minuit reference manual [4]): FMIN - the best function value found so far; FEDM - the estimated vertical distance remaining to minimum; ERRDEF - the value of UP defining parameter uncertainties; NPARI - number of currently variable parameters; NPARX - the highest (external) parameter number defined by user; ISTAT - a status integer indicating how good is the covariance matrix. Several result commands can be present in Minuit command list and the same number of TGo4FitMinuitResult object will be present in TGo4FitMinuit object after minimization is finished. Results can be accessed via index, using GetNumResults() and GetResult() methods or via result name, using FindResult() method. The results objects always owned by TGo4FitMinuit object and stored together with it. Thus, if TGo4FitMinuit object will be saved together with fitter, the TGo4FitMinuitResult objects also will be stored and can be accessed later, then fitter will be loaded.

Definition at line 49 of file TGo4FitMinuit.h.

Constructor & Destructor Documentation

◆ TGo4FitMinuit() [1/2]

TGo4FitMinuit::TGo4FitMinuit ( )

Default constructor.

Definition at line 50 of file TGo4FitMinuit.cxx.

◆ TGo4FitMinuit() [2/2]

TGo4FitMinuit::TGo4FitMinuit ( const char *  Name)

Create TGo4FitMinuit object (action) with given name.

Definition at line 52 of file TGo4FitMinuit.cxx.

References fxCommands, and fxResults.

◆ ~TGo4FitMinuit()

TGo4FitMinuit::~TGo4FitMinuit ( )
virtual

Destroys TGo4FitMinuit object.

Definition at line 59 of file TGo4FitMinuit.cxx.

Member Function Documentation

◆ AddCommand()

void TGo4FitMinuit::AddCommand ( const char *  iCommand)

Add Minuit command to command list. To get a full description of possible Minuit commands, see Minuit documentation.

Definition at line 61 of file TGo4FitMinuit.cxx.

References fxCommands.

Referenced by TGo4FitterAbstract::AddSimpleMinuit(), BuildFitter(), TGo4FitPanel::Button_PerformFit(), and QFitMinuitWidget::CommandsEdit_textChanged().

◆ AddResult()

void TGo4FitMinuit::AddResult ( TGo4FitMinuitResult res)

Add result object to results list.

Definition at line 156 of file TGo4FitMinuit.cxx.

References fxResults.

Referenced by GetNumResults().

◆ ClearCommands()

void TGo4FitMinuit::ClearCommands ( )
inline

Clear Minuit commands list.

Definition at line 86 of file TGo4FitMinuit.h.

References fxCommands.

Referenced by QFitMinuitWidget::CommandsEdit_textChanged().

◆ ClearResults()

void TGo4FitMinuit::ClearResults ( )
inline

Delete all results objects.

Definition at line 116 of file TGo4FitMinuit.h.

References fxResults.

◆ DoAction()

void TGo4FitMinuit::DoAction ( TGo4FitterAbstract Fitter)
overridevirtual

◆ FindResult()

TGo4FitMinuitResult * TGo4FitMinuit::FindResult ( const char *  ResName)

Find result object with provided name.

Definition at line 151 of file TGo4FitMinuit.cxx.

References fxResults.

Referenced by GetNumResults().

◆ GetCommand()

const char * TGo4FitMinuit::GetCommand ( Int_t  n) const

Return command with given index.

Definition at line 66 of file TGo4FitMinuit.cxx.

References fxCommands.

Referenced by QFitMinuitWidget::FillSpecificData(), and GetNumCommands().

◆ GetNumCommands()

Int_t TGo4FitMinuit::GetNumCommands ( ) const
inline

Returns number of commands in list.

Definition at line 76 of file TGo4FitMinuit.h.

References fxCommands, and GetCommand().

Referenced by QFitMinuitWidget::FillSpecificData().

◆ GetNumResults()

Int_t TGo4FitMinuit::GetNumResults ( ) const
inline

Returns number of result objects.

Definition at line 91 of file TGo4FitMinuit.h.

References AddResult(), FindResult(), fxResults, GetResult(), and RemoveResult().

Referenced by TGo4FitPanel::UpdateItem().

◆ GetResult()

TGo4FitMinuitResult * TGo4FitMinuit::GetResult ( Int_t  indx) const

Get TGo4FitMinuitResult object with given index.

Definition at line 146 of file TGo4FitMinuit.cxx.

References fxResults.

Referenced by GetNumResults(), and TGo4FitPanel::UpdateItem().

◆ NeedBuffers()

Bool_t TGo4FitMinuit::NeedBuffers ( ) const
inlineoverridevirtual

Reimplemented from TGo4FitterAction.

Definition at line 118 of file TGo4FitMinuit.h.

References DoAction(), and Print().

◆ Print()

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

Print information on standard output.

Definition at line 167 of file TGo4FitMinuit.cxx.

References fxCommands, fxResults, and TGo4FitNamed::Print().

Referenced by NeedBuffers().

◆ RemoveResult()

void TGo4FitMinuit::RemoveResult ( TGo4FitMinuitResult res)

Remove result from results list and delete it.

Definition at line 161 of file TGo4FitMinuit.cxx.

References fxResults.

Referenced by TGo4FitPanel::Cmd_DeleteMinuitResult(), and GetNumResults().

Member Data Documentation

◆ fxCommands

TObjArray TGo4FitMinuit::fxCommands
protected

List of minuit commands, presented by array of TObjString.

Definition at line 135 of file TGo4FitMinuit.h.

Referenced by AddCommand(), ClearCommands(), DoAction(), GetCommand(), GetNumCommands(), Print(), and TGo4FitMinuit().

◆ fxResults

TObjArray TGo4FitMinuit::fxResults
protected

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