52 void Print(Option_t *option =
"")
const override;
96 TGo4FitModel(
const char *iName,
const char *iTitle, Bool_t MakeAmplitude = kFALSE);
138 void AssignToData(
const char *DataName, Double_t RatioValue = 1., Bool_t FixRatio = kFALSE);
175 void Print(Option_t *option =
"")
const override;
190 virtual Double_t
Evaluate(Double_t x, Double_t y, Double_t z);
195 virtual Double_t
Evaluate(Double_t *v, Int_t ndim);
215 virtual Bool_t
GetWidth(Int_t naxis, Double_t& width);
220 virtual Bool_t
SetWidth(Int_t naxis, Double_t width);
233 void SetIntegrationsProperty(Int_t iMinIntegrDepth, Int_t iMaxIntegrDepth = 0, Double_t iIntegrEps = 0., Bool_t iAbsoluteEps = kFALSE, Bool_t iIntegrScaling = kFALSE);
250 virtual Double_t
EvalN(
const Double_t *v);
266 virtual Double_t
EvaluateAtPoint(std::unique_ptr<TGo4FitDataIter> &iter, Bool_t UseRanges = kTRUE);
Internal class, used for assignment of model component to data.
virtual ~TGo4FitAssignment()
Destroys TGo4FitAssignment object.
TGo4FitAssignment()
Default constructor.
TGo4FitData * fxData
Pointer on assigned data.
ClassDefOverride(TGo4FitAssignment, 1)
Char_t * fxModelMask
Array of boolean values, selected model bins.
TGo4FitAssignment(const char *DataName)
Create TGo4FitAssignment object, which assign model to DataName.
TGo4FitParameter * fxRatio
Parameter for ratio value.
Double_t * fxModelBins
Array of model bins for assigned data.
void Print(Option_t *option="") const override
Print information about object on standard output.
Basic abstract class, combining common properties of data and model.
Iterator class for data object.
Basic abstract class for representing data, which should be fitted.
Basic abstract class for representing model components of fitted data.
void ClearAssignments()
Remove all assignments.
Bool_t fbAbsoluteEps
States, if integration precision absolute or relative.
virtual Double_t Integral()
Calculates integral of model component.
TArrayD fxCurrentPars
Array of values of parameters.
Double_t * GetModelBins(const char *DataName) const
Get model bins for specified data (if exists).
void SetNeedToRebuild()
Sets flag, that shape bins should be refilled next time, when RebuildShape() routine will be called.
virtual Double_t Evaluate(Double_t *v, Int_t ndim)
Calculates value of model for given axis values.
TGo4FitParsList * fxAllPars
List of all parameters, associated not only with component directly but also with encapsulated object...
void SetBackgroundGroupIndex()
Set group index to background (index = 0).
Bool_t AddModelToDataResult(TGo4FitData *data)
Evaluate model values for all data point and add them to result buffer.
Double_t * fxCurrentParsArray
Pointer on array of parameters values.
Double_t fdIntegrEps
Integration precision.
void ConnectToDataIfAssigned(TGo4FitData *data)
Check, if model assigned to such a data (via name) and store pointer on this data object.
Bool_t BuffersAllocated() const
Checks if model allocate buffers for calculations.
virtual Double_t Evaluate(Double_t x, Double_t y, Double_t z)
Calculates value of model for given x,y,z values.
void Print(Option_t *option="") const override
Print information about model object on standard output.
const char * AssignmentName(Int_t n)
Returns name of data, to which model object is assigned.
virtual Double_t UserFunction(Double_t *, Double_t *)
Another place, where user specific code can be placed for model values calculation.
TGo4FitAssignment * FindAssigment(const char *DataName) const
Find assignment to given data.
TString GetRatioName(Int_t n)
Set name of ratio parameter.
virtual void Finalize()
Deletes all buffers, created during initialization.
virtual TGo4FitParameter * GetWidthPar(Int_t naxis=0)
Return parameter (if exist), which represent width of model component for given axis.
Int_t GetGroupIndex() const
Returns group index of model.
virtual Double_t Evaluate(Double_t x)
Calculates value of model for given x value.
void RemoveAllPars()
Clear all buffers, allocated during initialization.
TGo4FitModel(const char *iName, const char *iTitle, Bool_t MakeAmplitude=kFALSE)
Creates TGo4FitModel object with given name.
virtual Bool_t Initialize(Int_t UseBuffers=-1)
Initialize model object.
Double_t EvaluateAndIntegrate(Int_t NumScales, const Double_t *Scales, const Double_t *Widths)
Make integration of model inside given point, if integration specified.
Bool_t NeedIntegration() const
Returns kTRUE, if integration properties were specified.
Int_t fiGroupIndex
Store group index of specified model.
Int_t NumPars() override
Return number of parameters in list.
virtual ~TGo4FitModel()
Delete TGo4FitModel object.
virtual Double_t Evaluate(Double_t x, Double_t y)
Calculates value of model for given x,y values.
virtual Bool_t SetPosition(Int_t naxis, Double_t pos)
Sets position of model component, if possible.
Bool_t IsAssignTo(const char *DataName) const
Checks, if model assigned to given data.
void ChangeDataNameInAssignments(const char *oldname, const char *newname)
Change name of data in assignments.
Bool_t fbNeedToRebuild
Internal flag.
virtual Bool_t BeforeEval(Int_t ndim)
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
Int_t fiMaxIntegrDepth
Maximum integration depth.
virtual Int_t GetWidthParIndex(Int_t)
Return index of parameter (if exist), which represent width of model component for given axis.
Bool_t fbIntegrScaling
Scale integral to integration volume.
Int_t GetDataIndexesSize(TGo4FitData *data)
void RebuildShape(Bool_t ForceBuild=kFALSE)
Recalculates shape of object.
TArrayD * fxAllParsValues
void SetGroupIndex(Int_t index=-1)
Set group index of model.
TGo4FitParameter * Get(Int_t n) override
virtual Double_t EvalN(const Double_t *v)
Calculates value of model according current parameters values and provided axes values.
void ClearAssigmentTo(const char *DataName)
void AssignToData(const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE)
Assign model to specified data object.
TGo4FitAssignment * GetAssigment(Int_t n) const
virtual Int_t GetPosParIndex(Int_t)
Return index of parameter (if exist), which represent position of model for given axis.
const Int_t * GetDataFullIndex(TGo4FitData *data, Int_t nbin)
TGo4FitModel()
Default constructor.
virtual Bool_t GetPosition(Int_t naxis, Double_t &pos)
Return position of model, if exists.
virtual Bool_t SetWidth(Int_t naxis, Double_t width)
Sets width of model component, if possible.
virtual void AfterEval()
Clear buffers, which were created by BeforeEval() method.
virtual Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE)
Evaluate model value for specified data point.
TGo4FitAssignment * GetAssigment(Int_t n)
Return TGo4FitAssignment object with given index.
virtual TGo4FitParameter * GetPosPar(Int_t naxis=0)
Return parameter (if exist), which represent position of model for given axis.
virtual Double_t EvaluateAtPoint(std::unique_ptr< TGo4FitDataIter > &iter, Bool_t UseRanges=kTRUE)
Evaluate model value for point, specified by current values of iterator.
void SetIntegrationsProperty(Int_t iMinIntegrDepth, Int_t iMaxIntegrDepth=0, Double_t iIntegrEps=0., Bool_t iAbsoluteEps=kFALSE, Bool_t iIntegrScaling=kFALSE)
Set integration properties.
TObjArray fxAssigments
List of TGo4FitAssignment objects.
TGo4FitData * GetAssignedConnection(Int_t n)
Return pointer on assigned data.
Int_t fiMinIntegrDepth
Minimum depth of integration.
Double_t GetRatioValueFor(const char *DataName)
Returns ratio value for specified data object.
void ClearAssignmentTo(const char *DataName)
Remove assignment to given data (if exists).
virtual Bool_t GetWidth(Int_t naxis, Double_t &width)
Returns with of model component, if exists.
Int_t NumAssigments() const
Returns number of assignment for this model.
Model and data objects parameter.
TGo4FitParsList()
Default constructor.