#include <TGo4FitModelPolynom.h>
Inheritance diagram for TGo4FitModelPolynom:
Public Methods | |
TGo4FitModelPolynom () | |
Default constructor. More... | |
TGo4FitModelPolynom (const char *iName, Double_t iOrderX=0.) | |
Creates TGo4FitModelPolynom object with given name for 1-dim case. More... | |
TGo4FitModelPolynom (const char *iName, Double_t iOrderX, Double_t iOrderY) | |
Creates TGo4FitModelPolynom object with given name for 2-dim case. More... | |
TGo4FitModelPolynom (const char *iName, Double_t iOrderX, Double_t iOrderY, Double_t iOrderZ) | |
Creates TGo4FitModelPolynom object with given name for 3-dim case. More... | |
TGo4FitModelPolynom (const char *iName, const TArrayD &iPolynomOrders) | |
Creates TGo4FitModelPolynom object with given name for n-dim case. More... | |
virtual | ~TGo4FitModelPolynom () |
Destroys TGo4FitModelPolynom object. More... | |
Double_t | GetPolynomOrder (Int_t naxis) |
Get polynom order for specified axis. More... | |
Int_t | GetMaxNumAxis () |
Returns maximum axis number (dimensions number) in polynom. More... | |
Bool_t | SetMaxNumAxis (Int_t numaxis) |
Sets number of dimensions (maximum axis numbers) in polynom. More... | |
virtual void | Print (Option_t *option) const |
Print information on standard output. More... | |
virtual Bool_t | BeforeEval (Int_t NDimension) |
Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function. More... | |
virtual Double_t | EvalN (const Double_t *v) |
Calculates value of model according current parameters values and provided axes values. More... | |
virtual void | AfterEval () |
Clear buffers, which were created by BeforeEval() method. More... | |
Protected Methods | |
TString | GetOrderParName (Int_t naxis) |
Private Methods | |
void | CreateOrdersPars (const Double_t *orders, Int_t startaxis, Int_t maxaxis, Int_t AtIndx=-1) |
Private Attributes | |
Int_t | ndim |
Temporary variable for EvalN() function. More... | |
TArrayD * | fxAllOrders |
Temporary variable for EvalN() function. More... | |
Double_t * | orders |
Temporary variable for EvalN() function. More... |
Expession can be written like:
Ampl * x^nx * y^ny * z^nz * ...
The order of polynomial function should be sets up in constructor like:
TGo4FitModelPolynom *p1 = new TGo4FitModelPolynom("Pol1",orderx,ordery,orderz); or TArrayD orders(5); Orders[0] = 1.; Orders[1] = 0.; ... TGo4FitModelPolynom *p2 = new TGo4FitModelPolynom("Pol2",Orders);
According to number of parameters in constructor TGo4FitModelPolynom has set of parameters "Order0", "Order1" and so on, representing polynom orders for axis x, y and so on correspondently. By default, these parameters are fixed and not fitted in optimizations. To change this default behavior, use:
p1->FindPar("Order0")->SetFixed(kFALSE);
TGo4FitModelPolynom class always has amplitude parameter, named "Ampl". It can be accessed by its name, for instance:
p1->FindPar("Ampl")->SetValue(1000.);
or
p1->GetAmplitudePar("Ampl")->SetValue(1000.);
GetAmplitudePar() method can be used in other models classes only if they create amplitude parameters, otherwise method returns 0.
Definition at line 51 of file TGo4FitModelPolynom.h.
|
Default constructor.
Definition at line 23 of file TGo4FitModelPolynom.cxx. |
|
Creates TGo4FitModelPolynom object with given name for 1-dim case. The order of polynom for x axis can be specified (0 by default). Definition at line 26 of file TGo4FitModelPolynom.cxx. References CreateOrdersPars(), and TGo4FitModel::SetBackgroundGroupIndex(). |
|
Creates TGo4FitModelPolynom object with given name for 2-dim case. The order of polynom for x and y axises should be specified. Definition at line 32 of file TGo4FitModelPolynom.cxx. References CreateOrdersPars(), and TGo4FitModel::SetBackgroundGroupIndex(). |
|
Creates TGo4FitModelPolynom object with given name for 3-dim case. The order of polynom for x, y and z axises should be specified. Definition at line 39 of file TGo4FitModelPolynom.cxx. References CreateOrdersPars(), and TGo4FitModel::SetBackgroundGroupIndex(). |
|
Creates TGo4FitModelPolynom object with given name for n-dim case. An array of polynoms orders for appropriate axis should be specified. The size of array will be a dimensions size of polynom. But the n-dim polynom can be used for m-dim case. If n>m, orders for missing axis will be set 0. If n<m, only necessary orders will be used. Definition at line 46 of file TGo4FitModelPolynom.cxx. References CreateOrdersPars(), and TGo4FitModel::SetBackgroundGroupIndex(). |
|
Destroys TGo4FitModelPolynom object.
Definition at line 52 of file TGo4FitModelPolynom.cxx. References fxAllOrders. |
|
Get polynom order for specified axis.
Definition at line 71 of file TGo4FitModelPolynom.cxx. References TGo4FitParsList::FindPar(), GetOrderParName(), and TGo4FitParameter::GetValue(). Referenced by BeforeEval(). |
|
Returns maximum axis number (dimensions number) in polynom.
Definition at line 77 of file TGo4FitModelPolynom.cxx. References TGo4FitParsList::FindPar(), and GetOrderParName(). Referenced by SetMaxNumAxis(). |
|
Sets number of dimensions (maximum axis numbers) in polynom.
Definition at line 83 of file TGo4FitModelPolynom.cxx. References CreateOrdersPars(), TGo4FitParsList::FindPar(), GetMaxNumAxis(), GetOrderParName(), TGo4FitParsList::GetParIndex(), n, and TGo4FitParsList::RemovePar(). |
|
Print information on standard output.
Reimplemented from TGo4FitModel. Definition at line 119 of file TGo4FitModelPolynom.cxx. References TGo4FitModel::Print(). |
|
Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function. Number of axis, which will be used in evaluations, should be specified. Reimplemented from TGo4FitModel. Definition at line 97 of file TGo4FitModelPolynom.cxx. References fxAllOrders, GetPolynomOrder(), i, ndim, and orders. |
|
Calculates value of model according current parameters values and provided axes values. BeforeEval(), EvalN() & AfterEval() virtual methods provides general interface, where user-specific code should be situated. Reimplemented from TGo4FitModel. Definition at line 108 of file TGo4FitModelPolynom.cxx. |
|
Clear buffers, which were created by BeforeEval() method.
Reimplemented from TGo4FitModel. Definition at line 115 of file TGo4FitModelPolynom.cxx. References fxAllOrders. |
|
Definition at line 65 of file TGo4FitModelPolynom.cxx. Referenced by CreateOrdersPars(), GetMaxNumAxis(), GetPolynomOrder(), and SetMaxNumAxis(). |
|
Definition at line 56 of file TGo4FitModelPolynom.cxx. References GetOrderParName(), n, TGo4FitComponent::NewParameter(), and orders. Referenced by SetMaxNumAxis(), and TGo4FitModelPolynom(). |
|
Temporary variable for EvalN() function.
Definition at line 123 of file TGo4FitModelPolynom.h. Referenced by BeforeEval(), and EvalN(). |
|
Temporary variable for EvalN() function.
Definition at line 129 of file TGo4FitModelPolynom.h. Referenced by AfterEval(), BeforeEval(), and ~TGo4FitModelPolynom(). |
|
Temporary variable for EvalN() function.
Definition at line 135 of file TGo4FitModelPolynom.h. Referenced by BeforeEval(), CreateOrdersPars(), and EvalN(). |