GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitData Class Reference

Basic abstract class for representing data, which should be fitted. More...

#include <TGo4FitData.h>

+ Inheritance diagram for TGo4FitData:

Public Types

enum  { dtHistogram = 1 , dtGraph = 2 }
 

Public Member Functions

 TGo4FitData ()
 Default constructor.
 
 TGo4FitData (const char *iName, const char *iTitle, Int_t iDataType=dtHistogram, Bool_t AddAmpl=kFALSE)
 Creates TGo4FitData object with given name and title.
 
virtual ~TGo4FitData ()
 Destroys TGo4FitData object.
 
void AddAxisTrans (TGo4FitAxisTrans *Trans, Bool_t TransOwned=kFALSE)
 Add transformation object to data.
 
void ApplyRangesForModelMask (TGo4FitComponent *model, Char_t *ModelMask)
 Exclude points from model according model range conditions.
 
Bool_t CanAmplTouch () override
 Always return kTRUE.
 
TObject * CreateDrawObject (const char *ObjName)
 Creates object, which can be drawn on canvas by ROOT.
 
Int_t DefineBinsSize ()
 Defines number of selected bins in data Creates iterator and sequentially checks all points.
 
Int_t DefineDimensions ()
 Define dimension number of data Create iterator and checks number of dimension.
 
Bool_t DefineScaleMinMax (Int_t naxis, Double_t &min, Double_t &max)
 Return scales minimum and maximum for specified axis.
 
void FillSlotList (TSeqCollection *list) override
 Copy pointers on all slots of data object to list.
 
TGo4FitAxisTransGetAxisTrans (Int_t nslot) const
 Return transformation object for given slot.
 
TGo4FitSlotGetAxisTransSlot (Int_t nslot) const
 Return slot for transformation object.
 
Int_t GetDataType () const
 Returns type of data source.
 
Double_t GetExcludeLessThen () const
 Returns limit, which uses to exclude bins, less then this limit.
 
Int_t GetNumberOfTransSlots () const
 Return number of slots for scale transformation objects.
 
Int_t GetSigmaSource () const
 Return source of sigma values.
 
Double_t GetSigmaValue () const
 Return constant sigma value.
 
Bool_t GetUseBinScale () const
 Returns kTRUE, if binary numbers used as scale values.
 
virtual Bool_t IsAnyDataTransform () const
 Return kTRUE, if either initial data axis or data bins are transformed by TGo4FitData object.
 
Bool_t IsCompatibleData (TGo4FitData *data)
 Checks, if data has same dimensions number and size of each dimensions.
 
virtual std::unique_ptr< TGo4FitDataIterMakeIter ()
 Creates iterator for data object.
 
void Print (Option_t *option="") const override
 Display information about data object on standard output.
 
void SetAxisTrans (Int_t nslot, TGo4FitAxisTrans *Trans, Bool_t TransOwned=kFALSE)
 Sets transformation object for given slot.
 
void SetAxisTransNeeded (Int_t nslot, Bool_t iNeeded=kFALSE)
 Specified, when iNeeded = kTRUE, that transformation object should always be provided to data.
 
void SetExcludeLessThen (Double_t limit=0.)
 Sets limit to exclude bins, which not less then this limit.
 
Bool_t SetNumberOfTransSlots (Int_t nslots)
 Sets number of slots for scale transformation objects.
 
void SetSigmaSource (Int_t TakeFrom, Double_t SigmaValue=1.)
 Sets source of sigma for data.
 
void SetSigmaValue (Double_t SigmaValue)
 Set constant sigma value.
 
void SetUseBinScale (Bool_t iUseBinScale)
 If kTRUE, binary numbers will be used as scale values.
 
- Public Member Functions inherited from TGo4FitComponent
 TGo4FitComponent ()
 Default constructor.
 
 TGo4FitComponent (const char *iName, const char *iTitle)
 Creates TGo4FitComponent object.
 
virtual ~TGo4FitComponent ()
 Destroys TGo4FitComponent object.
 
void AddRangeCondition (Int_t typ, Int_t naxis, Double_t left, Double_t right)
 Add new range condition.
 
void AddRangeCut (TCutG *cut, Bool_t exclude=kFALSE)
 Add TCutG object as range condition for two-dimensional case.
 
Bool_t CheckRangeConditions (const Double_t *values, Int_t numaxis)
 Check all range conditions for specified point.
 
void ClearRanges (Int_t naxis=-1)
 Clear all range conditions for given axis.
 
void CollectParsTo (TGo4FitParsList &list) override
 Collect all parameters to provided parameters list object.
 
void ExcludeRange (Int_t naxis, Double_t min, Double_t max)
 Exclude axis range from consideration.
 
Double_t GetAmplError ()
 Return error of amplitude parameter.
 
const char * GetAmplFullName ()
 Returns full name of amplitude parameter.
 
const char * GetAmplName ()
 Returns name of amplitude parameter.
 
