v2.10-0 (21000JUN2005)

Go4Fit
Class TGo4FitModelFormula


class TGo4FitModelFormula
derived from TGo4FitModel

Model object, which uses ROOT TFormula class facility.

Any kind of one-line expression can be analyzed by TFormula object and evaluated for given set of axis values and set of parameters. TGo4FitModelFormula in constructor creates additional parameters with names "Par0", "Par1" and so on, which can be used in equation and can be optimized. Optionally amplitude parameters with name "Ampl" can be created. In constructor expression, number of additional parameters and using of amplitude parameter should be specified. Fort instance, equation with 3 parameters and amplitude:

TGo4FitModelFormula *f = new TGo4FitModelFormula("Form","(x-Par0)*(y-Par1)*(z-Par2)", 3, kTRUE);


Field Summary
 private Int_tfiNDimension
          temporary variable for formula calculation in EvalN() method.
 protected TStringfxExpression
          String, containig formula expression.
 protected TFormula*fxFormula
          formula for evaluation expression in EvalN() method.
 protected TArrayIfxPosIndex
           
 protected TArrayIfxWidthIndex
           

Fields inherited from class Go4Fit.TGo4FitModel
fbAbsoluteEps, fbIntegrScaling, fdIntegrEps, fiMaxIntegrDepth, fiMinIntegrDepth

Fields inherited from class TNamed
fName, fTitle

Fields inherited from class Go4Fit.TGo4FitSlotList
fbUpdateSlotList, fxSlotList

Constructor Summary
TGo4FitModelFormula()
          Default constructor
TGo4FitModelFormula(const char * iName, const char * iExpressionStr, Int_t iNPars, Bool_t AddAmplitude)
          Create TGo4FitModelFormula object with given names.

Destructor Summary
 virtual synchronized ~TGo4FitModelFormula()
          Destroys TGo4FitModelFormula object.

Method Summary
 virtual voidAfterEval()
           
 virtual Bool_tBeforeEval(Int_t ndim)
           
 virtual Bool_tCanAmplTouch()
          Signals that ampltide parameter can be removed from or introdeced to object.
 protected voidCloseFormula()
           
 protected Bool_tCompileFormula()
           
 virtual Double_tEvalN(const Double_t* v)
           
 protected virtual voidFinalize()
           
 const const char *GetExpression()
          Return formula expression.
 protected TGo4FitParameter*GetExprPar(Int_t n)
           
 protected TStringGetExprParName(Int_t n)
           
 Int_tGetNumberOfExprPar()
          Get number of parameters, which can be used in exprssion.
 protected virtual Int_tGetPosParIndex(Int_t naxis)
           
 protected virtual Int_tGetWidthParIndex(Int_t naxis)
           
 protected virtual Bool_tInitialize(Int_t UseBuffers)
           
 virtual const voidPrint(Option_t* option)
          Print information on standard output.
 voidSetExpression(const char * expr)
          Sets formula expression.
 Bool_tSetNumberOfExprPar(Int_t num)
          Sets number of parameters, which can be used in expression.
 voidSetPosParIndex(Int_t naxis, Int_t indx)
           
 voidSetWidthParIndex(Int_t naxis, Int_t indx)
           

Methods inherited from class Go4Fit.TGo4FitModel
AddModelToDataResult, AssignmentName, AssignToData, BuffersAllocated, ChangeDataNameInAssignments, ClearAssigmentTo, ClearAssignments, ClearAssignmentTo, ConnectToDataIfAssigned, Evaluate, Evaluate, Evaluate, Evaluate, EvaluateAndIntegrate, EvaluateAtPoint, EvaluateAtPoint, Get, GetAssignedConnection, GetDataFullIndex, GetDataIndexesSize, GetGroupIndex, GetModelBins, GetPosition, GetPosPar, GetRatioValueFor, GetWidth, GetWidthPar, Integral, IsAssignTo, NeedIntegration, NumAssigments, NumPars, RebuildShape, SetBackgroundGroupIndex, SetGroupIndex, SetIntegrationsProperty, SetNeedToRebuild, SetPosition, SetWidth, UserFunction

