v2.10-0 (21000JUN2005)

Go4Fit
Class TGo4FitData

Direct Known Subclasses:
TGo4FitDataGraph, TGo4FitDataHistogram, TGo4FitDataProfile, TGo4FitDataRidge

class TGo4FitData
derived from TGo4FitComponent

Basic abtract class for representing data, which should be fitted.


Inner Class Summary
 public classTGo4FitData._enum_TGo4FitData_h_35
           

Field Summary
 protected Bool_tfbUseBinScale
          Use binary numbers as scale values.
if this flag set, bin numbers are used as scale values
 protected Double_tfdExcludeLessThen
          Sets limit for exclude bins, which less then this limit
 protected Double_tfdSigmaValue
          Value of sigma when fiTakeSigmasFrom = 2
 private Int_tfiBinsSize
          Number of entries in buffers.
 protected Int_tfiDataType
          Specified type of data:
0 - Histogram, 1 - graphics, 2 and so on - user defined
 private Int_tfiIndexesSize
          Number of indexes for each point.
 private Int_tfiScalesSize
          Number of scales values for each point.
 protected Int_tfiTakeSigmasFrom
          Specify sigma source.
0 - no sigmas, 1 - try take from data, 2 - const value (fdSigmaValue)
 protected TObjArrayfxAxisTrans
          Array of slots for scale transformation objects.
 private Double_t*fxBinsResult
          Buffer for complete model of bins values.
 private Int_t*fxFullIndex
          Store combination of indexes for each data bins.
 private Double_t*fxFullScale
          Array of axis values for each bins.
 private Double_t*fxFullWidth
          Array of width values for each bin.
 private Double_t*fxStandDev
          Buffer for standard devations of bins values.
 private Double_t*fxValues
          Buffer for bins values.

Fields inherited from class TNamed
fName, fTitle

Fields inherited from class Go4Fit.TGo4FitSlotList
fbUpdateSlotList, fxSlotList

Constructor Summary
TGo4FitData()
          Default constructor.
TGo4FitData(const char * iName, const char * iTitle, Int_t iDataType, Bool_t AddAmpl)
          Creates TGo4FitData object with given name and title.

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

Method Summary
 voidAddAxisTrans(TGo4FitAxisTrans* Trans, Bool_t TransOwned)
          Add transformation object to data.
 voidApplyRangesForModelMask(TGo4FitComponent* model, Char_t* ModelMask)
          Exclude points from model according model range conditions.
 protected const Bool_tBuffersAllocated()
          Checks, if buffers allocated for data.
 virtual Bool_tCanAmplTouch()
          Always return kTRUE.
 TObject*CreateDrawObject(const char * ObjName)
          Creates object, which can be drawn on canvas by ROOT.
 Int_tDefineBinsSize()
          Define number of selected bins in data
Create iterator and secuantially checks all points
 Int_tDefineDimensions()
          Define dimension number of data