TGo4FitParameterGetAmplPar ()
 Return amplitude parameter object.
 
Double_t GetAmplValue ()
 Return value of amplitude parameter.
 
Int_t GetNumRangeCondition () const
 Returns number of range condition (exclude range cuts).
 
Int_t GetNumRangeCut () const
 Returns number of range cuts, assigned to object.
 
void GetRangeCondition (Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
 Return value for specified range condition.
 
TCutG * GetRangeCut (Int_t n) const
 Returns specified range cut.
 
Bool_t GetRangeMax (Int_t naxis, Double_t &value) const
 Defines maximum allowed value for given range.
 
Bool_t GetRangeMin (Int_t naxis, Double_t &value) const
 Defines minimum allowed value for given range.
 
Bool_t GetUseBuffers () const
 Returns flag of usage of additional buffers.
 
Bool_t IsAnyRangeLimits () const
 Return kTRUE, if any range conditions were introduced.
 
Bool_t IsRangeCutExcluding (Int_t n) const
 Return kTRUE if cut exclude range.
 
Bool_t MakeAmpl (Bool_t isFixed=kFALSE)
 Create amplitude parameter and adds it to parameters list.
 
void Print (Option_t *option="") const override
 Print info about object on standard output.
 
Bool_t RemoveAmpl ()
 Remove amplitude parameter from parameters list.
 
void RemoveRangeCondition (Int_t n)
 Removes specified range condition.
 
void RemoveRangeCut (Int_t n)
 Delete range cut with specified index.
 
void SetAmplError (Double_t iError)
 Set error of amplitude parameter.
 
void SetAmplValue (Double_t iAmpl)
 Set value of amplitude parameter.
 
void SetRange (Int_t naxis, Double_t min, Double_t max)
 Includes axis range in consideration.
 
void SetRangeCondition (Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
 Change specified range condition.
 
void SetRangeCutExcluding (Int_t n, Bool_t exclude=kTRUE)
 Set type of range cut (excluding or including)
 
void SetRangeMax (Int_t naxis, Double_t value)
 Set maximum axis value, taken into consideration.
 
void SetRangeMin (Int_t naxis, Double_t value)
 Set minimum axis value, taken into consideration.
 
void SetUseBuffers (Bool_t iUse)
 Sets usage of additional buffers.
 
- Public Member Functions inherited from TGo4FitParsList
 TGo4FitParsList ()
 Default constructor.
 
 TGo4FitParsList (Bool_t IsParsOwned)
 Create TGo4FitParsList object and set flag of ownership of parameters object.
 
 TGo4FitParsList (const char *Name, const char *Title, Bool_t IsParsOwned)
 Create TGo4FitParsList object, set it's name and title, and ownership flag of parameters pbjects.
 
virtual ~TGo4FitParsList ()
 Destroy TGo4FitParsList object.
 
virtual bool CanRollbackPars ()
 Return true if parameters can be safely restored from memorized values;.
 
void ClearPars ()
 Remove all parameters from list.
 
TGo4FitParameterCreatePar (const char *ParName, const char *Title, Double_t iValue=0)
 Create new TGo4FitParameter object with given name, title and parameter value, and put this object to the list.
 
TGo4FitParameterFindPar (const char *OwnerFullName, const char *ParName)
 Find parameter with given owner full name and parameter name.
 
TGo4FitParameterFindPar (const char *ParName)
 Find parameter object with given name.
 
TGo4FitParameterFindPar (TGo4FitParameter *par)
 Find parameter in list.
 
TGo4FitParameterGetPar (Int_t n)
 Return parameter according given index.
 
virtual Bool_t GetParEpsilon (const char *ParName, Double_t &Epsilon)
 Get epsilon value for parameter with given name.
 
Double_t GetParError (const char *ParName)
 Get error value for parameter with given name.
 
virtual Bool_t GetParFixed (const char *ParName)
 Return status for parameter with given name, is it fixed or not.
 
const char * GetParFullName (Int_t n)
 Return full name of parameter with given index.
 
Int_t GetParIndex (const TGo4FitParameter *par)
 Return index of given parameter in list.
 
const char * GetParName (Int_t n)
 Return name of parameter with given index.
 
virtual Bool_t GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
 Get range limits for parameter with given name.
 
void GetParsValues (Double_t *pars)
 Copy values of all parameters in list to provided array.
 
Double_t GetParValue (const char *ParName)
 Return value of parameter with given name.
 
Bool_t IsAllParsFixed ()
 Returns true, if all parameters in list fixed;.
 
virtual void MemorizePars ()
 Memorize values of all parameters.
 
Int_t NumFixedPars ()
 Return number of fixed pars.
 
Int_t NumFreePars ()
 Return number of free pars.
 
virtual Int_t NumPars ()
 Return number of parameters in list.
 
void Print (Option_t *option="") const override
 Default print method.
 
void PrintPars () const
 Print only value and error of all parameters in list.
 
virtual void RememberPars ()
 Restore parameters values, which were stored by MemorizePars() routine;.
 
Bool_t RemovePar (const char *name)
 Remove parameter from list with given name.
 
Bool_t RemovePar (TGo4FitParameter *par)
 Remove parameter from list.
 
virtual Bool_t SetParEpsilon (const char *ParName, Double_t Epsilon)
 Set epsilon value for parameter with given name.
 
Bool_t SetParError (const char *ParName, Double_t iError)
 Set error value for parameter with given name.
 
virtual Bool_t SetParFixed (const char *ParName, Bool_t iFixed=kTRUE)
 Set for parameter with given name, is it fixed or not.
 
void SetParName (Int_t n, const char *name)
 Set new name for parameter object with provided index.
 
virtual Bool_t SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax)
 Set range limits for parameter with given name.
 
void SetParsNames (const char *name0="Par0", const char *name1="Par1", const char *name2="Par2", const char *name3="Par3", const char *name4="Par4", const char *name5="Par5", const char *name6="Par6", const char *name7="Par7", const char *name8="Par8", const char *name9="Par9")
 Set names of first 10 parameters.
 
void SetParsValues (Double_t *pars)
 Set value for all parameters from array.
 
void SetParsValues (Double_t par0=0., Double_t par1=0., Double_t par2=0., Double_t par3=0., Double_t par4=0., Double_t par5=0., Double_t par6=0., Double_t par7=0., Double_t par8=0., Double_t par9=0.)
 Set values for first 10 parameters.
 
Bool_t SetParValue (const char *ParName, Double_t iValue)
 Set value of parameter with given name.
 
- Public Member Functions inherited from TGo4FitNamed
 TGo4FitNamed ()
 Default constructor.
 
 TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr)
 Creates TGo4FitNamed object and set name and title.
 
