Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4FitModel Class Reference

Basic abstract class for represnting model components of fitted data. More...

#include <TGo4FitModel.h>

Inheritance diagram for TGo4FitModel:

TGo4FitComponent TGo4FitParsList TGo4FitSlotList TGo4FitNamed TGo4FitModelFormula TGo4FitModelFromData TGo4FitModelFunction TGo4FitModelGauss1 TGo4FitModelGauss2 TGo4FitModelGaussN TGo4FitModelPolynom TModelTemplate List of all members.

Public Methods

 TGo4FitModel ()
 Default constructor. More...

 TGo4FitModel (const char *iName, const char *iTitle, Bool_t MakeAmplitude=kFALSE)
 Creates TGo4FitModel object with given name. More...

virtual ~TGo4FitModel ()
 Delete TGo4FitModel object. More...

void SetGroupIndex (Int_t index=-1)
 Set group index of model. More...

void SetBackgroundGroupIndex ()
 Set group index to background (index=0). More...

Int_t GetGroupIndex () const
 Returns group index of model. More...

Int_t NumAssigments () const
 Returns number of assignment for this model. More...

const char * AssignmentName (Int_t n)
 Returns name of data, to which model object is assigned. More...

void AssignToData (const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE)
 Assign model to specified data object. More...

Bool_t IsAssignTo (const char *DataName) const
 Checks, if model assigned to given data. More...

void ChangeDataNameInAssignments (const char *oldname, const char *newname)
 Change name of data in assignments. More...

void ClearAssignmentTo (const char *DataName)
 Remove assignment to given data (if exists). More...

void ClearAssigmentTo (const char *DataName)
void ClearAssignments ()
 Remove all assignments. More...

void ConnectToDataIfAssigned (TGo4FitData *data)
 Check, if model assigned to such a data (via name) and store pointer on this data object. More...

Double_t GetRatioValueFor (const char *DataName)
 Returns ratio value for specified data object. More...

virtual void Print (Option_t *option) const
 Print information about model object on standard output. More...

virtual Double_t Evaluate (Double_t x)
 Calculates value of model for given x value. More...

virtual Double_t Evaluate (Double_t x, Double_t y)
 Calculates value of model for given x,y values. More...

virtual Double_t Evaluate (Double_t x, Double_t y, Double_t z)
 Calculates value of model for given x,y,z values. More...

virtual Double_t Evaluate (Double_t *v, Int_t ndim)
 Calculates value of model for given axis values. More...

virtual Double_t Integral ()
 Calculates intagral of model component. More...

virtual Bool_t GetPosition (Int_t naxis, Double_t &pos)
 Return position of model, if exists. More...

virtual Bool_t SetPosition (Int_t naxis, Double_t pos)
 Sets position of model component, if possible. More...

virtual Bool_t GetWidth (Int_t naxis, Double_t &width)
 Returns with of model component, if exists. More...

virtual Bool_t SetWidth (Int_t naxis, Double_t width)
 Sets width of model component, if possible. More...

void SetIntegrationsProperty (Int_t iMinIntegrDepth, Int_t iMaxIntegrDepth=0, Double_t iIntegrEps=0., Bool_t iAbsoluteEps=kFALSE, Bool_t iIntegrScaling=kFALSE)
 Set integration properties. More...

Bool_t NeedIntegration ()
 Returns kTRUE, if integration properties were specified. More...

virtual Bool_t BeforeEval (Int_t ndim)
 Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function. More...

virtual Double_t EvalN (const Double_t *v)
 Calculates value of model according current parameters values and provided axes values. More...

virtual void AfterEval ()
 Clear buffers, which were created by BeforeEval() method. More...

virtual Double_t EvaluateAtPoint (TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE)
 Evaluate model value for specified data point. More...

virtual Double_t EvaluateAtPoint (TGo4FitDataIter *iter, Bool_t UseRanges=kTRUE)
 Evaluate model value for point, specified by current values of iterator. More...

Bool_t AddModelToDataResult (TGo4FitData *data)
 Evaluate model values for all data point and add them to result buffer. More...

virtual Int_t NumPars ()
 Return number of parameters in list. More...


Protected Methods

virtual TGo4FitParameterGet (Int_t n)
Double_t EvaluateAndIntegrate (Int_t NumScales, const Double_t *Scales, const Double_t *Widths)
 Make integration of model inside given point, if integration specified. More...

virtual Bool_t Initialize (Int_t UseBuffers=-1)
 Initialize model object. More...

virtual void Finalize ()
 Deletes all buffers, created during initialization. More...

TGo4FitDataGetAssignedConnection (Int_t n)
 Return pointer on assigned data. More...

Bool_t BuffersAllocated () const
 Checks if model allocate buffers for calculations. More...

void RebuildShape (Bool_t ForceBuild=kFALSE)
 Recalculates shape of object. More...

Double_t * GetModelBins (const char *DataName) const
 Get model bins for specified data (if exists). More...

void SetNeedToRebuild ()
 Sets flag, that shape bins should be refilled next time, when RebuildShape() routine will be called. More...

virtual Double_t UserFunction (Double_t *, Double_t *)
 Another place, where user specific code can be placed for model values calculation. More...

virtual Int_t GetPosParIndex (Int_t)
 Return index of parameter (if exist), which represent position of model for given axis. More...

virtual Int_t GetWidthParIndex (Int_t)
 Return index of parameter (if exist), which represent width of model component for given axis. More...

virtual TGo4FitParameterGetPosPar (Int_t naxis=0)
 Return parameter (if exist), which represent position of model for given axis. More...

virtual TGo4FitParameterGetWidthPar (Int_t naxis=0)
 Return parameter (if exist), which represent width of model component for given axis. More...

const Int_t * GetDataFullIndex (TGo4FitData *data, Int_t nbin)
Int_t GetDataIndexesSize (TGo4FitData *data)

Protected Attributes

Int_t fiMinIntegrDepth
 Minimum depth of integration. More...

Int_t fiMaxIntegrDepth
 Maximum intergration depth. More...

Double_t fdIntegrEps
 Integration precision. More...

Bool_t fbAbsoluteEps
 States, if integration precision absolute or relative. More...

Bool_t fbIntegrScaling
 Scale integral to integration volume. More...


Private Methods

void RemoveAllPars ()
 Clear all buffers, allocated during initialization. More...

TGo4FitAssignmentGetAssigment (Int_t n)
 Return TGo4FitAssignment object with given index. More...

TGo4FitAssignmentGetAssigment (Int_t n) const
TGo4FitAssignmentFindAssigment (const char *DataName) const
 Find assignment to given data. More...

TString GetRatioName (Int_t n)
 Set name of ratio parameter. More...


Private Attributes

TObjArray fxAssigments
 List of TGo4FitAssignment objects. More...

Int_t fiGroupIndex
 Store group index of specified model. More...

TArrayD fxCurrentPars
 Array of values of parameters. More...

Double_t * fxCurrentParsArray
 Pointer on array of parameters values. More...

Bool_t fbNeedToRebuild
 Internal flag. More...

TGo4FitParsListfxAllPars
 List of all parameters, associated not only with component directly but also with incapsulated objects. More...

TArrayD * fxAllParsValues

Friends

class TGo4Fitter

Detailed Description

Basic abstract class for represnting model components of fitted data.

Definition at line 82 of file TGo4FitModel.h.


Constructor & Destructor Documentation

TGo4FitModel::TGo4FitModel  
 

Default constructor.

Definition at line 52 of file TGo4FitModel.cxx.

TGo4FitModel::TGo4FitModel const char *    iName,
const char *    iTitle,
Bool_t    MakeAmplitude = kFALSE
 

Creates TGo4FitModel object with given name.

Standard constrcutor. Add amplitude parameter, if specified. TGo4FitModel object should not be used directly. It is only basic class for concrete implementations like gaussians, polynoms and so on.

Definition at line 59 of file TGo4FitModel.cxx.

References fxAssigments, and TGo4FitComponent::NewAmplitude().

TGo4FitModel::~TGo4FitModel   [virtual]
 

Delete TGo4FitModel object.

Definition at line 69 of file TGo4FitModel.cxx.

References RemoveAllPars().


Member Function Documentation

void TGo4FitModel::SetGroupIndex Int_t    index = -1 [inline]
 

Set group index of model.

Models, having same group index, can be displayed together If index=-1, models are not belongs to any group index=0 reserved for "Background" group. All polynoms gets background group index. By default index = -1

Definition at line 110 of file TGo4FitModel.h.

References fiGroupIndex.

Referenced by TGo4Fitter::AddPolynoms(), and TGo4Fitter::AddPolynomX().

void TGo4FitModel::SetBackgroundGroupIndex   [inline]
 

Set group index to background (index=0).

Definition at line 115 of file TGo4FitModel.h.

References fiGroupIndex.

Referenced by TGo4FitModelPolynom::TGo4FitModelPolynom().

Int_t TGo4FitModel::GetGroupIndex   const [inline]
 

Returns group index of model.

Definition at line 120 of file TGo4FitModel.h.

References fiGroupIndex.

Referenced by TGo4FitPanelSlots::Button_FitterDraw(), and TGo4Fitter::CreateDrawObject().

Int_t TGo4FitModel::NumAssigments   const [inline]
 

Returns number of assignment for this model.

Definition at line 125 of file TGo4FitModel.h.

References fxAssigments.

Referenced by AssignToData(), BuffersAllocated(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), ClearAssignmentTo(), TGo4FitPanelSlots::Cmd_AddRangeCondition(), TGo4Fitter::CollectAllPars(), TGo4Fitter::DeleteModelsAssosiatedTo(), Finalize(), FindAssigment(), TGo4FitPanelSlots::FindSlotStatusForModel(), Get(), TGo4FitModelFromData::Initialize(), Initialize(), TGo4FitPanelSlots::LocateModel(), NumPars(), RebuildShape(), TGo4FitPanelSlots::ShowItemAsGraph(), TGo4FitPanelSlots::UpdateItem(), and TGo4FitPanelSlots::Wiz_PaintModel().

const char* TGo4FitModel::AssignmentName Int_t    n [inline]
 

Returns name of data, to which model object is assigned.

Definition at line 130 of file TGo4FitModel.h.

References GetAssigment(), and n.

Referenced by TGo4Fitter::CalculatesModelIntegral(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4FitPanelSlots::Cmd_AddRangeCondition(), TGo4Fitter::CollectAllPars(), TGo4FitPanelSlots::FindSlotStatusForModel(), TGo4FitPanelSlots::LocateModel(), TGo4FitPanelSlots::SetItemText(), TGo4FitPanelSlots::ShowItemAsGraph(), and TGo4FitPanelSlots::Wiz_PaintModel().

void TGo4FitModel::AssignToData const char *    DataName,
Double_t    RatioValue = 1.,
Bool_t    FixRatio = kFALSE
 

Assign model to specified data object.

When model assigns to more then one data, additional "Ratio1", "Ratio2" and so on parameters will be created. They means ratio in amplitude of model component in this data to ampltute of this component in data, to wich model was assigned first. By default, this ratio is 1. and not fixed.

Definition at line 86 of file TGo4FitModel.cxx.

References FindAssigment(), fxAssigments, TGo4FitAssignment::fxRatio, GetRatioName(), NumAssigments(), TGo4FitParameter::SetFixed(), and TGo4FitNamed::SetOwner().

Referenced by TGo4Fitter::AddModel(), TGo4Fitter::AssignModelTo(), BuildFitter(), TGo4FitPanelSlots::Cmd_AssignModelToAllData(), TGo4FitPanelSlots::Cmd_AssignModelToData(), and TGo4FitPanelSlots::CreateModel().

Bool_t TGo4FitModel::IsAssignTo const char *    DataName const [inline]
 

Checks, if model assigned to given data.

Definition at line 142 of file TGo4FitModel.h.

References FindAssigment().

Referenced by TGo4FitPanelSlots::Button_FitterDraw(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculateNDF(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), TGo4Fitter::DeleteModelsAssosiatedTo(), TGo4Fitter::Draw(), TGo4FitPanelSlots::FillPopupForItem(), TGo4Fitter::NumModelsAssosiatedTo(), TGo4FitPanelSlots::PaintModelsFor(), TGo4Fitter::RebuildAll(), TXXXCalibPar::UpdateFrom(), and TGo4FitPanelSlots::Wiz_GetModelInfo().

void TGo4FitModel::ChangeDataNameInAssignments const char *    oldname,
const char *    newname
 

Change name of data in assignments.

Definition at line 100 of file TGo4FitModel.cxx.

References FindAssigment().

Referenced by TGo4Fitter::ChangeDataNameInAssignments().

void TGo4FitModel::ClearAssignmentTo const char *    DataName
 

Remove assignment to given data (if exists).

Definition at line 105 of file TGo4FitModel.cxx.

References FindAssigment(), fxAssigments, TGo4FitAssignment::fxRatio, GetAssigment(), GetRatioName(), n, and NumAssigments().

Referenced by ClearAssigmentTo(), TGo4Fitter::ClearModelAssignmentTo(), TGo4FitPanelSlots::Cmd_ClearAssigment(), TGo4Fitter::DeleteModelsAssosiatedTo(), and TXXXCalibPar::TXXXCalibPar().

void TGo4FitModel::ClearAssigmentTo const char *    DataName [inline]
 

Definition at line 153 of file TGo4FitModel.h.

References ClearAssignmentTo().

void TGo4FitModel::ClearAssignments  
 

Remove all assignments.

Definition at line 124 of file TGo4FitModel.cxx.

References fxAssigments.

Referenced by TGo4Fitter::ClearModelAssignmentTo(), TGo4FitPanelSlots::Cmd_AssignModelToAllData(), and TGo4FitPanelSlots::Cmd_ClearAssigments().

void TGo4FitModel::ConnectToDataIfAssigned TGo4FitData   data
 

Check, if model assigned to such a data (via name) and store pointer on this data object.

Definition at line 129 of file TGo4FitModel.cxx.

References FindAssigment(), and TGo4FitAssignment::fxData.

Referenced by TGo4Fitter::InitFitterData().

Double_t TGo4FitModel::GetRatioValueFor const char *    DataName
 

Returns ratio value for specified data object.

Return 1., if model not assign to data.

Definition at line 482 of file TGo4FitModel.cxx.

References FindAssigment(), and TGo4FitAssignment::RatioValue().

Referenced by AddModelToDataResult(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), and TGo4Fitter::CreateDrawObject().

void TGo4FitModel::Print Option_t *    option const [virtual]
 

Print information about model object on standard output.

Reimplemented from TGo4FitComponent.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFromData, TGo4FitModelFunction, TGo4FitModelGauss1, TGo4FitModelGauss2, TGo4FitModelGaussN, and TGo4FitModelPolynom.

Definition at line 487 of file TGo4FitModel.cxx.

References fdIntegrEps, fiMaxIntegrDepth, fiMinIntegrDepth, fxAssigments, and TGo4FitComponent::Print().

Referenced by TGo4FitModelPolynom::Print(), TGo4FitModelGaussN::Print(), TGo4FitModelGauss2::Print(), TGo4FitModelGauss1::Print(), TGo4FitModelFunction::Print(), TGo4FitModelFromData::Print(), and TGo4FitModelFormula::Print().

Double_t TGo4FitModel::Evaluate Double_t    x [virtual]
 

Calculates value of model for given x value.

Definition at line 419 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().

Double_t TGo4FitModel::Evaluate Double_t    x,
Double_t    y
[virtual]
 

Calculates value of model for given x,y values.

Definition at line 428 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().

Double_t TGo4FitModel::Evaluate Double_t    x,
Double_t    y,
Double_t    z
[virtual]
 

Calculates value of model for given x,y,z values.

Definition at line 438 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().

Double_t TGo4FitModel::Evaluate Double_t *    v,
Int_t    ndim
[virtual]
 

Calculates value of model for given axis values.

Definition at line 447 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().

Double_t TGo4FitModel::Integral   [virtual]
 

Calculates intagral of model component.

Reimplemented in TGo4FitModelGauss1.

Definition at line 456 of file TGo4FitModel.cxx.

Referenced by TGo4FitPanelSlots::Wiz_GetModelInfo().

Bool_t TGo4FitModel::GetPosition Int_t    naxis,
Double_t &    pos
[virtual]
 

Return position of model, if exists.

Definition at line 141 of file TGo4FitModel.cxx.

References GetPosPar(), and TGo4FitParameter::GetValue().

Referenced by TGo4FitPanelSlots::Button_FitterDraw(), TGo4FitGUIArrow::Locate(), TGo4FitPanelSlots::PaintModel(), and TGo4Fitter::PrintLines().

Bool_t TGo4FitModel::SetPosition Int_t    naxis,
Double_t    pos
[virtual]
 

Sets position of model component, if possible.

Definition at line 148 of file TGo4FitModel.cxx.

References GetPosPar(), and TGo4FitParameter::SetValue().

Referenced by Example8(), TGo4FitGUIArrow::ExecuteEvent(), and TGo4FitPanelSlots::LocateModel().

Bool_t TGo4FitModel::GetWidth Int_t    naxis,
Double_t &    width
[virtual]
 

Returns with of model component, if exists.

Definition at line 155 of file TGo4FitModel.cxx.

References TGo4FitParameter::GetValue(), and GetWidthPar().

Referenced by TGo4FitPanelSlots::Button_FitterDraw(), TGo4FitGUIArrow::ExecuteEvent(), TGo4FitGUIArrow::Locate(), TGo4FitPanelSlots::PaintModel(), and TGo4Fitter::PrintLines().

Bool_t TGo4FitModel::SetWidth Int_t    naxis,
Double_t    width
[virtual]
 

Sets width of model component, if possible.

Definition at line 162 of file TGo4FitModel.cxx.

References GetWidthPar(), and TGo4FitParameter::SetValue().

Referenced by Example8(), TGo4FitGUIArrow::ExecuteEvent(), and TGo4FitPanelSlots::LocateModel().

void TGo4FitModel::SetIntegrationsProperty Int_t    iMinIntegrDepth,
Int_t    iMaxIntegrDepth = 0,
Double_t    iIntegrEps = 0.,
Bool_t    iAbsoluteEps = kFALSE,
Bool_t    iIntegrScaling = kFALSE
 

Set integration properties.

This function make sence, if model assign to histogramic data. In this case each bins defined on some finite range. By default there is no integration and model uses central positions in each range, where data bins is defined. If model changes much in these ranges, it may cause big error in modeling. In this case integration inside each data bin ranges can highly reduce these errors. To make integration, bin range on each axis divides on (2^depth) segemnts and value of model calculates in each segments. Thus, if data bins defined on two-dimensional space and depth=3, each bins range were diveded on 8x8=64 squares and model will be calculated 64 times. MinIntegrDepth and MaxIntegrDepth means minimum and maximum allowed integration depth correspondently. If MaxIntegrDepth not specified, it will be equal to MinIntegrDepth. If MinIntegrDepth less then MaxIntegrDepth, model will try to use minimum value first. Then it checks, if result value changes not very much. If so, it finish calculation, otherwise it increases depth of integration up to MaxIntegrDepth. IntegrEps sets maximum allowed error in result value. It can be absolute (when AbsoluteEps = kTRUE) or relative to previous calculated value (with depth-1). Value of each bin also can be scaled on volume (IntegrScalink = kTRUE, default = kFALSE).

Definition at line 169 of file TGo4FitModel.cxx.

References fbAbsoluteEps, fbIntegrScaling, fdIntegrEps, fiMaxIntegrDepth, and fiMinIntegrDepth.

Referenced by Example9().

Bool_t TGo4FitModel::NeedIntegration   [inline]
 

Returns kTRUE, if integration properties were specified.

Definition at line 237 of file TGo4FitModel.h.

References fiMaxIntegrDepth, and fiMinIntegrDepth.

Bool_t TGo4FitModel::BeforeEval Int_t    ndim [virtual]
 

Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function.

Number of axis, which will be used in evaluations, should be specified.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFromData, TGo4FitModelFunction, TGo4FitModelGauss1, TGo4FitModelGauss2, TGo4FitModelGaussN, and TGo4FitModelPolynom.

Definition at line 407 of file TGo4FitModel.cxx.

References fxCurrentPars, fxCurrentParsArray, TGo4FitComponent::GetAmplPar(), TGo4FitParsList::GetParsValues(), and NumPars().

Referenced by AddModelToDataResult(), TGo4FitModelFunction::BeforeEval(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), Evaluate(), and RebuildShape().

Double_t TGo4FitModel::EvalN const Double_t *    v [virtual]
 

Calculates value of model according current parameters values and provided axes values.

BeforeEval(), EvalN() & AfterEval() virtual methods provides general interface, where user-specific code should be situated.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFromData, TGo4FitModelGauss1, TGo4FitModelGauss2, TGo4FitModelGaussN, and TGo4FitModelPolynom.

Definition at line 415 of file TGo4FitModel.cxx.

References fxCurrentParsArray, and UserFunction().

Referenced by Evaluate(), and EvaluateAndIntegrate().

virtual void TGo4FitModel::AfterEval   [inline, virtual]
 

Clear buffers, which were created by BeforeEval() method.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFromData, TGo4FitModelFunction, TGo4FitModelGaussN, and TGo4FitModelPolynom.

Definition at line 254 of file TGo4FitModel.h.

Referenced by AddModelToDataResult(), TGo4FitModelFunction::AfterEval(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), Evaluate(), and RebuildShape().

Double_t TGo4FitModel::EvaluateAtPoint TGo4FitData   data,
Int_t    nbin,
Bool_t    UseRanges = kTRUE
[virtual]
 

Evaluate model value for specified data point.

All scales values will be take from data buffers, therefore data should be initialized.

Reimplemented in TGo4FitModelFromData.

Definition at line 321 of file TGo4FitModel.cxx.

References TGo4FitComponent::CheckRangeConditions(), EvaluateAndIntegrate(), TGo4FitData::GetScalesSize(), TGo4FitData::GetScaleValues(), and TGo4FitData::GetWidthValues().

Referenced by AddModelToDataResult(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), and RebuildShape().

Double_t TGo4FitModel::EvaluateAtPoint TGo4FitDataIter   iter,
Bool_t    UseRanges = kTRUE
[virtual]
 

Evaluate model value for point, specified by current values of iterator.

Reimplemented in TGo4FitModelFromData.

Definition at line 329 of file TGo4FitModel.cxx.

References TGo4FitComponent::CheckRangeConditions(), EvaluateAndIntegrate(), TGo4FitDataIter::Scales(), TGo4FitDataIter::ScalesSize(), and TGo4FitDataIter::Widths().

Bool_t TGo4FitModel::AddModelToDataResult TGo4FitData   data
 

Evaluate model values for all data point and add them to result buffer.

Data should be initialized.

Definition at line 380 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), TGo4FitData::BuffersAllocated(), EvaluateAtPoint(), TGo4FitComponent::GetAmplValue(), TGo4FitData::GetBinsResult(), TGo4FitData::GetBinsSize(), GetModelBins(), GetRatioValueFor(), and TGo4FitData::GetScalesSize().

Referenced by TGo4Fitter::RebuildAll().

Int_t TGo4FitModel::NumPars   [virtual]
 

Return number of parameters in list.

Reimplemented from TGo4FitParsList.

Definition at line 73 of file TGo4FitModel.cxx.

References NumAssigments(), and TGo4FitParsList::NumPars().

Referenced by TGo4FitModelFormula::BeforeEval(), BeforeEval(), TGo4FitPanelSlots::Button_FitterDraw(), and TGo4FitModelFormula::CompileFormula().

TGo4FitParameter * TGo4FitModel::Get Int_t    n [protected, virtual]
 

Reimplemented from TGo4FitParsList.

Definition at line 79 of file TGo4FitModel.cxx.

References TGo4FitAssignment::fxRatio, TGo4FitParsList::Get(), GetAssigment(), n, NumAssigments(), and TGo4FitParsList::NumPars().

Referenced by GetPosPar(), and GetWidthPar().

Double_t TGo4FitModel::EvaluateAndIntegrate Int_t    NumScales,
const Double_t *    Scales,
const Double_t *    Widths
[protected]
 

Make integration of model inside given point, if integration specified.

Definition at line 240 of file TGo4FitModel.cxx.

References EvalN(), fbAbsoluteEps, fdIntegrEps, fiMaxIntegrDepth, fiMinIntegrDepth, and n.

Referenced by EvaluateAtPoint().

Bool_t TGo4FitModel::Initialize Int_t    UseBuffers = -1 [protected, virtual]
 

Initialize model object.

If usage of buffers is specified (UseBuffers>0), method creates a number of buffers for representing model bins for each data, to which model was assign to.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFromData, and TGo4FitModelFunction.

Definition at line 184 of file TGo4FitModel.cxx.

References TGo4FitData::ApplyRangesForModelMask(), TGo4FitData::BuffersAllocated(), TGo4FitComponent::CollectParsTo(), fxAllPars, fxAllParsValues, TGo4FitAssignment::fxData, TGo4FitAssignment::fxModelBins, TGo4FitAssignment::fxModelMask, GetAssigment(), TGo4FitData::GetBinsSize(), TGo4FitParsList::GetParsValues(), TGo4FitComponent::IsAnyRangeLimits(), n, NumAssigments(), TGo4FitParsList::NumPars(), RemoveAllPars(), SetNeedToRebuild(), and TGo4FitParsList::TGo4FitParsList().

Referenced by TGo4Fitter::InitFitterData(), TGo4FitModelFunction::Initialize(), TGo4FitModelFromData::Initialize(), and TGo4FitModelFormula::Initialize().

void TGo4FitModel::Finalize   [protected, virtual]
 

Deletes all buffers, created during initialization.

Reimplemented in TGo4FitModelFormula, and TGo4FitModelFunction.

Definition at line 218 of file TGo4FitModel.cxx.

References fxCurrentPars, TGo4FitAssignment::fxModelBins, TGo4FitAssignment::fxModelMask, GetAssigment(), n, NumAssigments(), and RemoveAllPars().

Referenced by TGo4FitModelFunction::Finalize(), TGo4FitModelFormula::Finalize(), and TGo4Fitter::FinalizeFitterData().

TGo4FitData * TGo4FitModel::GetAssignedConnection Int_t    n [protected]
 

Return pointer on assigned data.

Definition at line 135 of file TGo4FitModel.cxx.

References TGo4FitAssignment::fxData, GetAssigment(), and n.

Referenced by TGo4FitModelFromData::Initialize().

Bool_t TGo4FitModel::BuffersAllocated   const [protected]
 

Checks if model allocate buffers for calculations.

Definition at line 228 of file TGo4FitModel.cxx.

References TGo4FitAssignment::fxModelBins, GetAssigment(), n, and NumAssigments().

Referenced by TGo4Fitter::ModelBuffersAllocated().

void TGo4FitModel::RebuildShape Bool_t    ForceBuild = kFALSE [protected]
 

Recalculates shape of object.

Definition at line 337 of file TGo4FitModel.cxx.

References AfterEval(), BeforeEval(), EvaluateAtPoint(), fbNeedToRebuild, fxAllPars, fxAllParsValues, TGo4FitAssignment::fxData, TGo4FitAssignment::fxModelBins, TGo4FitAssignment::fxModelMask, TGo4FitComponent::GetAmplIndex(), GetAssigment(), TGo4FitData::GetBinsSize(), TGo4FitParsList::GetPar(), TGo4FitData::GetScalesSize(), TGo4FitParameter::GetValue(), n, NumAssigments(), TGo4FitParsList::NumPars(), and TGo4FitAssignment::RatioValue().

Referenced by TGo4Fitter::RebuildAll().

Double_t * TGo4FitModel::GetModelBins const char *    DataName const [protected]
 

Get model bins for specified data (if exists).

Definition at line 235 of file TGo4FitModel.cxx.

References FindAssigment(), and TGo4FitAssignment::fxModelBins.

Referenced by AddModelToDataResult(), and TGo4Fitter::GetModelBinsValues().

void TGo4FitModel::SetNeedToRebuild   [inline, protected]
 

Sets flag, that shape bins should be refilled next time, when RebuildShape() routine will be called.

Definition at line 322 of file TGo4FitModel.h.

References fbNeedToRebuild.

Referenced by Initialize().

virtual Double_t TGo4FitModel::UserFunction Double_t *   ,
Double_t *   
[inline, protected, virtual]
 

Another place, where user specific code can be placed for model values calculation.

Function gets as parameter array of Coordinates and array of Parameters values. Only user-specific calculation should be done and result value should be return.

Reimplemented in TGo4FitModelFunction, and TModelTemplate.

Definition at line 329 of file TGo4FitModel.h.

Referenced by EvalN().

virtual Int_t TGo4FitModel::GetPosParIndex Int_t    [inline, protected, virtual]
 

Return index of parameter (if exist), which represent position of model for given axis.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFunction, TGo4FitModelGauss1, TGo4FitModelGauss2, and TGo4FitModelGaussN.

Definition at line 334 of file TGo4FitModel.h.

Referenced by GetPosPar().

virtual Int_t TGo4FitModel::GetWidthParIndex Int_t    [inline, protected, virtual]
 

Return index of parameter (if exist), which represent width of model component for given axis.

Reimplemented in TGo4FitModelFormula, TGo4FitModelFunction, TGo4FitModelGauss1, TGo4FitModelGauss2, and TGo4FitModelGaussN.

Definition at line 339 of file TGo4FitModel.h.

Referenced by GetWidthPar().

virtual TGo4FitParameter* TGo4FitModel::GetPosPar Int_t    naxis = 0 [inline, protected, virtual]
 

Return parameter (if exist), which represent position of model for given axis.

Definition at line 344 of file TGo4FitModel.h.

References Get(), and GetPosParIndex().

Referenced by GetPosition(), and SetPosition().

virtual TGo4FitParameter* TGo4FitModel::GetWidthPar Int_t    naxis = 0 [inline, protected, virtual]
 

Return parameter (if exist), which represent width of model component for given axis.

Definition at line 350 of file TGo4FitModel.h.

References Get(), and GetWidthParIndex().

Referenced by GetWidth(), and SetWidth().

const Int_t * TGo4FitModel::GetDataFullIndex TGo4FitData   data,
Int_t    nbin
[protected]
 

Definition at line 461 of file TGo4FitModel.cxx.

References TGo4FitData::GetFullIndex().

Referenced by TGo4FitModelFromData::EvaluateAtPoint().

Int_t TGo4FitModel::GetDataIndexesSize TGo4FitData   data [protected]
 

Definition at line 465 of file TGo4FitModel.cxx.

References TGo4FitData::GetIndexesSize().

Referenced by TGo4FitModelFromData::EvaluateAtPoint().

void TGo4FitModel::RemoveAllPars   [private]
 

Clear all buffers, allocated during initialization.

Definition at line 179 of file TGo4FitModel.cxx.

References fxAllPars, and fxAllParsValues.

Referenced by Finalize(), Initialize(), and ~TGo4FitModel().

TGo4FitAssignment* TGo4FitModel::GetAssigment Int_t    n [inline, private]
 

Return TGo4FitAssignment object with given index.

Definition at line 391 of file TGo4FitModel.h.

References fxAssigments, and n.

Referenced by AssignmentName(), BuffersAllocated(), ClearAssignmentTo(), Finalize(), FindAssigment(), Get(), GetAssignedConnection(), Initialize(), and RebuildShape().

TGo4FitAssignment* TGo4FitModel::GetAssigment Int_t    n const [inline, private]
 

Definition at line 392 of file TGo4FitModel.h.

References fxAssigments, and n.

TGo4FitAssignment * TGo4FitModel::FindAssigment const char *    DataName const [private]
 

Find assignment to given data.

Definition at line 469 of file TGo4FitModel.cxx.

References GetAssigment(), n, and NumAssigments().

Referenced by AssignToData(), ChangeDataNameInAssignments(), ClearAssignmentTo(), ConnectToDataIfAssigned(), GetModelBins(), GetRatioValueFor(), and IsAssignTo().

TString TGo4FitModel::GetRatioName Int_t    n [private]
 

Set name of ratio parameter.

Definition at line 476 of file TGo4FitModel.cxx.

References n.

Referenced by AssignToData(), and ClearAssignmentTo().


Friends And Related Function Documentation

friend class TGo4Fitter [friend]
 

Definition at line 277 of file TGo4FitModel.h.


Member Data Documentation

Int_t TGo4FitModel::fiMinIntegrDepth [protected]
 

Minimum depth of integration.

Definition at line 359 of file TGo4FitModel.h.

Referenced by EvaluateAndIntegrate(), NeedIntegration(), Print(), and SetIntegrationsProperty().

Int_t TGo4FitModel::fiMaxIntegrDepth [protected]
 

Maximum intergration depth.

Definition at line 364 of file TGo4FitModel.h.

Referenced by EvaluateAndIntegrate(), NeedIntegration(), Print(), and SetIntegrationsProperty().

Double_t TGo4FitModel::fdIntegrEps [protected]
 

Integration precision.

Definition at line 369 of file TGo4FitModel.h.

Referenced by EvaluateAndIntegrate(), Print(), and SetIntegrationsProperty().

Bool_t TGo4FitModel::fbAbsoluteEps [protected]
 

States, if integration precision absolute or relative.

Definition at line 374 of file TGo4FitModel.h.

Referenced by EvaluateAndIntegrate(), and SetIntegrationsProperty().

Bool_t TGo4FitModel::fbIntegrScaling [protected]
 

Scale integral to integration volume.

Definition at line 379 of file TGo4FitModel.h.

Referenced by SetIntegrationsProperty().

TObjArray TGo4FitModel::fxAssigments [private]
 

List of TGo4FitAssignment objects.

Definition at line 407 of file TGo4FitModel.h.

Referenced by AssignToData(), ClearAssignments(), ClearAssignmentTo(), GetAssigment(), NumAssigments(), Print(), and TGo4FitModel().

Int_t TGo4FitModel::fiGroupIndex [private]
 

Store group index of specified model.

Definition at line 412 of file TGo4FitModel.h.

Referenced by GetGroupIndex(), SetBackgroundGroupIndex(), and SetGroupIndex().

TArrayD TGo4FitModel::fxCurrentPars [private]
 

Array of values of parameters.

Definition at line 417 of file TGo4FitModel.h.

Referenced by BeforeEval(), and Finalize().

Double_t* TGo4FitModel::fxCurrentParsArray [private]
 

Pointer on array of parameters values.

Definition at line 422 of file TGo4FitModel.h.

Referenced by BeforeEval(), and EvalN().

Bool_t TGo4FitModel::fbNeedToRebuild [private]
 

Internal flag.

Signals, when object should be rebuild.

Definition at line 427 of file TGo4FitModel.h.

Referenced by RebuildShape(), and SetNeedToRebuild().

TGo4FitParsList* TGo4FitModel::fxAllPars [private]
 

List of all parameters, associated not only with component directly but also with incapsulated objects.

Definition at line 432 of file TGo4FitModel.h.

Referenced by Initialize(), RebuildShape(), and RemoveAllPars().

TArrayD* TGo4FitModel::fxAllParsValues [private]
 

Definition at line 434 of file TGo4FitModel.h.

Referenced by Initialize(), RebuildShape(), and RemoveAllPars().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:41 2005 for Go4-v2.10-5 by doxygen1.2.15