Create iterator and checks number of dimension
 Bool_tDefineScaleMinMax(Int_t naxis, Double_t& min, Double_t& max)
          Return scales minimum and maximum for specified axis.
 virtual voidFillSlotList(TSeqCollection* list)
          Copy pointers on all slots of data object to list.
 protected virtual voidFinalize()
          Removes all buffers, created in initialize() routine.
 TGo4FitAxisTrans*GetAxisTrans(Int_t nslot)
          Return transformation object for given slot.
 TGo4FitSlot*GetAxisTransSlot(Int_t nslot)
          Return slot for transformation object.
 protected Double_t*GetBinsDevs()
          Returns pointer on buffer with standard deviations for each data bins.
 protected Double_t*GetBinsResult()
          Returns pointer on buffer with complete model of data bins.
 protected const Int_tGetBinsSize()
          Return number of data bins in buffers.
 protected Double_t*GetBinsValues()
          Returns pointer on buffer with data bins values.
 const const Int_tGetDataType()
          Returns type of data source. 0 - histogramic, 1 - points (scale values have no width)
 const Double_tGetExcludeLessThen()
          Returns limit, which uses to exclude bins, less then this limit.
 protected const const Int_t*GetFullIndex(Int_t nbin)
          Return indexes values for specified data bin from buffer.
 protected const Int_tGetIndexesSize()
          Returns dimension of indexes arrays.
 Int_tGetNumberOfTransSlots()
          Return number of slots for scale transformation objects.
 protected const Int_tGetScalesSize()
          Returns number of axis values for each point.
 protected const const Double_t*GetScaleValues(const Int_t nbin)
          Return scale values for specified index from buffer.
 const Int_tGetSigmaSource()
          Return source of sigma values.
 const Double_tGetSigmaValue()
          Return constant sigma value.
 Bool_tGetUseBinScale()
          Returns kTRUE, if binary numbers used as scale values.
 protected const const Double_t*GetWidthValues(const Int_t nbin)
          Return scales width values for specified index from buffer.
 protected virtual Bool_tInitialize(Int_t UseBuffers)
          Initialize data object.
 virtual Bool_tIsAnyDataTransform()
          Return kTRUE, if either initial data axis or data bins are transformed by TGo4FitData object.
 Bool_tIsCompatibleData(TGo4FitData* data)
          Checks, if data has same dimensions number and size of each dimensions.
 virtual TGo4FitDataIter*MakeIter()
          Creates iterator for data object.
 virtual const voidPrint(Option_t* option)
          Display information about data object on standard output.
 private voidReleaseAllPointers()
          Release all memory, allocated for buffers.
 private voidResetAllPoinetrs()
          Clears (sets to 0) all pointers, used for buffer allocations.
 voidSetAxisTrans(Int_t nslot, TGo4FitAxisTrans* Trans, Bool_t TransOwned)
          Sets transformation object for given slot.
 voidSetAxisTransNeeded(Int_t nslot, Bool_t iNeeded)
          Specified, when iNeeded = kTRUE, that trsnaformation object should always be provided to data.
 voidSetExcludeLessThen(Double_t limit)
          Sets limit to exclude bins, which not less then this limit.
 Bool_tSetNumberOfTransSlots(Int_t nslots)
          Sets number of slots for scale transformation objects.
 voidSetSigmaSource(Int_t TakeFrom, Double_t SigmaValue)
          Sets source of sigma for data.
 voidSetSigmaValue(Double_t SigmaValue)
          Set constant sigma value.
 voidSetUseBinScale(Bool_t iUseBinScale)
          If kTRUE, binary numbers will be used as scale values.

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, Get, GetPar, GetParEpsilon, GetParError, GetParFixed, GetParFullName, GetParIndex, GetParName, GetParRange, GetParsValues, GetParValue, InsertPar, IsAllParsFixed, MemorizePars, NumFixedPars, NumFreePars, NumPars, 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

fbUseBinScale

protected Bool_t fbUseBinScale
Use binary numbers as scale values.
if this flag set, bin numbers are used as scale values

fdExcludeLessThen

protected Double_t fdExcludeLessThen
Sets limit for exclude bins, which less then this limit

fdSigmaValue

protected Double_t fdSigmaValue
Value of sigma when fiTakeSigmasFrom = 2

fiBinsSize

private Int_t fiBinsSize
Number of entries in buffers.

fiDataType

protected Int_t fiDataType
Specified type of data:
0 - Histogram, 1 - graphics, 2 and so on - user defined

fiIndexesSize

private Int_t fiIndexesSize
Number of indexes for each point.

fiScalesSize

private Int_t fiScalesSize
Number of scales values for each point.

fiTakeSigmasFrom

protected Int_t fiTakeSigmasFrom
Specify sigma source.
0 - no sigmas, 1 - try take from data, 2 - const value (fdSigmaValue)

fxAxisTrans

protected TObjArray fxAxisTrans
Array of slots for scale transformation objects.

fxBinsResult

private Double_t* fxBinsResult
Buffer for complete model of bins values.

fxFullIndex

private Int_t* fxFullIndex
Store combination of indexes for each data bins.
Size of [GetBinsSize()][NumDimension()].
Used in case of maximum memory usage.

fxFullScale

private Double_t* fxFullScale
Array of axis values for each bins.
Used in case of maximum memory usage.
Size [BinsSize * AxisNumber]

fxFullWidth