virtual ~TGo4FitNamed ()
 Destroy TGo4FitNamed object.
 
const char * GetFullName ()
 Returns full name of object.
 
TNamed * GetOwner ()
 Return owner of object.
 
const char * GetOwnerFullName ()
 Return full name of owner.
 
void Print (Option_t *option="") const override
 
void SetOwner (TNamed *iOwner)
 Sets owner of object.
 
- Public Member Functions inherited from TGo4FitSlotList
 TGo4FitSlotList ()
 
virtual ~TGo4FitSlotList ()
 
Bool_t CheckObjects (Bool_t MakeOut=kTRUE)
 Check, if all necessary objects are provided.
 
void ClearObjects (const char *PlaceName=nullptr, Bool_t NonOwned=kTRUE)
 Clear object from slot(s), which are defined by PlaceName condition.
 
void ClearSlot (TGo4FitSlot *slot, Bool_t NonOwned)
 Clear object in specified slot.
 
Bool_t ConnectSlots (const char *Slot1FullName, const char *Slot2FullName)
 Connects first slot to second.
 
Bool_t ConnectSlots (TGo4FitSlot *slot1, TGo4FitSlot *slot2)
 Connects first slot to second.
 
TGo4FitSlotFindSlot (const char *FullSlotName)
 Find slot in list with given full name;.
 
TGo4FitSlotGetSlot (Int_t nslot)
 Returns slots from list with specified index.
 
const TObjArray * GetSlotList (Bool_t ForceUpdate=kFALSE)
 Return pointer in TObjArray with list of all slots in list.
 
Bool_t IsEmptySlots ()
 Return kTRUE, if there are empty slots in list.
 
TGo4FitSlotIsObjectInSlots (TObject *obj)
 Checks, if object assign to one of slots.
 
Int_t NumSlots ()
 Returns number of slots in list.
 
TGo4FitSlotSetObject (const char *PlaceName, TObject *obj, Bool_t iOwned=kFALSE)
 Set object to first suitable slot, which have PlaceName name or owner of which has PlaceName full name with defined ownership flag.
 
TGo4FitSlotSetObject (TObject *obj, Bool_t iOwned=kFALSE)
 Set object to first suitable slot with defined ownership flag.
 
void SetSaveFlagForObjects (Int_t iSaveFlag, const char *PlaceName=nullptr)
 Set save flag for object(s), assigned to fitter.
 
void SetUpdateSlotList ()
 Update internal list of slots (if exists).
 

Protected Member Functions

Bool_t BuffersAllocated () const
 Checks, if buffers allocated for data.
 
virtual void Finalize ()
 Removes all buffers, created in initialize() routine.
 
Double_t * GetBinsDevs () const
 Returns pointer on buffer with standard deviations for each data bins.
 
Double_t * GetBinsResult () const
 Returns pointer on buffer with complete model of data bins.
 
Int_t GetBinsSize () const
 Return number of data bins in buffers.
 
Double_t * GetBinsValues () const
 Returns pointer on buffer with data bins values.
 
