GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitterConfig.h
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TGO4FITTERCONFIG_H
15#define TGO4FITTERCONFIG_H
16
17#include "TGo4FitterAction.h"
18
19#include "TObjArray.h"
20#include "TGo4FitParsList.h"
21
24
40 public:
41
46
50 TGo4FitterConfig(const char *iName, const char *iTitle);
51
55 virtual ~TGo4FitterConfig();
56
61 void AddParNew(const char *ParName, Double_t iValue = 0) { fxParsNew.CreatePar(ParName,"config",iValue); }
62
67 virtual Bool_t SetParFixed(const char *ParName, Bool_t iFixed = kTRUE);
68
73 virtual Bool_t SetParRange(const char *ParName, Double_t RangeMin, Double_t RangeMax);
74
79 virtual Bool_t SetParEpsilon(const char *ParName, Double_t Epsilon);
80
85 virtual Bool_t GetParFixed(const char *ParName);
86
91 virtual Bool_t GetParRange(const char *ParName, Double_t &RangeMin, Double_t &RangeMax);
92
97 virtual Bool_t GetParEpsilon(const char *ParName, Double_t& Epsilon);
98
104 void SetParInit(const char *FullName, Double_t iValue);
105
113 void SetParInit(const char *FullName, const char *iExpression);
114
122 void SetParDepend(const char *FullName, const char *iExpression);
123
127 void AddResult(const char *Expression);
128
132 void AddResult(Double_t Value);
133
138
143
147 TObjArray &GetParsInit() { return fxParsInit; }
148
152 TObjArray &GetParsDepend() { return fxParsDepend; }
153
157 TObjArray &GetResults() { return fxResults; }
158
163 void DoAction(TGo4FitterAbstract *Fitter) override;
164
168 void Print(Option_t *option = "") const override;
169
170 protected:
171 TGo4FitParameter *MakeParForProperties(const char *ParName);
172
173 TGo4FitDependency* FindDepen(const char *FullName, TObjArray *list);
174
178 TGo4FitParsList fxParsCfg; // configurations for some of parameters
179
183 TGo4FitParsList fxParsNew; // newly create parameters
184
188 TObjArray fxParsInit; // array of dependencies, runs once
189
193 TObjArray fxParsDepend; // array of dependencies, runs every time
194
198 TObjArray fxResults; // array of dependencies of results calculations
199
203 Bool_t fbFixedByDefault{kFALSE}; // is all parameters fixed by default
204
205 ClassDefOverride(TGo4FitterConfig,1)
206};
207
208#endif // TGO4FITTERCONFIG_H
Object, used to store dependency of one parameter from other, calculated via expression.
Model and data objects parameter.
List of TGo4FitParameter objects.
Abstract fitter class.
TGo4FitterAction()
Default constructor.
Fitter configuration action.
void Print(Option_t *option="") const override
Print information on standard output.
TObjArray & GetParsDepend()
Returns list of TGo4FitDependency objects, used for dependencies calculations.
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, Double_t iValue)
Set initial value for parameter.
void AddParNew(const char *ParName, Double_t iValue=0)
Add new parameter with given name and initial value.
TObjArray & GetParsInit()
Returns list of TGo4FitDependency objects, used for parameters initialization.
virtual Bool_t SetParEpsilon(const char *ParName, Double_t Epsilon)
Sets epsilon for parameter ParName.
TGo4FitParsList fxParsNew
List of parameters object, which can be used in dependency calculations and minimization.
TGo4FitParameter * MakeParForProperties(const char *ParName)
TGo4FitParsList & GetParsNew()
Get list of TGo4FitParameter objects, which can be used in minimization and dependency calculations.
Bool_t fbFixedByDefault
Determine, if all parameters should be fixed by default.
void SetParDepend(const char *FullName, const char *iExpression)
Set dependency expression for parameter.
void DoAction(TGo4FitterAbstract *Fitter) override
Do configuration action.
TGo4FitterConfig()
Default constructor.
TGo4FitParsList & GetParsCfg()
Get list of TGo4FitParameter objects, used as explicit configuration for minimizing.
virtual Bool_t GetParEpsilon(const char *ParName, Double_t &Epsilon)
Return kTRUE, if parameter ParName has explicit configuration for epsilon value in minimization.
TObjArray fxResults
Array of TGo4FitDependency objects, which represent equations to calculate result values in fitter.
virtual Bool_t GetParFixed(const char *ParName)
Return kTRUE, if parameter ParName should be fixed in minimization.
TObjArray & GetResults()
Returns list of TGo4FitDependency objects, used for calculating result values for fitter.
TObjArray fxParsDepend
Array of dependencies (TGo4FitDependency) for introducing dependency between fitted parameters.
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.
TObjArray fxParsInit
Array of dependencies for parameters initialization.
void AddResult(const char *Expression)
Add expression for calculating result value.
TGo4FitDependency * FindDepen(const char *FullName, TObjArray *list)
virtual Bool_t SetParRange(const char *ParName, Double_t RangeMin, Double_t RangeMax)
Sets valid range for parameter ParName.
virtual ~TGo4FitterConfig()
Destroys TGo4FitterConfig object.
TGo4FitParsList fxParsCfg
List of parameters objects, used for alternative configuration of parameters, which should be fitted.