private Double_t* fxFullWidth
Array of width values for each bin.
Used in case of maximum memory usage.
Size [BinsSize * AxisNumber]

fxStandDev

private Double_t* fxStandDev
Buffer for standard devations of bins values.

fxValues

private Double_t* fxValues
Buffer for bins values.
Constructor Detail

TGo4FitData

public TGo4FitData()
Default constructor.

TGo4FitData

public TGo4FitData(const char * iName, const char * iTitle, Int_t iDataType, Bool_t AddAmpl)
Creates TGo4FitData object with given name and title.
Type of data (histogramic or points) and usage of amplitude can be specified.
TGo4FitData object should not be created directly. Implementation of this class like TGo4FitDataHistogram,
TGo4FitDataGraph and so on should be used.
Method Detail

~TGo4FitData

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

AddAxisTrans

public void AddAxisTrans(TGo4FitAxisTrans* Trans, Bool_t TransOwned)
Add transformation object to data.
First new slot reserved for this object.

ApplyRangesForModelMask

public void ApplyRangesForModelMask(TGo4FitComponent* model, Char_t* ModelMask)
Exclude points from model according model range conditions.
Primary range conditions defines for data. No any model, associated to this data, can exceed it's ranges.
But not full data range can be used for explicit model evaluation. This functions fill model mask (array of chars) inside data range, where model should be evaluated.
Can be used only after Initialize() method.

BuffersAllocated

protected const Bool_t BuffersAllocated()
Checks, if buffers allocated for data.

CanAmplTouch

public virtual Bool_t CanAmplTouch()
Always return kTRUE.
This specify that any data object may has or hasnot amplitude.
Amplitude parameter (if exist) will be used to scale bins values.

CreateDrawObject

public TObject* CreateDrawObject(const char * ObjName)
Creates object, which can be drawn on canvas by ROOT.
This method creates either TH1 (in case of histogramic data) or TGraph object and fills bins by content of data.

DefineBinsSize

public Int_t DefineBinsSize()
Define number of selected bins in data
Create iterator and secuantially checks all points

DefineDimensions

public Int_t DefineDimensions()
Define dimension number of data
Create iterator and checks number of dimension

DefineScaleMinMax

public Bool_t DefineScaleMinMax(Int_t naxis, Double_t& min, Double_t& max)
Return scales minimum and maximum for specified axis.
Can be used before or after Initialize() method.

FillSlotList

public virtual void FillSlotList(TSeqCollection* list)
Copy pointers on all slots of data object to list.

Finalize

protected virtual void Finalize()
Removes all buffers, created in initialize() routine.

GetAxisTrans

public TGo4FitAxisTrans* GetAxisTrans(Int_t nslot)
Return transformation object for given slot.

GetAxisTransSlot

public TGo4FitSlot* GetAxisTransSlot(Int_t nslot)
Return slot for transformation object.

GetBinsDevs

protected Double_t* GetBinsDevs()
Returns pointer on buffer with standard deviations for each data bins.
Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

GetBinsResult

protected Double_t* GetBinsResult()
Returns pointer on buffer with complete model of data bins.
Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

GetBinsSize

protected const Int_t GetBinsSize()
Return number of data bins in buffers.

GetBinsValues

protected Double_t* GetBinsValues()
Returns pointer on buffer with data bins values.
Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

GetDataType

public const const Int_t GetDataType()
Returns type of data source. 0 - histogramic, 1 - points (scale values have no width)

GetExcludeLessThen

public const Double_t GetExcludeLessThen()
Returns limit, which uses to exclude bins, less then this limit.

GetFullIndex

protected const const Int_t* GetFullIndex(Int_t nbin)
Return indexes values for specified data bin from buffer.
Can be used only if buffers were allocated, otherwise return 0. nbin should be from 0 to GetBinsSize()-1

GetIndexesSize

protected const Int_t GetIndexesSize()
Returns dimension of indexes arrays.
Can be used after Initialize() method, otherwise TGo4FitDataIter::IndexesSize() method should be used.

GetNumberOfTransSlots

public Int_t GetNumberOfTransSlots()
Return number of slots for scale transformation objects.

GetScalesSize