const Int_t * GetFullIndex (Int_t nbin) const
 Return indexes values for specified data bin from buffer.
 
Int_t GetIndexesSize () const
 Returns dimension of indexes arrays.
 
Int_t GetScalesSize () const
 Returns number of axis values for each point.
 
const Double_t * GetScaleValues (Int_t nbin) const
 Return scale values for specified index from buffer.
 
const Double_t * GetWidthValues (Int_t nbin) const
 Return scales width values for specified index from buffer.
 
virtual Bool_t Initialize (Int_t UseBuffers=-1)
 Initialize data object.
 
- Protected Member Functions inherited from TGo4FitComponent
Int_t GetAmplIndex () const
 Returns index of amplitude parameter.
 
TGo4FitParameterNewAmplitude (const char *Name=nullptr, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
 Create amplitude parameter with specified properties.
 
TGo4FitParameterNewParameter (const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
 Create new parameter with provided properties and add to parameters list.
 
void SetAmplIndex (Int_t iAmplIndex=-1)
 Set index of amplitude parameter.
 
- Protected Member Functions inherited from TGo4FitParsList
TGo4FitParameterAddPar (TGo4FitParameter *par)
 
void ClearParsBlocking ()
 
TGo4FitParameterFind (const char *OwnerFullName, const char *ParName)
 
TGo4FitParameterFind (const char *ParName)
 
TGo4FitParameterFind (TGo4FitParameter *par)
 
virtual TGo4FitParameterGet (Int_t n)
 
TGo4FitParameterInsertPar (TGo4FitParameter *par, Int_t indx)
 
Bool_t RemoveParByIndex (Int_t indx)
 
void SetParsOwner (TGo4FitNamed *iOwner)
 
- Protected Member Functions inherited from TGo4FitSlotList
void CheckDuplicatesOnSlot ()
 Resolve situation, when same object assigned to several slots with ownership flag.
 
 ClassDef (TGo4FitSlotList, 1)
 
void PrepareSlotsForWriting ()
 

Protected Attributes

Bool_t fbUseBinScale {kFALSE}
 Use binary numbers as scale values.
 
Double_t fdExcludeLessThen {0}
 Sets limit for exclude bins, which less then this limit.
 
Double_t fdSigmaValue {0}
 Value of sigma when fiTakeSigmasFrom = 2.
 
Int_t fiDataType {0}
 Specified type of data: 0 - Histogram, 1 - graphics, 2 and so on - user defined.
 
Int_t fiTakeSigmasFrom {0}
 Specify sigma source.
 
TObjArray fxAxisTrans
 Array of slots for scale transformation objects.
 
- Protected Attributes inherited from TGo4FitSlotList
Bool_t fbUpdateSlotList {kFALSE}
 
TObjArray * fxSlotList {nullptr}
 

Private Member Functions

void ReleaseAllPointers ()
 Release all memory, allocated for buffers.
 
void ResetAllPoinetrs ()
 Clears (sets to 0) all pointers, used for buffer allocations.
 

Private Attributes

Int_t fiBinsSize {0}
 Number of entries in buffers.
 
Int_t fiIndexesSize {0}
 Number of indexes for each point.
 
Int_t fiScalesSize {0}
 Number of scales values for each point.
 
Double_t * fxBinsResult {nullptr}
 Buffer for complete model of bins values.
 
Int_t * fxFullIndex {nullptr}
 Store combination of indexes for each data bins.
 
Double_t * fxFullScale {nullptr}
 Array of axis values for each bins.
 
Double_t * fxFullWidth {nullptr}
 Array of width values for each bin.
 
Double_t * fxStandDev {nullptr}
 Buffer for standard deviations of bins values.
 
Double_t * fxValues {nullptr}
 Buffer for bins values.
 

Friends

class TGo4FitModel
 
class TGo4Fitter
 

Detailed Description

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

Definition at line 39 of file TGo4FitData.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
dtHistogram 
dtGraph 

Definition at line 41 of file TGo4FitData.h.

Constructor & Destructor Documentation

◆ TGo4FitData() [1/2]

◆ TGo4FitData() [2/2]

TGo4FitData::TGo4FitData ( const char * iName,
const char * iTitle,
Int_t iDataType = dtHistogram,
Bool_t AddAmpl = kFALSE )

Creates TGo4FitData object with given name and title.

Type of data (histogram 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.

Definition at line 35 of file TGo4FitData.cxx.

References TGo4FitComponent::TGo4FitComponent(), fbUseBinScale, fdExcludeLessThen, fdSigmaValue, fiDataType, fiTakeSigmasFrom, fxAxisTrans, TGo4FitComponent::NewAmplitude(), and ResetAllPoinetrs().

◆ ~TGo4FitData()

TGo4FitData::~TGo4FitData ( )
virtual

Destroys TGo4FitData object.

Definition at line 48 of file TGo4FitData.cxx.

References ReleaseAllPointers().

Member Function Documentation

◆ AddAxisTrans()

void TGo4FitData::AddAxisTrans ( TGo4FitAxisTrans * Trans,
Bool_t TransOwned = kFALSE )

Add transformation object to data.

First new slot reserved for this object.

Definition at line 96 of file TGo4FitData.cxx.

References fxAxisTrans, GetNumberOfTransSlots(), and SetNumberOfTransSlots().

Referenced by Example6().

◆ ApplyRangesForModelMask()

void TGo4FitData::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.

Definition at line 311 of file TGo4FitData.cxx.

References TGo4FitComponent::TGo4FitComponent(), BuffersAllocated(), TGo4FitComponent::CheckRangeConditions(), GetBinsSize(), GetScalesSize(), GetScaleValues(), and MakeIter().

Referenced by TGo4FitModel::Initialize().

◆ BuffersAllocated()

Bool_t TGo4FitData::BuffersAllocated ( ) const
inlineprotected

◆ CanAmplTouch()

Bool_t TGo4FitData::CanAmplTouch ( )
inlineoverridevirtual

Always return kTRUE.

This specify that any data object may has or has not amplitude. Amplitude parameter (if exist) will be used to scale bins values.

Reimplemented from TGo4FitComponent.

Definition at line 81 of file TGo4FitData.h.

◆ CreateDrawObject()

TObject * TGo4FitData::CreateDrawObject ( const char * ObjName)

Creates object, which can be drawn on canvas by ROOT.

This method creates either TH1 (in case of histogram data) or TGraph object and fills bins by content of data.

Definition at line 121 of file TGo4FitData.cxx.

References MakeIter().

◆ DefineBinsSize()

Int_t TGo4FitData::DefineBinsSize ( )

Defines number of selected bins in data Creates iterator and sequentially checks all points.

Definition at line 267 of file TGo4FitData.cxx.

References MakeIter().

Referenced by TGo4Fitter::CalculateNDF().

◆ DefineDimensions()

Int_t TGo4FitData::DefineDimensions ( )

Define dimension number of data Create iterator and checks number of dimension.

Definition at line 256 of file TGo4FitData.cxx.

References MakeIter().

Referenced by TGo4FitPanel::Button_SimpleFit(), TGo4FitPanel::CreateModel(), and TGo4FitPanel::LocateModel().

◆ DefineScaleMinMax()

Bool_t TGo4FitData::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.

Definition at line 234 of file TGo4FitData.cxx.

References MakeIter().

Referenced by TGo4FitPanel::Cmd_AddRangeCondition().

◆ FillSlotList()

void TGo4FitData::FillSlotList ( TSeqCollection * list)
overridevirtual

◆ Finalize()

void TGo4FitData::Finalize ( )
protectedvirtual

Removes all buffers, created in initialize() routine.

Definition at line 190 of file TGo4FitData.cxx.

References ReleaseAllPointers().

Referenced by TGo4Fitter::FinalizeFitterData().

◆ GetAxisTrans()

TGo4FitAxisTrans * TGo4FitData::GetAxisTrans ( Int_t nslot) const

Return transformation object for given slot.

Definition at line 81 of file TGo4FitData.cxx.

References GetAxisTransSlot(), and TGo4FitSlot::GetObject().

Referenced by Initialize(), IsAnyDataTransform(), and TGo4FitDataIter::TransformScales().

◆ GetAxisTransSlot()

TGo4FitSlot * TGo4FitData::GetAxisTransSlot ( Int_t nslot) const

Return slot for transformation object.

Definition at line 76 of file TGo4FitData.cxx.

References fxAxisTrans.

Referenced by GetAxisTrans().

◆ GetBinsDevs()

Double_t * TGo4FitData::GetBinsDevs ( ) const
inlineprotected

Returns pointer on buffer with standard deviations for each data bins.

Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

Definition at line 272 of file TGo4FitData.h.

References fxStandDev.

Referenced by TGo4Fitter::CalculateFCN(), and TGo4Fitter::GetDataBinsDevs().

◆ GetBinsResult()

Double_t * TGo4FitData::GetBinsResult ( ) const
inlineprotected

Returns pointer on buffer with complete model of data bins.

Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

Definition at line 278 of file TGo4FitData.h.

References fxBinsResult.

Referenced by TGo4FitModel::AddModelToDataResult(), TGo4Fitter::CalculateFCN(), TGo4Fitter::GetDataBinsResult(), and TGo4Fitter::RebuildAll().

◆ GetBinsSize()

Int_t TGo4FitData::GetBinsSize ( ) const
inlineprotected

◆ GetBinsValues()

Double_t * TGo4FitData::GetBinsValues ( ) const
inlineprotected

Returns pointer on buffer with data bins values.

Buffer has GetBinsSize() values. Return 0, if buffers were not allocated.

Definition at line 266 of file TGo4FitData.h.

References fxValues.

Referenced by TGo4Fitter::CalculateFCN(), and TGo4Fitter::GetDataBinsValues().

◆ GetDataType()

Int_t TGo4FitData::GetDataType ( ) const
inline

Returns type of data source.

0 - histogram, 1 - points (scale values have no width)

Definition at line 64 of file TGo4FitData.h.

References fiDataType.

Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4FitDataIter::ProduceScales(), and TGo4FitDataRidgeIter::StartReset().

◆ GetExcludeLessThen()

Double_t TGo4FitData::GetExcludeLessThen ( ) const
inline

Returns limit, which uses to exclude bins, less then this limit.

Definition at line 123 of file TGo4FitData.h.

References fdExcludeLessThen.

Referenced by TGo4FitDataIter::CheckPointForRange(), IsAnyDataTransform(), and Print().

◆ GetFullIndex()

const Int_t * TGo4FitData::GetFullIndex ( Int_t nbin) const
protected

Return indexes values for specified data bin from buffer.

Can be used only if buffers were allocated, otherwise return nullptr. nbin should be from 0 to GetBinsSize()-1

Definition at line 289 of file TGo4FitData.cxx.

References fxFullIndex, and GetIndexesSize().

Referenced by TGo4FitModel::GetDataFullIndex().

◆ GetIndexesSize()

Int_t TGo4FitData::GetIndexesSize ( ) const
inlineprotected

Returns dimension of indexes arrays.

Can be used after Initialize() method, otherwise TGo4FitDataIter::IndexesSize() method should be used.

Definition at line 302 of file TGo4FitData.h.

References fiIndexesSize.

Referenced by TGo4FitModel::GetDataIndexesSize(), GetFullIndex(), and IsCompatibleData().

◆ GetNumberOfTransSlots()

Int_t TGo4FitData::GetNumberOfTransSlots ( ) const
inline

Return number of slots for scale transformation objects.

Definition at line 137 of file TGo4FitData.h.

References fxAxisTrans.

Referenced by AddAxisTrans(), Initialize(), IsAnyDataTransform(), TGo4FitDataIter::ProduceScales(), SetAxisTrans(), SetAxisTransNeeded(), SetNumberOfTransSlots(), and TGo4FitDataIter::TransformScales().

◆ GetScalesSize()

Int_t TGo4FitData::GetScalesSize ( ) const
inlineprotected

Returns number of axis values for each point.

Can be used after Initialize() method, otherwise TGo4FitDataIter::ScalesSize() method should be used.

Definition at line 260 of file TGo4FitData.h.

References fiScalesSize.

Referenced by TGo4FitModel::AddModelToDataResult(), ApplyRangesForModelMask(), TGo4FitModel::EvaluateAtPoint(), GetScaleValues(), GetWidthValues(), and TGo4FitModel::RebuildShape().

◆ GetScaleValues()

const Double_t * TGo4FitData::GetScaleValues ( Int_t nbin) const
protected

Return scale values for specified index from buffer.

Can be used only if buffers were allocated, otherwise return nullptr. nbin should be from 0 to GetBinsSize()-1

Definition at line 274 of file TGo4FitData.cxx.

References fxFullScale, and GetScalesSize().

Referenced by ApplyRangesForModelMask(), and TGo4FitModel::EvaluateAtPoint().

◆ GetSigmaSource()

Int_t TGo4FitData::GetSigmaSource ( ) const
inline

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() function.

Definition at line 90 of file TGo4FitData.h.

References fiTakeSigmasFrom.

Referenced by TGo4FitDataIter::GetDeviation(), and Print().

◆ GetSigmaValue()

Double_t TGo4FitData::GetSigmaValue ( ) const
inline

Return constant sigma value.

Uses, when GetSigmaSource() returns 2.

Definition at line 96 of file TGo4FitData.h.

References fdSigmaValue.

Referenced by TGo4FitDataIter::GetDeviation(), and Print().

◆ GetUseBinScale()

Bool_t TGo4FitData::GetUseBinScale ( ) const
inline

Returns kTRUE, if binary numbers used as scale values.

Definition at line 69 of file TGo4FitData.h.

References fbUseBinScale.

Referenced by IsAnyDataTransform(), TGo4FitDataIter::ProduceScales(), and TGo4FitDataIter::ReserveArrays().

◆ GetWidthValues()

const Double_t * TGo4FitData::GetWidthValues ( Int_t nbin) const
protected

Return scales width values for specified index from buffer.

Can be used only if buffers were allocated, otherwise return nullptr. nbin should be from 0 to GetBinsSize()-1

Definition at line 282 of file TGo4FitData.cxx.

References fxFullWidth, and GetScalesSize().

Referenced by TGo4FitModel::EvaluateAtPoint().

◆ Initialize()

Bool_t TGo4FitData::Initialize ( Int_t UseBuffers = -1)
protectedvirtual

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. Consuming more memory may dramatically decrease time for fitting.

Definition at line 130 of file TGo4FitData.cxx.

References fiBinsSize, fiIndexesSize, fiScalesSize, fxBinsResult, fxFullIndex, fxFullScale, fxFullWidth, fxStandDev, fxValues, GetAxisTrans(), GetNumberOfTransSlots(), TGo4FitComponent::GetUseBuffers(), TGo4FitParsList::IsAllParsFixed(), and MakeIter().

Referenced by TGo4Fitter::InitFitterData().

◆ IsAnyDataTransform()

Bool_t TGo4FitData::IsAnyDataTransform ( ) const
virtual

Return kTRUE, if either initial data axis or data bins are transformed by TGo4FitData object.

For instance, if SetUseBinScales() is used.

Definition at line 111 of file TGo4FitData.cxx.

References GetAxisTrans(), GetExcludeLessThen(), GetNumberOfTransSlots(), and GetUseBinScale().

Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4FitPanel::PaintModelsFor(), and TGo4FitPanel::UpdateWizPaint().

◆ IsCompatibleData()

Bool_t TGo4FitData::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.

Definition at line 296 of file TGo4FitData.cxx.

References TGo4FitData(), GetIndexesSize(), and MakeIter().

◆ MakeIter()

◆ Print()

void TGo4FitData::Print ( Option_t * option = "") const
override

◆ ReleaseAllPointers()

void TGo4FitData::ReleaseAllPointers ( )
private

Release all memory, allocated for buffers.

Definition at line 211 of file TGo4FitData.cxx.

References fxBinsResult, fxFullIndex, fxFullScale, fxFullWidth, fxStandDev, fxValues, and ResetAllPoinetrs().

Referenced by ~TGo4FitData(), and Finalize().

◆ ResetAllPoinetrs()

void TGo4FitData::ResetAllPoinetrs ( )
private

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

Definition at line 195 of file TGo4FitData.cxx.

References fiBinsSize, fiIndexesSize, fiScalesSize, fxBinsResult, fxFullIndex, fxFullScale, fxFullWidth, fxStandDev, and fxValues.

Referenced by TGo4FitData(), TGo4FitData(), and ReleaseAllPointers().

◆ SetAxisTrans()

void TGo4FitData::SetAxisTrans ( Int_t nslot,
TGo4FitAxisTrans * Trans,
Bool_t TransOwned = kFALSE )

Sets transformation object for given slot.

If not enough slots was reserved, SetNumberOfTransSlots(nslot+1) will be called first.

Definition at line 87 of file TGo4FitData.cxx.

References fxAxisTrans, GetNumberOfTransSlots(), and SetNumberOfTransSlots().

◆ SetAxisTransNeeded()

void TGo4FitData::SetAxisTransNeeded ( Int_t nslot,
Bool_t iNeeded = kFALSE )

Specified, when iNeeded = kTRUE, that transformation object should always be provided to data.

Definition at line 103 of file TGo4FitData.cxx.

References fxAxisTrans, GetNumberOfTransSlots(), and SetNumberOfTransSlots().

◆ SetExcludeLessThen()

void TGo4FitData::SetExcludeLessThen ( Double_t limit = 0.)
inline

Sets limit to exclude bins, which not less then this limit.

Definition at line 118 of file TGo4FitData.h.

References fdExcludeLessThen.

Referenced by TGo4FitDataGraph::TGo4FitDataGraph(), TGo4FitDataProfile::TGo4FitDataProfile(), TGo4FitDataRidge::TGo4FitDataRidge(), QFitDataWidget::BinsLimitEdt_textChanged(), and Example13().

◆ SetNumberOfTransSlots()

Bool_t TGo4FitData::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 for such objects can be reserved first.

Definition at line 53 of file TGo4FitData.cxx.

References fxAxisTrans, GetNumberOfTransSlots(), and TGo4FitSlotList::SetUpdateSlotList().

Referenced by AddAxisTrans(), BuildFitter(), SetAxisTrans(), and SetAxisTransNeeded().

◆ SetSigmaSource()

void TGo4FitData::SetSigmaSource ( Int_t TakeFrom,
Double_t SigmaValue = 1. )
inline

Sets source of sigma for data.

For description see GetSigmaSource() function.

Definition at line 102 of file TGo4FitData.h.

References fdSigmaValue, and fiTakeSigmasFrom.

Referenced by QFitDataWidget::SigmaCmb_activated().

◆ SetSigmaValue()

void TGo4FitData::SetSigmaValue ( Double_t SigmaValue)
inline

Set constant sigma value.

Value will be used, if GetSigmaSource()==2.

Definition at line 113 of file TGo4FitData.h.

References fdSigmaValue.

Referenced by QFitDataWidget::SigmaEdt_textChanged().

◆ SetUseBinScale()

void TGo4FitData::SetUseBinScale ( Bool_t iUseBinScale)
inline

If kTRUE, binary numbers will be used as scale values.

Definition at line 74 of file TGo4FitData.h.

References fbUseBinScale.

Referenced by BuildFitter(), and QFitDataWidget::UseBinsChk_toggled().

Friends And Related Symbol Documentation

◆ TGo4FitModel

friend class TGo4FitModel
friend

Definition at line 229 of file TGo4FitData.h.

References TGo4FitModel.

Referenced by TGo4FitModel.

◆ TGo4Fitter

friend class TGo4Fitter
friend

Definition at line 230 of file TGo4FitData.h.

References TGo4Fitter.

Referenced by TGo4Fitter.

Field Documentation

◆ fbUseBinScale

Bool_t TGo4FitData::fbUseBinScale {kFALSE}
protected

Use binary numbers as scale values.

if this flag set, bin numbers are used as scale values

Definition at line 314 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), GetUseBinScale(), Print(), and SetUseBinScale().

◆ fdExcludeLessThen

Double_t TGo4FitData::fdExcludeLessThen {0}
protected

Sets limit for exclude bins, which less then this limit.

Definition at line 330 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), GetExcludeLessThen(), and SetExcludeLessThen().

◆ fdSigmaValue

Double_t TGo4FitData::fdSigmaValue {0}
protected

Value of sigma when fiTakeSigmasFrom = 2.

Definition at line 325 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), GetSigmaValue(), SetSigmaSource(), and SetSigmaValue().