Methods inherited from class Go4Fit.TGo4FitComponent
AddRangeCondition, AddRangeCut, CheckRangeConditions, ClearRanges, CollectParsTo, ExcludeRange, GetAmplError, GetAmplFullName, GetAmplIndex, GetAmplName, GetAmplPar, GetAmplValue, GetNumRangeCondition, GetNumRangeCut, GetRangeCondition, GetRangeCut, GetRangeMax, GetRangeMin, GetUseBuffers, IsAnyRangeLimits, IsRangeCutExcluding, MakeAmpl, NewAmplitude, NewParameter, RemoveAmpl, RemoveRangeCondition, RemoveRangeCut, SetAmplError, SetAmplIndex, SetAmplValue, SetRange, SetRangeCondition, SetRangeCutExcluding, SetRangeMax, SetRangeMin, SetUseBuffers

Methods inherited from class Go4Fit.TGo4FitParsList
AddPar, CanRollbackPars, ClearPars, ClearParsBlocking, CreatePar, Find, Find, Find, FindPar, FindPar, FindPar, GetPar, GetParEpsilon, GetParError, GetParFixed, GetParFullName, GetParIndex, GetParName, GetParRange, GetParsValues, GetParValue, InsertPar, IsAllParsFixed, MemorizePars, NumFixedPars, NumFreePars, PrintPars, RememberPars, RemovePar, RemovePar, RemoveParByIndex, SetParEpsilon, SetParError, SetParFixed, SetParName, SetParRange, SetParsNames, SetParsOwner, SetParsValues, SetParsValues, SetParValue

Methods inherited from class Go4Fit.TGo4FitNamed
GetFullName, GetOwner, GetOwnerFullName, SetOwner

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Methods inherited from class Go4Fit.TGo4FitSlotList
CheckDuplicatesOnSlot, CheckObjects, ClearObjects, ClearSlot, ConnectSlots, ConnectSlots, FillSlotList, FindSlot, GetSlot, GetSlotList, IsEmptySlots, IsObjectInSlots, NumSlots, PrepareSlotsForWriting, SetObject, SetObject, SetSaveFlagForObjects, SetUpdateSlotList

Field Detail

fiNDimension

private Int_t fiNDimension
temporary variable for formula calculation in EvalN() method.

fxExpression

protected TString fxExpression
String, containig formula expression.

fxFormula

protected TFormula* fxFormula
formula for evaluation expression in EvalN() method.

fxPosIndex

protected TArrayI fxPosIndex

fxWidthIndex

protected TArrayI fxWidthIndex
Constructor Detail

TGo4FitModelFormula

public TGo4FitModelFormula()
Default constructor

TGo4FitModelFormula

public TGo4FitModelFormula(const char * iName, const char * iExpressionStr, Int_t iNPars, Bool_t AddAmplitude)
Create TGo4FitModelFormula object with given names.
Formula expression and number of parameters can be sets up. All using of amplitude parameter can be invoked.
Method Detail

~TGo4FitModelFormula

public virtual synchronized ~TGo4FitModelFormula()
Destroys TGo4FitModelFormula object.
Method Detail

AfterEval

public virtual void AfterEval()

BeforeEval

public virtual Bool_t BeforeEval(Int_t ndim)

CanAmplTouch

public virtual Bool_t CanAmplTouch()
Signals that ampltide parameter can be removed from or introdeced to object.

CloseFormula

protected void CloseFormula()

CompileFormula

protected Bool_t CompileFormula()

EvalN

public virtual Double_t EvalN(const Double_t* v)

Finalize

protected virtual void Finalize()

GetExpression

public const const char * GetExpression()
Return formula expression.

GetExprPar

protected TGo4FitParameter* GetExprPar(Int_t n)

GetExprParName

protected TString GetExprParName(Int_t n)

GetNumberOfExprPar

public Int_t GetNumberOfExprPar()
Get number of parameters, which can be used in exprssion.

GetPosParIndex

protected virtual Int_t GetPosParIndex(Int_t naxis)

GetWidthParIndex

protected virtual Int_t GetWidthParIndex(Int_t naxis)

Initialize

protected virtual Bool_t Initialize(Int_t UseBuffers)

Print

public virtual const void Print(Option_t* option)
Print information on standard output.

SetExpression

public void SetExpression(const char * expr)
Sets formula expression.

SetNumberOfExprPar

public Bool_t SetNumberOfExprPar(Int_t num)
Sets number of parameters, which can be used in expression.

SetPosParIndex

public void SetPosParIndex(Int_t naxis, Int_t indx)

SetWidthParIndex

public void SetWidthParIndex(Int_t naxis, Int_t indx)

Association Links

to Class TArrayI

to Class TArrayI

to Class TFormula

formula for evaluation expression in EvalN() method.

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005