protected const Int_t GetScalesSize()
Returns number of axis values for each point.
Can be used after Initialize() method, otherwise TGo4FitDataIter::ScalesSize() method should be used.

GetScaleValues

protected const const Double_t* GetScaleValues(const Int_t nbin)
Return scale values for specified index from buffer.
Can be used only if buffers were allocated, otherwise return 0. nbin should be from 0 to GetBinsSize()-1

GetSigmaSource

public const Int_t GetSigmaSource()
Return source of sigma values.
Possible values are:
0 - no sigma sources;
1 - sigma should be taken from data source object;
2 - sigma is constant and defined by GetSigmaValue() funcion.

GetSigmaValue

public const Double_t GetSigmaValue()
Return constant sigma value.
Uses, when GetSigmaSource() returns 2.

GetUseBinScale

public Bool_t GetUseBinScale()
Returns kTRUE, if binary numbers used as scale values.

GetWidthValues

protected const const Double_t* GetWidthValues(const Int_t nbin)
Return scales width values for specified index from buffer.
Can be used only if buffers were allocated, otherwise return 0. nbin should be from 0 to GetBinsSize()-1

Initialize

protected virtual Bool_t Initialize(Int_t UseBuffers)
Initialize data object.
This routine should be used to allocate memory for internal buffers.
Its automatically calls in DoActions() routine of fitter.
if UseBuffers>0 or ( GetUseBuffers() && UseBuffers<0) internal buffers will be created.
Concuming more memory may dramaticaly decrease time for fitting.

IsAnyDataTransform

public virtual Bool_t IsAnyDataTransform()
Return kTRUE, if either initial data axis or data bins are transformed by TGo4FitData object.
For instance, if SetUseBinScales() is used.

IsCompatibleData

public Bool_t IsCompatibleData(TGo4FitData* data)
Checks, if data has same dimensions number and size of each dimensions.
Used, when one data objects used to be a model component of another data object.
Should be used only after Initialize() method for current data object.

MakeIter

public virtual TGo4FitDataIter* MakeIter()
Creates iterator for data object.
For detailed description see TGo4FitDataIter class.

Print

public virtual const void Print(Option_t* option)
Display information about data object on standard output.

ReleaseAllPointers

private void ReleaseAllPointers()
Release all memory, allocated for buffers.

ResetAllPoinetrs

private void ResetAllPoinetrs()
Clears (sets to 0) all pointers, used for buffer allocations.

SetAxisTrans

public void SetAxisTrans(Int_t nslot, TGo4FitAxisTrans* Trans, Bool_t TransOwned)
Sets transformation object for given slot.
If not enougth slots was reserved, SetNumberOfTransSlots(nslot+1) will be called first.

SetAxisTransNeeded

public void SetAxisTransNeeded(Int_t nslot, Bool_t iNeeded)
Specified, when iNeeded = kTRUE, that trsnaformation object should always be provided to data.

SetExcludeLessThen

public void SetExcludeLessThen(Double_t limit)
Sets limit to exclude bins, which not less then this limit.

SetNumberOfTransSlots

public Bool_t SetNumberOfTransSlots(Int_t nslots)
Sets number of slots for scale transformation objects.
By default, TGo4FitData has no place (slots) for transformation objects.
In this case scale values can be taken from data source (TAxis of TH1) or just bins numbers can be used.
To use transformation of these values, inherited from TGo4FitAxisTrans class should be used.
Slots fot such objects can be reserved first.

SetSigmaSource

public void SetSigmaSource(Int_t TakeFrom, Double_t SigmaValue)
Sets source of sigma for data.
For description see GetSigmaSource() function.

SetSigmaValue

public void SetSigmaValue(Double_t SigmaValue)
Set constant sigma value.
Value wil be used, if GetSigmaSource()==2.

SetUseBinScale

public void SetUseBinScale(Bool_t iUseBinScale)
If kTRUE, binary numbers will be used as scale values.

Association Links

to Class TObjArray

Array of slots for scale transformation objects.

to Class TGo4FitAxisTrans

Supplier Cardinality 0..*
Type aggregation

to Class TGo4FitSlot

Label TObjArray fxCalibrations
Supplier Cardinality 0..*
Type aggregation

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

30-06-2005