◆ fiBinsSize

Int_t TGo4FitData::fiBinsSize {0}
private

Number of entries in buffers.

Definition at line 352 of file TGo4FitData.h.

Referenced by GetBinsSize(), Initialize(), and ResetAllPoinetrs().

◆ fiDataType

Int_t TGo4FitData::fiDataType {0}
protected

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

Definition at line 308 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), GetDataType(), and Print().

◆ fiIndexesSize

Int_t TGo4FitData::fiIndexesSize {0}
private

Number of indexes for each point.

Definition at line 357 of file TGo4FitData.h.

Referenced by GetIndexesSize(), Initialize(), and ResetAllPoinetrs().

◆ fiScalesSize

Int_t TGo4FitData::fiScalesSize {0}
private

Number of scales values for each point.

Definition at line 362 of file TGo4FitData.h.

Referenced by GetScalesSize(), Initialize(), and ResetAllPoinetrs().

◆ fiTakeSigmasFrom

Int_t TGo4FitData::fiTakeSigmasFrom {0}
protected

Specify sigma source.

0 - no sigmas, 1 - try take from data, 2 - constant value (fdSigmaValue)

Definition at line 320 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), GetSigmaSource(), and SetSigmaSource().

◆ fxAxisTrans

TObjArray TGo4FitData::fxAxisTrans
protected

