v2.10-0 (21000JUN2005)

Go4Fit
Class TGo4FitModelFromData


class TGo4FitModelFromData
derived from TGo4FitModel

Model object, which is uses TGo4FitData object to produce model bins.

In constructor one should just specify data object (it may be TGo4FitDataHistogram or other), which will be used as model. Optionally, amplitude parameter can be created. For instance:

TH1* histo = GetHistogramSomewhere();
TGo4FitDataHistogram *h = new TGo4FitDataHistogram("hdata", histo, kFALSE);
TGo4FitModelFromData *m = new TGo4FitModelFromData("hmodel", h, kFALSE);

The dimensions and bins number on each axis of data object, used in model, should be absolutely the same, as in data object, which should be fitted. Assigned data object will be owned by TGo4FitModelFromData object. But data source object (histogram "histo" in example) may not be owned by object and may be provided later by SetObject() method of fitter.

TGo4Fitter *fitter = GetFitterSomewhere();
TH1* histo = GetHistogramSomewhere();
fitter->SetObject(histo, "hdata");

The name of data object "hdata" instead of model object "hmodel" should be used, when assigning data to TGo4FitModelFromData object via SetObject() method of fitter.


Field Summary
 protected TGo4FitSlotfxData
          Slot for TGo4FitData object, which is used as model component.
 private TGo4FitDataIter*fxIter
           

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
TGo4FitModelFromData()
          Default constructor.
TGo4FitModelFromData(const char * iName, TGo4FitData* iDataAsModel, Bool_t Amplitude)
          Creates TGo4FitModelFromData object with given name.
TGo4FitModelFromData(const char * iName, TH1* , Bool_t iOwned, Bool_t Amplitude)
          Creates TGo4FitModelFromData object with given name, which uses external histogram as model component.

Destructor Summary
~TGo4FitModelFromData()
          Destroy TGo4FitModelFromData object

Method Summary
 virtual voidAfterEval()
           
 virtual Bool_tBeforeEval(Int_t )
           
 virtual Double_tEvalN(const Double_t* v)
           
 virtual Double_tEvaluateAtPoint(TGo4FitData* data, Int_t nbin, Bool_t UseRanges)
           
 virtual Double_tEvaluateAtPoint(TGo4FitDataIter* iter, Bool_t UseRanges)
           
 virtual voidFillSlotList(TSeqCollection* list)
          Add ponter on slot, which should contain TGo4FitData object, to a slots list.
 protected Double_tFindDataPoint(Int_t NumIndexes, const Int_t* Indexes)
           
 const TGo4FitData*GetDataAsModel()
          Return pointer on TGo4FitData object, which is used as model component.
 protected virtual Bool_tInitialize(Int_t UseBuffers)
          Initialize object.
 virtual const voidPrint(Option_t* option)
          Print information on standard output.
 voidSetDataAsModel(TGo4FitData* iData, Bool_t iOwned)
          Sets pointer on TGo4FitData object with ownership flag.

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

Methods inherited from class Go4Fit.TGo4FitComponent
AddRangeCondition, AddRangeCut, CanAmplTouch, 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, FindSlot, GetSlot, GetSlotList, IsEmptySlots, IsObjectInSlots, NumSlots, PrepareSlotsForWriting, SetObject, SetObject, SetSaveFlagForObjects, SetUpdateSlotList

Field Detail

fxData

protected TGo4FitSlot fxData
Slot for TGo4FitData object, which is used as model component.
label slot for TGo4FitData

fxIter

private TGo4FitDataIter* fxIter
Constructor Detail

TGo4FitModelFromData

public TGo4FitModelFromData()
Default constructor.

TGo4FitModelFromData

public TGo4FitModelFromData(const char * iName, TGo4FitData* iDataAsModel, Bool_t Amplitude)
Creates TGo4FitModelFromData object with given name.
Pointer on TGo4FitData object and usage of amplitude can be specified.

TGo4FitModelFromData

public TGo4FitModelFromData(const char * iName, TH1* , Bool_t iOwned, Bool_t Amplitude)
Creates TGo4FitModelFromData object with given name, which uses external histogram as model component.
In constructor TGo4FitDataHistogram object will be created, to which histogram will be assigned.
Additionally ownership flag for histogram and usage of amplitude can be specified.
Method Detail

~TGo4FitModelFromData

public synchronized ~TGo4FitModelFromData()
Destroy TGo4FitModelFromData object
Method Detail

AfterEval

public virtual void AfterEval()

BeforeEval

public virtual Bool_t BeforeEval(Int_t )

EvalN

public virtual Double_t EvalN(const Double_t* v)

EvaluateAtPoint

public virtual Double_t EvaluateAtPoint(TGo4FitData* data, Int_t nbin, Bool_t UseRanges)

EvaluateAtPoint

public virtual Double_t EvaluateAtPoint(TGo4FitDataIter* iter, Bool_t UseRanges)

FillSlotList

public virtual void FillSlotList(TSeqCollection* list)
Add ponter on slot, which should contain TGo4FitData object, to a slots list.

FindDataPoint

protected Double_t FindDataPoint(Int_t NumIndexes, const Int_t* Indexes)

GetDataAsModel

public const TGo4FitData* GetDataAsModel()
Return pointer on TGo4FitData object, which is used as model component.

Initialize

protected virtual Bool_t Initialize(Int_t UseBuffers)
Initialize object.

Print

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

SetDataAsModel

public void SetDataAsModel(TGo4FitData* iData, Bool_t iOwned)
Sets pointer on TGo4FitData object with ownership flag.

Association Links

to Class TGo4FitSlot

Slot for TGo4FitData object, which is used as model component.

Label slot for TGo4FitData

to Class TGo4FitDataIter


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

30-06-2005