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;
180 virtual Double_t
Evaluate(Double_t x);
185 virtual Double_t
Evaluate(Double_t x, Double_t y);
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);
205 virtual Bool_t
GetPosition(Int_t naxis, Double_t& pos);
210 virtual Bool_t
SetPosition(Int_t naxis, Double_t pos);
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);
293 virtual Bool_t
Initialize(Int_t UseBuffers = -1);
Internal class, used for assignment of model component to data.
virtual ~TGo4FitAssignment()
Destroys TGo4FitAssignment object.
TGo4FitData * fxData
Pointer on assigned data.
TGo4FitAssignment()
Default constructor.
TGo4FitParameter * fxRatio
Parameter for ratio value.
Char_t * fxModelMask
Array of boolean values, selected model bins.
ClassDefOverride(TGo4FitAssignment, 1)
Double_t * fxModelBins
Array of model bins for assigned data.
void Print(Option_t *option="") const override
Print information about object on standard output.
TGo4FitComponent()
Default constructor.
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.
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.
Double_t * fxCurrentParsArray
Pointer on array of parameters values.
void SetBackgroundGroupIndex()
Set group index to background (index = 0).
virtual Double_t EvalN(const Double_t *v)
Calculates value of model according current parameters values and provided axes values.
Bool_t AddModelToDataResult(TGo4FitData *data)
Evaluate model values for all data point and add them to result buffer.
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 void Finalize()
Deletes all buffers, created during initialization.
virtual Bool_t SetPosition(Int_t naxis, Double_t pos)
Sets position of model component, if possible.
virtual Bool_t Initialize(Int_t UseBuffers=-1)
Initialize model object.
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 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.
void RemoveAllPars()
Clear all buffers, allocated during initialization.
virtual Bool_t BeforeEval(Int_t ndim)
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
virtual ~TGo4FitModel()
Delete TGo4FitModel 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 Bool_t GetWidth(Int_t naxis, Double_t &width)
Returns with of model component, if exists.
virtual Bool_t GetPosition(Int_t naxis, Double_t &pos)
Return position of model, if exists.
Bool_t IsAssignTo(const char *DataName) const
Checks, if model assigned to given data.
virtual Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE)
Evaluate model value for specified data point.
void ChangeDataNameInAssignments(const char *oldname, const char *newname)
Change name of data in assignments.
Bool_t fbNeedToRebuild
Internal flag.
TGo4FitParsList * fxAllPars
List of all parameters, associated not only with component directly but also with encapsulated object...
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.
virtual Double_t Integral()
Calculates integral of model component.
void SetGroupIndex(Int_t index=-1)
Set group index of model.
virtual Double_t Evaluate(Double_t x)
Calculates value of model for given x value.
TGo4FitParameter * Get(Int_t n) override
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 void AfterEval()
Clear buffers, which were created by BeforeEval() method.
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.
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.
TArrayD * fxAllParsValues
Double_t GetRatioValueFor(const char *DataName)
Returns ratio value for specified data object.
virtual Bool_t SetWidth(Int_t naxis, Double_t width)
Sets width of model component, if possible.
void ClearAssignmentTo(const char *DataName)
Remove assignment to given data (if exists).
Int_t NumAssigments() const
Returns number of assignment for this model.
Model and data objects parameter.
TGo4FitParsList()
Default constructor.