Array of slots for scale transformation objects.

Definition at line 335 of file TGo4FitData.h.

Referenced by TGo4FitData(), TGo4FitData(), AddAxisTrans(), FillSlotList(), GetAxisTransSlot(), GetNumberOfTransSlots(), Print(), SetAxisTrans(), SetAxisTransNeeded(), and SetNumberOfTransSlots().

◆ fxBinsResult

Double_t* TGo4FitData::fxBinsResult {nullptr}
private

Buffer for complete model of bins values.

Definition at line 377 of file TGo4FitData.h.

Referenced by GetBinsResult(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().

◆ fxFullIndex

Int_t* TGo4FitData::fxFullIndex {nullptr}
private

Store combination of indexes for each data bins.

Size of [GetBinsSize()][NumDimension()]. Used in case of maximum memory usage.

Definition at line 398 of file TGo4FitData.h.

Referenced by GetFullIndex(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().

◆ fxFullScale

Double_t* TGo4FitData::fxFullScale {nullptr}
private

Array of axis values for each bins.

Used in case of maximum memory usage. Size [BinsSize * AxisNumber]

Definition at line 384 of file TGo4FitData.h.

Referenced by BuffersAllocated(), GetScaleValues(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().

◆ fxFullWidth

Double_t* TGo4FitData::fxFullWidth {nullptr}
private

Array of width values for each bin.

Used in case of maximum memory usage. Size [BinsSize * AxisNumber]

Definition at line 391 of file TGo4FitData.h.

Referenced by GetWidthValues(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().

◆ fxStandDev

Double_t* TGo4FitData::fxStandDev {nullptr}
private

Buffer for standard deviations of bins values.

Definition at line 372 of file TGo4FitData.h.

Referenced by GetBinsDevs(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().

◆ fxValues

Double_t* TGo4FitData::fxValues {nullptr}
private

Buffer for bins values.

Definition at line 367 of file TGo4FitData.h.

Referenced by BuffersAllocated(), GetBinsValues(), Initialize(), ReleaseAllPointers(), and ResetAllPoinetrs().


The documentation for this class was generated from the following files: