GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
|
#include <TGo4FitModel.h>
Public Member Functions | |
TGo4FitModel () | |
TGo4FitModel (const char *iName, const char *iTitle, Bool_t MakeAmplitude=kFALSE) | |
virtual | ~TGo4FitModel () |
void | SetGroupIndex (Int_t index=-1) |
void | SetBackgroundGroupIndex () |
Int_t | GetGroupIndex () const |
Int_t | NumAssigments () const |
const char * | AssignmentName (Int_t n) |
void | AssignToData (const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE) |
Bool_t | IsAssignTo (const char *DataName) const |
void | ChangeDataNameInAssignments (const char *oldname, const char *newname) |
void | ClearAssignmentTo (const char *DataName) |
void | ClearAssigmentTo (const char *DataName) |
void | ClearAssignments () |
void | ConnectToDataIfAssigned (TGo4FitData *data) |
Double_t | GetRatioValueFor (const char *DataName) |
virtual void | Print (Option_t *option) const |
virtual Double_t | Evaluate (Double_t x) |
virtual Double_t | Evaluate (Double_t x, Double_t y) |
virtual Double_t | Evaluate (Double_t x, Double_t y, Double_t z) |
virtual Double_t | Evaluate (Double_t *v, Int_t ndim) |
virtual Double_t | Integral () |
virtual Bool_t | GetPosition (Int_t naxis, Double_t &pos) |
virtual Bool_t | SetPosition (Int_t naxis, Double_t pos) |
virtual Bool_t | GetWidth (Int_t naxis, Double_t &width) |
virtual Bool_t | SetWidth (Int_t naxis, Double_t width) |
void | SetIntegrationsProperty (Int_t iMinIntegrDepth, Int_t iMaxIntegrDepth=0, Double_t iIntegrEps=0., Bool_t iAbsoluteEps=kFALSE, Bool_t iIntegrScaling=kFALSE) |
Bool_t | NeedIntegration () |
virtual Bool_t | BeforeEval (Int_t ndim) |
virtual Double_t | EvalN (const Double_t *v) |
virtual void | AfterEval () |
virtual Double_t | EvaluateAtPoint (TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE) |
virtual Double_t | EvaluateAtPoint (TGo4FitDataIter *iter, Bool_t UseRanges=kTRUE) |
Bool_t | AddModelToDataResult (TGo4FitData *data) |
virtual Int_t | NumPars () |
Public Member Functions inherited from TGo4FitComponent | |
TGo4FitComponent () | |
TGo4FitComponent (const char *iName, const char *iTitle) | |
virtual | ~TGo4FitComponent () |
TGo4FitParameter * | GetAmplPar () |
const char * | GetAmplName () |
const char * | GetAmplFullName () |
Double_t | GetAmplValue () |
void | SetAmplValue (Double_t iAmpl) |
Double_t | GetAmplError () |
void | SetAmplError (Double_t iError) |
Bool_t | MakeAmpl (Bool_t isFixed=kFALSE) |
Bool_t | RemoveAmpl () |
virtual Bool_t | CanAmplTouch () |
void | SetRange (Int_t naxis, Double_t min, Double_t max) |
void | ExcludeRange (Int_t naxis, Double_t min, Double_t max) |
void | SetRangeMin (Int_t naxis, Double_t value) |
void | SetRangeMax (Int_t naxis, Double_t value) |
void | AddRangeCut (TCutG *cut, Bool_t exclude=kFALSE) |
void | ClearRanges (Int_t naxis=-1) |
Bool_t | IsAnyRangeLimits () |
Bool_t | GetRangeMin (Int_t naxis, Double_t &value) |
Bool_t | GetRangeMax (Int_t naxis, Double_t &value) |
Int_t | GetNumRangeCondition () const |
void | GetRangeCondition (Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const |
void | SetRangeCondition (Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right) |
void | AddRangeCondition (Int_t typ, Int_t naxis, Double_t left, Double_t right) |
void | RemoveRangeCondition (Int_t n) |
Int_t | GetNumRangeCut () const |
TCutG * | GetRangeCut (Int_t n) const |
Bool_t | IsRangeCutExcluding (Int_t n) |
void | SetRangeCutExcluding (Int_t n, Bool_t exclude=kTRUE) |
void | RemoveRangeCut (Int_t n) |
Bool_t | CheckRangeConditions (const Double_t *values, Int_t numaxis) |
virtual void | CollectParsTo (TGo4FitParsList &list) |
void | SetUseBuffers (Bool_t iUse) |
Bool_t | GetUseBuffers () |
Public Member Functions inherited from TGo4FitParsList | |
TGo4FitParsList () | |
TGo4FitParsList (Bool_t IsParsOwned) | |
TGo4FitParsList (const char *Name, const char *Title, Bool_t IsParsOwned) | |
virtual | ~TGo4FitParsList () |
TGo4FitParameter * | GetPar (Int_t n) |
Int_t | GetParIndex (const TGo4FitParameter *par) |
TGo4FitParameter * | FindPar (const char *ParName) |
TGo4FitParameter * | FindPar (const char *OwnerFullName, const char *ParName) |
TGo4FitParameter * | FindPar (TGo4FitParameter *par) |
Double_t | GetParValue (const char *ParName) |
Bool_t | SetParValue (const char *ParName, Double_t iValue) |
void | GetParsValues (Double_t *pars) |
void | SetParsValues (Double_t *pars) |
Double_t | GetParError (const char *ParName) |
Bool_t | SetParError (const char *ParName, Double_t iError) |
virtual Bool_t | SetParFixed (const char *ParName, Bool_t iFixed=kTRUE) |
virtual Bool_t | GetParFixed (const char *ParName) |
Int_t | NumFixedPars () |
Int_t | NumFreePars () |
virtual Bool_t | SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax) |
virtual Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) |
virtual Bool_t | SetParEpsilon (const char *ParName, Double_t Epsilon) |
virtual Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) |
void | SetParName (Int_t n, const char *name) |
const char * | GetParName (Int_t n) |
const char * | GetParFullName (Int_t n) |
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") |
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.) |
virtual void | MemorizePars () |
virtual bool | CanRollbackPars () |
virtual void | RememberPars () |
Bool_t | IsAllParsFixed () |
TGo4FitParameter * | CreatePar (const char *ParName, const char *Title, Double_t iValue=0) |
Bool_t | RemovePar (const char *name) |
Bool_t | RemovePar (TGo4FitParameter *par) |
void | PrintPars () const |
void | ClearPars () |
Public Member Functions inherited from TGo4FitNamed | |
TGo4FitNamed () | |
TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=0) | |
virtual | ~TGo4FitNamed () |
const char * | GetFullName () |
const char * | GetOwnerFullName () |
void | SetOwner (TNamed *iOwner) |
TNamed * | GetOwner () |
void | Print (Option_t *option) const |
Public Member Functions inherited from TGo4FitSlotList | |
TGo4FitSlotList () | |
virtual | ~TGo4FitSlotList () |
virtual void | FillSlotList (TSeqCollection *lst) |
void | SetUpdateSlotList () |
const TObjArray * | GetSlotList (Bool_t ForceUpdate=kFALSE) |
Int_t | NumSlots () |
TGo4FitSlot * | GetSlot (Int_t nslot) |
TGo4FitSlot * | FindSlot (const char *FullSlotName) |
Bool_t | ConnectSlots (TGo4FitSlot *slot1, TGo4FitSlot *slot2) |
Bool_t | ConnectSlots (const char *Slot1FullName, const char *Slot2FullName) |
TGo4FitSlot * | SetObject (TObject *obj, Bool_t iOwned=kFALSE) |
TGo4FitSlot * | SetObject (const char *PlaceName, TObject *obj, Bool_t iOwned=kFALSE) |
TGo4FitSlot * | IsObjectInSlots (TObject *obj) |
Bool_t | CheckObjects (Bool_t MakeOut=kTRUE) |
Bool_t | IsEmptySlots () |
void | ClearObjects (const char *PlaceName=0, Bool_t NonOwned=kTRUE) |
void | ClearSlot (TGo4FitSlot *slot, Bool_t NonOwned) |
void | SetSaveFlagForObjects (Int_t iSaveFlag, const char *PlaceName=0) |
Protected Member Functions | |
virtual TGo4FitParameter * | Get (Int_t n) |
Double_t | EvaluateAndIntegrate (Int_t NumScales, const Double_t *Scales, const Double_t *Widths) |
virtual Bool_t | Initialize (Int_t UseBuffers=-1) |
virtual void | Finalize () |
TGo4FitData * | GetAssignedConnection (Int_t n) |
Bool_t | BuffersAllocated () const |
void | RebuildShape (Bool_t ForceBuild=kFALSE) |
Double_t * | GetModelBins (const char *DataName) const |
void | SetNeedToRebuild () |
virtual Double_t | UserFunction (Double_t *, Double_t *) |
virtual Int_t | GetPosParIndex (Int_t) |
virtual Int_t | GetWidthParIndex (Int_t) |
virtual TGo4FitParameter * | GetPosPar (Int_t naxis=0) |
virtual TGo4FitParameter * | GetWidthPar (Int_t naxis=0) |
const Int_t * | GetDataFullIndex (TGo4FitData *data, Int_t nbin) |
Int_t | GetDataIndexesSize (TGo4FitData *data) |
Protected Member Functions inherited from TGo4FitComponent | |
TGo4FitParameter * | NewParameter (const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1) |
TGo4FitParameter * | NewAmplitude (const char *Name=0, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0) |
Int_t | GetAmplIndex () |
void | SetAmplIndex (Int_t iAmplIndex=-1) |
Protected Member Functions inherited from TGo4FitParsList | |
TGo4FitParameter * | AddPar (TGo4FitParameter *par) |
TGo4FitParameter * | InsertPar (TGo4FitParameter *par, Int_t indx) |
void | SetParsOwner (TGo4FitNamed *iOwner) |
void | ClearParsBlocking () |
TGo4FitParameter * | Find (const char *ParName) |
TGo4FitParameter * | Find (const char *OwnerFullName, const char *ParName) |
TGo4FitParameter * | Find (TGo4FitParameter *par) |
Bool_t | RemoveParByIndex (Int_t indx) |
Protected Member Functions inherited from TGo4FitSlotList | |
void | CheckDuplicatesOnSlot () |
void | PrepareSlotsForWriting () |
ClassDef (TGo4FitSlotList, 1) | |
Protected Attributes | |
Int_t | fiMinIntegrDepth |
Int_t | fiMaxIntegrDepth |
Double_t | fdIntegrEps |
Bool_t | fbAbsoluteEps |
Bool_t | fbIntegrScaling |
Protected Attributes inherited from TGo4FitSlotList | |
TObjArray * | fxSlotList |
Bool_t | fbUpdateSlotList |
Private Member Functions | |
void | RemoveAllPars () |
TGo4FitAssignment * | GetAssigment (Int_t n) |
TGo4FitAssignment * | GetAssigment (Int_t n) const |
TGo4FitAssignment * | FindAssigment (const char *DataName) const |
TString | GetRatioName (Int_t n) |
Private Attributes | |
TObjArray | fxAssigments |
Int_t | fiGroupIndex |
TArrayD | fxCurrentPars |
Double_t * | fxCurrentParsArray |
Bool_t | fbNeedToRebuild |
TGo4FitParsList * | fxAllPars |
TArrayD * | fxAllParsValues |
Friends | |
class | TGo4Fitter |
Basic abstract class for representing model components of fitted data.
Definition at line 81 of file TGo4FitModel.h.
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 constructor. 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().
|
virtual |
Delete TGo4FitModel object.
Definition at line 69 of file TGo4FitModel.cxx.
References RemoveAllPars().
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().
|
inlinevirtual |
Clear buffers, which were created by BeforeEval() method.
Reimplemented in TGo4FitModelFunction, TGo4FitModelGaussN, TGo4FitModelPolynom, TGo4FitModelFromData, and TGo4FitModelFormula.
Definition at line 253 of file TGo4FitModel.h.
Referenced by AddModelToDataResult(), TGo4FitModelFunction::AfterEval(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), Evaluate(), and RebuildShape().
|
inline |
Returns name of data, to which model object is assigned.
Definition at line 129 of file TGo4FitModel.h.
References GetAssigment().
Referenced by TGo4Fitter::CalculatesModelIntegral(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4FitPanel::Cmd_AddRangeCondition(), TGo4Fitter::CollectAllPars(), TGo4FitPanel::FindPadWhereModel(), TGo4FitPanel::LocateModel(), TGo4FitPanel::SetItemText(), TGo4FitPanel::ShowItemAsGraph(), and TGo4FitPanel::UpdateWizPaint().
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(), and TGo4FitPanel::CreateModel().
|
virtual |
Prepares (if necessary) 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 TGo4FitModelFunction, TGo4FitModelPolynom, TGo4FitModelGaussN, TGo4FitModelFromData, TGo4FitModelGauss2, TGo4FitModelFormula, and TGo4FitModelGauss1.
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().
|
protected |
Checks if model allocate buffers for calculations
Definition at line 228 of file TGo4FitModel.cxx.
References TGo4FitAssignment::fxModelBins, GetAssigment(), and NumAssigments().
Referenced by TGo4Fitter::ModelBuffersAllocated().
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().
|
inline |
Definition at line 152 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::AssignModelTo(), TGo4Fitter::ClearModelAssignmentTo(), and TGo4FitPanel::Cmd_ClearAssigments().
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(), and NumAssigments().
Referenced by ClearAssigmentTo(), TGo4Fitter::ClearModelAssignmentTo(), TGo4FitPanel::Cmd_ClearAssigment(), TGo4Fitter::DeleteModelsAssosiatedTo(), and TXXXCalibPar::TXXXCalibPar().
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().
|
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 TGo4FitModelPolynom, TGo4FitModelGaussN, TGo4FitModelFromData, TGo4FitModelGauss2, TGo4FitModelFormula, and TGo4FitModelGauss1.
Definition at line 415 of file TGo4FitModel.cxx.
References fxCurrentParsArray, and UserFunction().
Referenced by Evaluate(), and EvaluateAndIntegrate().
|
virtual |
Calculates value of model for given x value.
Definition at line 419 of file TGo4FitModel.cxx.
References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().
|
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().
|
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().
|
virtual |
Calculates value of model for given axis values.
Definition at line 447 of file TGo4FitModel.cxx.
References AfterEval(), BeforeEval(), EvalN(), and TGo4FitComponent::GetAmplValue().
|
protected |
Make integration of model inside given point, if integration specified.
Definition at line 240 of file TGo4FitModel.cxx.
References EvalN(), fbAbsoluteEps, fbIntegrScaling, fdIntegrEps, fiMaxIntegrDepth, and fiMinIntegrDepth.
Referenced by EvaluateAtPoint().
|
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().
|
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().
|
protectedvirtual |
Deletes all buffers, created during initialization.
Reimplemented in TGo4FitModelFunction, and TGo4FitModelFormula.
Definition at line 218 of file TGo4FitModel.cxx.
References fxCurrentPars, TGo4FitAssignment::fxModelBins, TGo4FitAssignment::fxModelMask, GetAssigment(), NumAssigments(), and RemoveAllPars().
Referenced by TGo4FitModelFormula::Finalize(), TGo4FitModelFunction::Finalize(), and TGo4Fitter::FinalizeFitterData().
|
private |
Find assignment to given data.
Definition at line 469 of file TGo4FitModel.cxx.
References GetAssigment(), and NumAssigments().
Referenced by AssignToData(), ChangeDataNameInAssignments(), ClearAssignmentTo(), ConnectToDataIfAssigned(), GetModelBins(), GetRatioValueFor(), and IsAssignTo().
|
protectedvirtual |
Reimplemented from TGo4FitParsList.
Definition at line 79 of file TGo4FitModel.cxx.
References TGo4FitAssignment::fxRatio, TGo4FitParsList::Get(), GetAssigment(), NumAssigments(), and TGo4FitParsList::NumPars().
Referenced by GetPosPar(), and GetWidthPar().
|
inlineprivate |
Return TGo4FitAssignment object with given index.
Definition at line 390 of file TGo4FitModel.h.
References fxAssigments.
Referenced by AssignmentName(), BuffersAllocated(), ClearAssignmentTo(), Finalize(), FindAssigment(), Get(), GetAssignedConnection(), Initialize(), and RebuildShape().
|
inlineprivate |
Definition at line 391 of file TGo4FitModel.h.
References fxAssigments.
|
protected |
Return pointer on assigned data.
Definition at line 135 of file TGo4FitModel.cxx.
References TGo4FitAssignment::fxData, and GetAssigment().
Referenced by TGo4FitModelFromData::Initialize().
|
protected |
Definition at line 461 of file TGo4FitModel.cxx.
References TGo4FitData::GetFullIndex().
Referenced by TGo4FitModelFromData::EvaluateAtPoint().
|
protected |
Definition at line 465 of file TGo4FitModel.cxx.
References TGo4FitData::GetIndexesSize().
Referenced by TGo4FitModelFromData::EvaluateAtPoint().
|
inline |
Returns group index of model.
Definition at line 119 of file TGo4FitModel.h.
References fiGroupIndex.
Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4Fitter::CreateDrawObject(), TGo4FitPanel::FillNamedWidget(), and TGo4FitPanel::UpdateWizStackWidget().
|
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().
|
virtual |
Return position of model, if exists.
Definition at line 141 of file TGo4FitModel.cxx.
References GetPosPar(), and TGo4FitParameter::GetValue().
Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4FitPanel::FillParsTable(), TGo4FitGuiArrow::Locate(), TGo4FitPanel::PaintModel(), and TGo4Fitter::PrintLines().
|
inlineprotectedvirtual |
Return parameter (if exist), which represent position of model for given axis.
Definition at line 343 of file TGo4FitModel.h.
References Get(), and GetPosParIndex().
Referenced by GetPosition(), and SetPosition().
|
inlineprotectedvirtual |
Return index of parameter (if exist), which represent position of model for given axis.
Reimplemented in TGo4FitModelFunction, TGo4FitModelGaussN, TGo4FitModelFormula, TGo4FitModelGauss2, and TGo4FitModelGauss1.
Definition at line 333 of file TGo4FitModel.h.
Referenced by GetPosPar().
|
private |
Set name of ratio parameter.
Definition at line 476 of file TGo4FitModel.cxx.
Referenced by AssignToData(), and ClearAssignmentTo().
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 483 of file TGo4FitModel.cxx.
References FindAssigment(), and TGo4FitAssignment::RatioValue().
Referenced by AddModelToDataResult(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), and TGo4Fitter::CreateDrawObject().
|
virtual |
Returns with of model component, if exists.
Definition at line 155 of file TGo4FitModel.cxx.
References TGo4FitParameter::GetValue(), and GetWidthPar().
Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4FitGuiArrow::ExecuteEvent(), TGo4FitPanel::FillParsTable(), TGo4FitGuiArrow::Locate(), TGo4FitPanel::PaintModel(), and TGo4Fitter::PrintLines().
|
inlineprotectedvirtual |
Return parameter (if exist), which represent width of model component for given axis.
Definition at line 349 of file TGo4FitModel.h.
References Get(), and GetWidthParIndex().
Referenced by GetWidth(), and SetWidth().
|
inlineprotectedvirtual |
Return index of parameter (if exist), which represent width of model component for given axis.
Reimplemented in TGo4FitModelFunction, TGo4FitModelGaussN, TGo4FitModelFormula, TGo4FitModelGauss2, and TGo4FitModelGauss1.
Definition at line 338 of file TGo4FitModel.h.
Referenced by GetWidthPar().
|
protectedvirtual |
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 TGo4FitModelFunction, TGo4FitModelFromData, and TGo4FitModelFormula.
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(), NumAssigments(), TGo4FitParsList::NumPars(), RemoveAllPars(), SetNeedToRebuild(), and TGo4FitParsList::TGo4FitParsList().
Referenced by TGo4Fitter::InitFitterData(), TGo4FitModelFormula::Initialize(), TGo4FitModelFromData::Initialize(), and TGo4FitModelFunction::Initialize().
|
virtual |
Calculates integral of model component
Reimplemented in TGo4FitModelGauss1.
Definition at line 456 of file TGo4FitModel.cxx.
Referenced by TGo4FitPanel::FillParsTable(), and TGo4FitPanel::Wiz_GetModelInfo().
|
inline |
Checks, if model assigned to given data.
Definition at line 141 of file TGo4FitModel.h.
References FindAssigment().
Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculateNDF(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), TGo4Fitter::DeleteModelsAssosiatedTo(), TGo4Fitter::Draw(), TGo4FitPanel::FillPopupForItem(), QFitterWidget::FillSpecificData(), QFitDataWidget::FillSpecificData(), TGo4Fitter::NumModelsAssosiatedTo(), TGo4FitPanel::PaintModelsFor(), TGo4Fitter::RebuildAll(), TXXXCalibPar::UpdateFrom(), TGo4FitPanel::UpdateWizModelsList(), TGo4FitPanel::UpdateWizStackWidget(), TGo4FitPanel::Wiz_GetModelInfo(), TGo4FitPanel::Wiz_ModelList_itemChanged(), and TGo4FitPanel::Wiz_ModelListSelect().
|
inline |
Returns kTRUE, if integration properties were specified.
Definition at line 236 of file TGo4FitModel.h.
References fiMaxIntegrDepth, and fiMinIntegrDepth.
|
inline |
Returns number of assignment for this model.
Definition at line 124 of file TGo4FitModel.h.
References fxAssigments.
Referenced by AssignToData(), BuffersAllocated(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), ClearAssignmentTo(), TGo4FitPanel::Cmd_AddRangeCondition(), TGo4Fitter::CollectAllPars(), TGo4Fitter::DeleteModelsAssosiatedTo(), Finalize(), FindAssigment(), TGo4FitPanel::FindPadWhereModel(), Get(), TGo4FitModelFromData::Initialize(), Initialize(), TGo4FitPanel::LocateModel(), NumPars(), RebuildShape(), TGo4FitPanel::ShowItemAsGraph(), TGo4FitPanel::UpdateItem(), and TGo4FitPanel::UpdateWizPaint().
|
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(), TGo4FitPanel::Button_FitterDraw(), and TGo4FitModelFormula::CompileFormula().
|
virtual |
Print information about model object on standard output.
Reimplemented from TGo4FitComponent.
Reimplemented in TGo4FitModelFunction, TGo4FitModelPolynom, TGo4FitModelGaussN, TGo4FitModelFromData, TGo4FitModelGauss2, TGo4FitModelFormula, and TGo4FitModelGauss1.
Definition at line 488 of file TGo4FitModel.cxx.
References fbAbsoluteEps, fdIntegrEps, fiMaxIntegrDepth, fiMinIntegrDepth, fxAssigments, and TGo4FitComponent::Print().
Referenced by TGo4FitModelGauss1::Print(), TGo4FitModelFormula::Print(), TGo4FitModelGauss2::Print(), TGo4FitModelFromData::Print(), TGo4FitModelGaussN::Print(), TGo4FitModelPolynom::Print(), and TGo4FitModelFunction::Print().
|
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(), NumAssigments(), TGo4FitParsList::NumPars(), and TGo4FitAssignment::RatioValue().
Referenced by TGo4Fitter::RebuildAll().
|
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().
|
inline |
Set group index to background (index=0).
Definition at line 114 of file TGo4FitModel.h.
References fiGroupIndex.
Referenced by TGo4FitModelPolynom::TGo4FitModelPolynom(), and TGo4FitPanel::Wiz_BackgroundChk_toggled().
|
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 109 of file TGo4FitModel.h.
References fiGroupIndex.
Referenced by TGo4Fitter::AddPolynoms(), TGo4Fitter::AddPolynomX(), TGo4FitPanel::ChangeModelPar(), and TGo4FitPanel::Wiz_BackgroundChk_toggled().
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 sense, 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) segments 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().
|
inlineprotected |
Sets flag, that shape bins should be refilled next time, when RebuildShape() routine will be called.
Definition at line 321 of file TGo4FitModel.h.
References fbNeedToRebuild.
Referenced by Initialize().
|
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(), TGo4FitPanel::LocateModel(), and TGo4FitPanel::ParsTableChanged().
|
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(), TGo4FitPanel::LocateModel(), and TGo4FitPanel::ParsTableChanged().
|
inlineprotectedvirtual |
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 328 of file TGo4FitModel.h.
Referenced by EvalN().
|
friend |
Definition at line 276 of file TGo4FitModel.h.
|
protected |
States, if integration precision absolute or relative.
Definition at line 373 of file TGo4FitModel.h.
Referenced by EvaluateAndIntegrate(), Print(), and SetIntegrationsProperty().
|
protected |
Scale integral to integration volume.
Definition at line 378 of file TGo4FitModel.h.
Referenced by EvaluateAndIntegrate(), and SetIntegrationsProperty().
|
private |
Internal flag. Signals, when object should be rebuild.
Definition at line 426 of file TGo4FitModel.h.
Referenced by RebuildShape(), and SetNeedToRebuild().
|
protected |
Integration precision.
Definition at line 368 of file TGo4FitModel.h.
Referenced by EvaluateAndIntegrate(), Print(), and SetIntegrationsProperty().
|
private |
Store group index of specified model.
Definition at line 411 of file TGo4FitModel.h.
Referenced by GetGroupIndex(), SetBackgroundGroupIndex(), and SetGroupIndex().
|
protected |
Maximum integration depth.
Definition at line 363 of file TGo4FitModel.h.
Referenced by EvaluateAndIntegrate(), NeedIntegration(), Print(), and SetIntegrationsProperty().
|
protected |
Minimum depth of integration.
Definition at line 358 of file TGo4FitModel.h.
Referenced by EvaluateAndIntegrate(), NeedIntegration(), Print(), and SetIntegrationsProperty().
|
private |
List of all parameters, associated not only with component directly but also with encapsulated objects.
Definition at line 431 of file TGo4FitModel.h.
Referenced by Initialize(), RebuildShape(), and RemoveAllPars().
|
private |
Definition at line 433 of file TGo4FitModel.h.
Referenced by Initialize(), RebuildShape(), and RemoveAllPars().
|
private |
List of TGo4FitAssignment objects.
Definition at line 406 of file TGo4FitModel.h.
Referenced by AssignToData(), ClearAssignments(), ClearAssignmentTo(), GetAssigment(), NumAssigments(), Print(), and TGo4FitModel().
|
private |
Array of values of parameters.
Definition at line 416 of file TGo4FitModel.h.
Referenced by BeforeEval(), and Finalize().
|
private |
Pointer on array of parameters values.
Definition at line 421 of file TGo4FitModel.h.
Referenced by BeforeEval(), and EvalN().