GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#include <TGo4Fitter.h>
Public Types | |
enum | { ff_least_squares = 0, ff_chi_square = 1, ff_chi_Pearson = 2, ff_chi_Neyman = 3, ff_chi_gamma = 4, ff_ML_Poisson = 5, ff_user = 6 } |
Public Member Functions | |
TGo4Fitter () | |
TGo4Fitter (const char *iName, const char *iTitle) | |
TGo4Fitter (const char *iName, Int_t iFitFunctionType, Bool_t IsAddStandardActions) | |
virtual | ~TGo4Fitter () |
void | SetFitFunctionType (Int_t iFitFunctionType) |
Int_t | GetFitFunctionType () const |
void | SetUserFitFunction (TUserFitFunction iFunc) |
void | SetMemoryUsage (Int_t iMemoryUsage) |
Int_t | GetMemoryUsage () const |
void | Clear (Option_t *option="") override |
Int_t | GetNumData () const |
TGo4FitData * | GetData (Int_t n) |
const char * | GetDataName (Int_t n) |
TGo4FitData * | FindData (const char *DataName) |
TGo4FitData * | AddData (TGo4FitData *d) |
TGo4FitDataHistogram * | AddH1 (const char *DataName, TH1 *histo, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.) |
TGo4FitDataHistogram * | SetH1 (const char *DataName, TH1 *histo, Bool_t Owned=kFALSE) |
TGo4FitDataGraph * | AddGraph (const char *DataName, TGraph *gr, Bool_t Owned=kFALSE, Double_t lrange=0., Double_t rrange=0.) |
TGo4FitDataGraph * | SetGraph (const char *DataName, TGraph *gr, Bool_t Owned=kFALSE) |
TGo4FitData * | RemoveData (const char *DataName, Bool_t IsDel=kFALSE) |
void | DeleteAllData () |
Int_t | GetNumModel () const |
TGo4FitModel * | GetModel (Int_t n) |
TGo4FitModel * | FindModel (const char *ModelName) |
TGo4FitModel * | AddModel (TGo4FitModel *m) |
TGo4FitModel * | AddModel (const char *DataName, TGo4FitModel *m) |
void | AddPolynomX (const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t GroupIndex=0, Double_t lrange=0., Double_t rrange=0.) |
void | AddPolynomX (const char *DataName, const char *NamePrefix, TArrayD &Coef, Int_t GroupIndex=0) |
void | AddPolynoms (const char *DataName, const char *NamePrefix, Int_t MaxOrder=1, Int_t NumAxis=1, Int_t GroupIndex=0) |
TGo4FitModelGauss1 * | AddGauss1 (const char *DataName, const char *ModelName, Double_t iPosition, Double_t iWidth, Double_t iAmpl=1., Int_t Axis=0) |
Int_t | NumModelsAssosiatedTo (const char *DataName) |
TGo4FitModel * | CloneModel (const char *ModelName, const char *NewName=nullptr) |
TGo4FitModel * | RemoveModel (const char *ModelName, Bool_t IsDel=kFALSE) |
void | DeleteModelsAssosiatedTo (const char *DataName) |
void | DeleteAllModels () |
void | AssignModelTo (const char *ModelName, const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE) |
void | ClearModelAssignmentTo (const char *ModelName, const char *DataName=nullptr) |
void | ChangeDataNameInAssignments (const char *oldname, const char *newname) |
Int_t | GetNumComp () const |
TGo4FitComponent * | GetComp (Int_t n) |
void | EstimateAmplitudes (Int_t NumIters=1) |
void | AddAmplEstimation (Int_t NumIters=1) |
void | AddStandardActions () |
Double_t | CalculateFitFunction (Double_t *pars=nullptr, Int_t FitFunctionType=-1, const char *DataName=nullptr) |
Int_t | CalculateNDF (const char *DataName=nullptr) |
void | FillSlotList (TSeqCollection *) override |
void | Print (Option_t *option="") const override |
Bool_t | CalculatesMomentums (const char *DataName, Bool_t UseRanges, Bool_t SubstractModels, Double_t &first, Double_t &second) |
Double_t | CalculatesIntegral (const char *DataName, const char *ModelName=nullptr, Bool_t OnlyCounts=kFALSE) |
Double_t | CalculatesModelIntegral (const char *ModelName, Bool_t OnlyCounts=kFALSE) |
TObject * | CreateDrawObject (const char *ObjName, const char *DataName, Bool_t IsModel=kFALSE, const char *ModelName=nullptr) |
void | Draw (Option_t *option) override |
void | ProvideLastDrawObjects (TObjArray &lst) |
void | PrintAmpls () const |
void | PrintLines () const |
TString | FindNextName (const char *Head, Int_t start, Bool_t isModel=kTRUE) |
![]() | |
TGo4FitterAbstract () | |
TGo4FitterAbstract (const char *iName, const char *iTitle) | |
virtual | ~TGo4FitterAbstract () |
void | Clear (Option_t *option="") override |
Int_t | NumPars () override |
void | SetParsListChange () |
void | CopyParsValuesFrom (TGo4FitterAbstract *fitter) |
Bool_t | GetParFixed (const char *ParName) override |
Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) override |
Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) override |
Bool_t | IsSuitableConfig (TGo4FitterConfig *Config) |
Bool_t | ApplyConfig (TGo4FitterConfig *Config) |
Double_t | CalculateFitFunction (Double_t *pars=nullptr) |
void | AddAction (TGo4FitterAction *Action) |
void | AddActionAt (TGo4FitterAction *Action, Int_t indx) |
Int_t | GetNumActions () const |
TGo4FitterAction * | GetAction (Int_t num) |
void | DeleteActions () |
void | DeleteAction (TGo4FitterAction *action) |
void | ReplaceAction (TGo4FitterAction *action, Int_t dir) |
void | DoActions (Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr) |
void | DoAction (TGo4FitterAction *Action) |
void | DoAction (Int_t indx) |
TObjArray * | ProcessObjects (TObjArray *objs, Bool_t CloneFitter=kTRUE, Bool_t OnlyRequired=kTRUE, TObjArray *rownames=nullptr, TObjArray *colnames=nullptr) |
void | AddSimpleMinuit () |
TGo4FitterOutput * | AddOutputAction (const char *Action, const char *Option=nullptr) |
void | DeleteOutputActions () |
Int_t | NeedPadsNumber () |
void | SetPad (Int_t indx, TVirtualPad *pad) |
Bool_t | IsParsAsResults () const |
Int_t | GetNumResults () const |
Double_t | GetResultValue (Int_t n) const |
Double_t | GetResultFF () const |
Int_t | GetResultNDF () const |
const TArrayD * | GetResults () |
void | PrintResults () const |
void | Print (Option_t *option="") const override |
![]() | |
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) |
Int_t | NumFixedPars () |
Int_t | NumFreePars () |
virtual Bool_t | SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax) |
virtual Bool_t | SetParEpsilon (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 | Print (Option_t *option="") const override |
void | PrintPars () const |
virtual void | CollectParsTo (TGo4FitParsList &list) |
void | ClearPars () |
![]() | |
TGo4FitNamed () | |
TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr) | |
virtual | ~TGo4FitNamed () |
const char * | GetFullName () |
const char * | GetOwnerFullName () |
void | SetOwner (TNamed *iOwner) |
TNamed * | GetOwner () |
void | Print (Option_t *option="") const override |
![]() | |
TGo4FitSlotList () | |
virtual | ~TGo4FitSlotList () |
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=nullptr, Bool_t NonOwned=kTRUE) |
void | ClearSlot (TGo4FitSlot *slot, Bool_t NonOwned) |
void | SetSaveFlagForObjects (Int_t iSaveFlag, const char *PlaceName=nullptr) |
Protected Member Functions | |
Bool_t | ModelBuffersAllocated (TGo4FitModel *model) |
Bool_t | DataBuffersAllocated (TGo4FitData *data) |
Int_t | GetDataBinsSize (TGo4FitData *data) const |
Double_t * | GetDataBinsValues (TGo4FitData *data) const |
Double_t * | GetDataBinsDevs (TGo4FitData *data) const |
Double_t * | GetDataBinsResult (TGo4FitData *data) const |
Double_t * | GetModelBinsValues (TGo4FitModel *model, const char *DataName) const |
void | RebuildAll (Bool_t ForceBuild=kFALSE) |
void | CollectAllPars () override |
Double_t | DoCalculation () override |
Int_t | DoNDFCalculation () override |
Double_t | CalculateFCN (Int_t FitFunctionType, TGo4FitData *selectdata=nullptr) |
Double_t | PointFitFunction (Int_t FitFunctionType, Double_t value, Double_t modelvalue, Double_t standdev) |
Bool_t | InitFitterData () override |
void | FinalizeFitterData () override |
![]() | |
virtual Bool_t | Initialize () |
Bool_t | IsInitialized () const |
virtual void | Finalize () |
TGo4FitParameter * | Get (Int_t n) override |
void | CheckParsListChanging () |
Bool_t | InitializeDependencies (TObjArray &Dependencies, Bool_t BlockPars, Bool_t DoInit) |
void | RunDependenciesList (TObjArray &Dependencies, Double_t *pars) |
void | FinalizeDependencies (TObjArray &Dependencies) |
void | ExecuteDependencies (Double_t *pars) |
![]() | |
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) |
![]() | |
void | CheckDuplicatesOnSlot () |
void | PrepareSlotsForWriting () |
ClassDef (TGo4FitSlotList, 1) | |
Protected Attributes | |
TObjArray | fxDatas |
TObjArray | fxModels |
Int_t | fiFitFunctionType {0} |
Int_t | fiMemoryUsage {0} |
![]() | |
TObjArray | fxActions |
TArrayD | fxResults |
TGo4FitterConfig * | fxCurrentConfig {nullptr} |
Bool_t | fbParsChange {kFALSE} |
Bool_t | fbInitializationDone {kFALSE} |
Bool_t | fbNeedToFinalize {kFALSE} |
Bool_t | fbParsAsResults {kFALSE} |
![]() | |
TObjArray * | fxSlotList {nullptr} |
Bool_t | fbUpdateSlotList {kFALSE} |
Private Member Functions | |
void | MoveDrawObjectsToROOT () |
void | CheckSlotsBeforeDelete (TGo4FitComponent *comp) |
Private Attributes | |
TUserFitFunction | fxUserFitFunction {nullptr} |
TObjArray * | fxDrawObjs {nullptr} |
Friends | |
class | TGo4FitAmplEstimation |
Central class of Go4Fit package.
Definition at line 37 of file TGo4Fitter.h.
anonymous enum |
Enumerator | |
---|---|
ff_least_squares | |
ff_chi_square | |
ff_chi_Pearson | |
ff_chi_Neyman | |
ff_chi_gamma | |
ff_ML_Poisson | |
ff_user |
Definition at line 39 of file TGo4Fitter.h.
TGo4Fitter::TGo4Fitter | ( | ) |
Default constructor.
Definition at line 39 of file TGo4Fitter.cxx.
TGo4Fitter::TGo4Fitter | ( | const char * | iName, |
const char * | iTitle | ||
) |
Creates TGo4Fitter object and sets name and title.
Definition at line 45 of file TGo4Fitter.cxx.
TGo4Fitter::TGo4Fitter | ( | const char * | iName, |
Int_t | iFitFunctionType, | ||
Bool_t | IsAddStandardActions | ||
) |
Creates TGo4Fitter object and set type of fit function. If AddStandardActions flag is set,
Definition at line 53 of file TGo4Fitter.cxx.
References AddStandardActions(), fxDatas, fxModels, and SetFitFunctionType().
|
virtual |
Destructor. Delete TGo4Fitter object.
Definition at line 64 of file TGo4Fitter.cxx.
References TGo4FitSlotList::CheckDuplicatesOnSlot(), and MoveDrawObjectsToROOT().
void TGo4Fitter::AddAmplEstimation | ( | Int_t | NumIters = 1 | ) |
Add amplitude estimation to actions list.
Definition at line 726 of file TGo4Fitter.cxx.
References TGo4FitterAbstract::AddAction(), and TGo4FitAmplEstimation.
Referenced by AddStandardActions(), BuildFitter(), TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::Cmd_AddNewAction(), and GetNumComp().
TGo4FitData * TGo4Fitter::AddData | ( | TGo4FitData * | d | ) |
Add data object to fitter. Data object owned by fitter and will be destroyed together with fitter.
Definition at line 119 of file TGo4Fitter.cxx.
References fxDatas, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by AddGraph(), AddH1(), BuildFitter(), TGo4FitPanel::Cmd_AddNewData(), TGo4FitPanel::CreateDataFor(), Example13(), Example8(), Example9(), GetNumData(), and TGo4FitPanel::Wiz_CreateNewData().
TGo4FitModelGauss1 * TGo4Fitter::AddGauss1 | ( | const char * | DataName, |
const char * | ModelName, | ||
Double_t | iPosition, | ||
Double_t | iWidth, | ||
Double_t | iAmpl = 1. , |
||
Int_t | Axis = 0 |
||
) |
Add 1-dim gaussian model to fitter.
Definition at line 382 of file TGo4Fitter.cxx.
References AddModel(), and TGo4FitComponent::SetAmplValue().
Referenced by Example1(), Example10(), Example5(), GetNumModel(), TGo4FitPeakFinder::HansEsselPeakFinder(), TXXXCalibPar::ReadDatabase(), TGo4FitPeakFinder::ROOTPeakFinder(), and TGo4FitPeakFinder::SergeyLinevPeakFinder().
TGo4FitDataGraph * TGo4Fitter::AddGraph | ( | const char * | DataName, |
TGraph * | gr, | ||
Bool_t | Owned = kFALSE , |
||
Double_t | lrange = 0. , |
||
Double_t | rrange = 0. |
||
) |
Create TGo4FitDataGraph object and adds its to fitter.
Definition at line 144 of file TGo4Fitter.cxx.
References AddData(), and TGo4FitComponent::SetRange().
Referenced by Example12(), GetNumData(), and TXXXCalibPar::TXXXCalibPar().
TGo4FitDataHistogram * TGo4Fitter::AddH1 | ( | const char * | DataName, |
TH1 * | histo, | ||
Bool_t | Owned = kFALSE , |
||
Double_t | lrange = 0. , |
||
Double_t | rrange = 0. |
||
) |
Create TGo4FitDataHistogram object and adds its to fitter.
Definition at line 127 of file TGo4Fitter.cxx.
References AddData(), and TGo4FitComponent::SetRange().
Referenced by Example1(), Example10(), Example11(), Example2(), Example3(), Example4(), Example5(), GetNumData(), and TXXXCalibPar::TXXXCalibPar().
TGo4FitModel * TGo4Fitter::AddModel | ( | TGo4FitModel * | m | ) |
Add model component to fitter. Model already should be assigned to at least one data object.
Definition at line 210 of file TGo4Fitter.cxx.
References fxModels, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by AddGauss1(), AddPolynoms(), AddPolynomX(), BuildFitter(), CloneModel(), TGo4FitPanel::CreateModel(), Example10(), Example13(), Example2(), Example3(), Example4(), Example8(), Example9(), and GetNumModel().
TGo4FitModel * TGo4Fitter::AddModel | ( | const char * | DataName, |
TGo4FitModel * | m | ||
) |
Add model component to fitter and assign it to specified data object.
Definition at line 218 of file TGo4Fitter.cxx.
References TGo4FitModel::AssignToData(), fxModels, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
void TGo4Fitter::AddPolynoms | ( | const char * | DataName, |
const char * | NamePrefix, | ||
Int_t | MaxOrder = 1 , |
||
Int_t | NumAxis = 1 , |
||
Int_t | GroupIndex = 0 |
||
) |
Construct full polynom for specified data object. NamePrefix sets prefix of model name for each polynom component. MaxOrder sets maximum order of polynom (default =1 ) NumAxis sets number of axis, for which polynom will be sets GroupIndex sets index of models group for all polynomial components (default = 0 - background group)
Definition at line 323 of file TGo4Fitter.cxx.
References AddModel(), FindModel(), and TGo4FitModel::SetGroupIndex().
Referenced by TGo4FitPanel::Button_SimpleFit(), TGo4FitPanel::CreateModel(), and GetNumModel().
void TGo4Fitter::AddPolynomX | ( | const char * | DataName, |
const char * | NamePrefix, | ||
Int_t | MaxOrder = 1 , |
||
Int_t | GroupIndex = 0 , |
||
Double_t | lrange = 0. , |
||
Double_t | rrange = 0. |
||
) |
Construct 1-dim polynom for specified data object for x scale. NamePrefix sets prefix of model name for each polynom component. MaxOrder sets maximum order of polynom (default =1 ) NumAxis sets number of axis, for which polynom will be sets GroupIndex sets index of models group for all polynom components (default = 0 - background group) lbound and rbound sets range, where polynom will be calculated
Definition at line 235 of file TGo4Fitter.cxx.
References AddModel(), FindModel(), TGo4FitModel::SetGroupIndex(), and TGo4FitComponent::SetRange().
Referenced by Example1(), Example10(), Example12(), Example2(), Example3(), Example4(), Example5(), GetNumModel(), TGo4FitPeakFinder::HansEsselPeakFinder(), TGo4FitPeakFinder::ROOTPeakFinder(), TGo4FitPeakFinder::SergeyLinevPeakFinder(), and TXXXCalibPar::TXXXCalibPar().
void TGo4Fitter::AddPolynomX | ( | const char * | DataName, |
const char * | NamePrefix, | ||
TArrayD & | Coef, | ||
Int_t | GroupIndex = 0 |
||
) |
Construct 1-dim polynom with specified polynom coefficients NamePrefix sets prefix of model name for each polynom component. GroupIndex sets index of models group for all polynomial components (default = 0 - background group)
Definition at line 281 of file TGo4Fitter.cxx.
References AddModel(), FindModel(), TGo4FitComponent::SetAmplValue(), and TGo4FitModel::SetGroupIndex().
void TGo4Fitter::AddStandardActions | ( | ) |
Add list of standard actions to fitter. Now : AmplEstimate action and Minuit minimizer with "MIGRAD 500 1" command.
Definition at line 731 of file TGo4Fitter.cxx.
References AddAmplEstimation(), and TGo4FitterAbstract::AddSimpleMinuit().
Referenced by BuildFitter(), TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::CreateFitterFor(), GetNumComp(), and TGo4Fitter().
void TGo4Fitter::AssignModelTo | ( | const char * | ModelName, |
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 amplitude of this component in data, to which model was assigned first. By default, this ratio is 1. and not fixed.
Definition at line 467 of file TGo4Fitter.cxx.
References TGo4FitModel::AssignToData(), TGo4FitModel::ClearAssignments(), FindModel(), GetData(), GetNumData(), and TGo4FitterAbstract::SetParsListChange().
Referenced by TGo4FitPanel::Cmd_AssignModelToAllData(), TGo4FitPanel::Cmd_AssignModelToData(), GetNumModel(), TGo4FitPanel::Wiz_ModelList_itemChanged(), and TGo4FitPanel::Wiz_ModelListSelect().
|
protected |
Definition at line 591 of file TGo4Fitter.cxx.
References TGo4FitModel::BeforeEval(), TGo4FitData::BuffersAllocated(), TGo4FitModel::EvaluateAtPoint(), TGo4FitComponent::GetAmplValue(), TGo4FitData::GetBinsDevs(), TGo4FitData::GetBinsResult(), TGo4FitData::GetBinsSize(), TGo4FitData::GetBinsValues(), GetData(), GetMemoryUsage(), GetModel(), GetNumData(), GetNumModel(), TGo4FitModel::GetRatioValueFor(), TGo4FitModel::IsAssignTo(), TGo4FitData::MakeIter(), PointFitFunction(), and RebuildAll().
Referenced by CalculateFitFunction(), and DoCalculation().
Double_t TGo4Fitter::CalculateFitFunction | ( | Double_t * | pars = nullptr , |
Int_t | FitFunctionType = -1 , |
||
const char * | DataName = nullptr |
||
) |
Calculate value of fit function for given set of parameters and specified type of fit function (it can not correspond to minimized fit function type). If DataName not specified (default), fitfunction calculates for all data objects.
Definition at line 652 of file TGo4Fitter.cxx.
References CalculateFCN(), TGo4FitterAbstract::ExecuteDependencies(), FindData(), GetFitFunctionType(), and TGo4FitParsList::SetParsValues().
Referenced by GetNumComp().
Int_t TGo4Fitter::CalculateNDF | ( | const char * | DataName = nullptr | ) |
Calculates number of degree of freedom (NDF). If DataName not specified (default), NDF calculates for all data objects. NDF defined as total number of bins in data object minus number of variable parameters.
Definition at line 665 of file TGo4Fitter.cxx.
References TGo4FitData::DefineBinsSize(), FindData(), GetData(), GetModel(), GetNumData(), GetNumModel(), TGo4FitModel::IsAssignTo(), and TGo4FitParsList::NumFreePars().
Referenced by DoNDFCalculation(), and GetNumComp().
Double_t TGo4Fitter::CalculatesIntegral | ( | const char * | DataName, |
const char * | ModelName = nullptr , |
||
Bool_t | OnlyCounts = kFALSE |
||
) |
Calculates integral for data or model (if ModelName is specified) if OnlyCounts specified, only sum of values in bins position are calculated
Definition at line 894 of file TGo4Fitter.cxx.
References TGo4FitModel::AfterEval(), TGo4FitModel::BeforeEval(), TGo4FitModel::EvaluateAtPoint(), FindData(), FindModel(), TGo4FitComponent::GetAmplValue(), TGo4FitModel::GetRatioValueFor(), and TGo4FitData::MakeIter().
Referenced by CalculatesModelIntegral(), TGo4FitPanel::FillParsTable(), GetNumComp(), TGo4FitPanel::UpdateWizStackWidget(), and TGo4FitPanel::Wiz_GetModelInfo().
Double_t TGo4Fitter::CalculatesModelIntegral | ( | const char * | ModelName, |
Bool_t | OnlyCounts = kFALSE |
||
) |
Calculates integral of model (if ModelName is specified) if OnlyCounts specified, only sum of values in bins position are calculated
Definition at line 927 of file TGo4Fitter.cxx.
References TGo4FitModel::AssignmentName(), CalculatesIntegral(), and FindModel().
Referenced by TGo4FitPanel::FillParsTable(), and GetNumComp().
Bool_t TGo4Fitter::CalculatesMomentums | ( | const char * | DataName, |
Bool_t | UseRanges, | ||
Bool_t | SubstractModels, | ||
Double_t & | first, | ||
Double_t & | second | ||
) |
Calculates first and second momentum for specified data Usage of ranges and subtraction of model can be specified
Definition at line 813 of file TGo4Fitter.cxx.
References TGo4FitModel::AfterEval(), TGo4FitModel::BeforeEval(), TGo4FitModel::EvaluateAtPoint(), FindData(), TGo4FitComponent::GetAmplValue(), GetModel(), GetNumModel(), TGo4FitModel::GetRatioValueFor(), TGo4FitModel::IsAssignTo(), and TGo4FitData::MakeIter().
Referenced by GetNumComp(), and TGo4FitPanel::LocateModel().
void TGo4Fitter::ChangeDataNameInAssignments | ( | const char * | oldname, |
const char * | newname | ||
) |
Change data name in model component assignments. This function should be used, if data name is changing out of the fitter.
Definition at line 494 of file TGo4Fitter.cxx.
References TGo4FitModel::ChangeDataNameInAssignments(), GetModel(), and GetNumModel().
Referenced by TGo4FitPanel::ChangeObjectName(), GetNumModel(), and TGo4FitPanel::Wiz_DataList_doubleClicked().
|
private |
Definition at line 161 of file TGo4Fitter.cxx.
References TGo4FitSlot::ClearConnectionToSlot(), TGo4FitSlotList::ClearSlot(), TGo4FitSlot::GetConnectedSlot(), TGo4FitSlotList::GetSlot(), and TGo4FitSlotList::NumSlots().
Referenced by RemoveData(), and RemoveModel().
|
override |
Remove all data, all models and all actions
Definition at line 97 of file TGo4Fitter.cxx.
References TGo4FitterAbstract::Clear(), DeleteAllData(), and DeleteAllModels().
Referenced by TGo4FitterEnvelope::Clear(), TGo4FitPanel::Cmd_ClearFitter(), and GetMemoryUsage().
void TGo4Fitter::ClearModelAssignmentTo | ( | const char * | ModelName, |
const char * | DataName = nullptr |
||
) |
Remove assignment to given data (if exists). If DataName == nullptr, all assignments will be cleared.
Definition at line 482 of file TGo4Fitter.cxx.
References TGo4FitModel::ClearAssignments(), TGo4FitModel::ClearAssignmentTo(), FindModel(), and TGo4FitterAbstract::SetParsListChange().
Referenced by GetNumModel(), TGo4FitPanel::Wiz_ModelList_itemChanged(), and TGo4FitPanel::Wiz_ModelListSelect().
TGo4FitModel * TGo4Fitter::CloneModel | ( | const char * | ModelName, |
const char * | NewName = nullptr |
||
) |
Clones specified model.
Definition at line 391 of file TGo4Fitter.cxx.
References AddModel(), and FindModel().
Referenced by TGo4FitPanel::Cmd_CloneModel(), GetNumModel(), and TGo4FitPanel::Wiz_CloneModelBtn_clicked().
|
overrideprotectedvirtual |
Should collect parameters from all associated to fitter objects. This function should be extend in inherited classes.
Reimplemented from TGo4FitterAbstract.
Definition at line 80 of file TGo4Fitter.cxx.
References TGo4FitModel::AssignmentName(), TGo4FitterAbstract::CollectAllPars(), TGo4FitComponent::CollectParsTo(), FindData(), GetData(), GetModel(), GetNumData(), GetNumModel(), and TGo4FitModel::NumAssigments().
TObject * TGo4Fitter::CreateDrawObject | ( | const char * | ObjName, |
const char * | DataName, | ||
Bool_t | IsModel = kFALSE , |
||
const char * | ModelName = nullptr |
||
) |
Create object (TH1 or TGraph), which can be drawn. Object can contain data bins (IsModel = kFALSE), full data model (IsModel = kTRUE, ModelName = nullptr) or specific model component (IsModel = kTRUE, ModelName specify component name)
Definition at line 935 of file TGo4Fitter.cxx.
References TGo4FitModel::AfterEval(), TGo4FitModel::BeforeEval(), TGo4FitModel::EvaluateAtPoint(), FindData(), FindModel(), TGo4FitComponent::GetAmplValue(), TGo4FitModel::GetGroupIndex(), GetModel(), GetNumModel(), TGo4FitModel::GetRatioValueFor(), TGo4FitModel::IsAssignTo(), and TGo4FitData::MakeIter().
Referenced by TGo4FitPanel::Button_FitterDraw(), Draw(), Example8(), Example9(), and GetNumComp().
|
protected |
Definition at line 749 of file TGo4Fitter.cxx.
References TGo4FitData::BuffersAllocated().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
void TGo4Fitter::DeleteAllData | ( | ) |
Delete all data objects from fitter.
Definition at line 192 of file TGo4Fitter.cxx.
References fxDatas, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by Clear(), TGo4FitPanel::Cmd_DeleteAllData(), GetNumData(), and TGo4FitPanel::Wiz_RebuildDataList().
void TGo4Fitter::DeleteAllModels | ( | ) |
Delete all model objects from fitter.
Definition at line 459 of file TGo4Fitter.cxx.
References fxModels, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by TGo4FitPanel::Button_SimpleClear(), Clear(), TGo4FitPanel::Cmd_DeleteModels(), and GetNumModel().
void TGo4Fitter::DeleteModelsAssosiatedTo | ( | const char * | DataName | ) |
Remove models associated with specific data.
Definition at line 440 of file TGo4Fitter.cxx.
References TGo4FitModel::ClearAssignmentTo(), fxModels, GetModel(), GetNumModel(), TGo4FitModel::IsAssignTo(), TGo4FitModel::NumAssigments(), TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by TGo4FitPanel::Cmd_DeleteAssosiatedModels(), TGo4FitPeakFinder::DoAction(), and GetNumModel().
|
overrideprotectedvirtual |
Calculates value of fit function according current values of parameters. Should be implemented in inherited classes.
Reimplemented from TGo4FitterAbstract.
Definition at line 687 of file TGo4Fitter.cxx.
References CalculateFCN(), and fiFitFunctionType.
|
overrideprotectedvirtual |
Calculates number of dimensions of freedom; Should be implemented in inherited classes.
Reimplemented from TGo4FitterAbstract.
Definition at line 692 of file TGo4Fitter.cxx.
References CalculateNDF().
|
override |
Draw fitter on current canvas. As options, data name(s) or component name(s) should be specified, separated by commas. For instance: Draw("data1") - draw data object with name "data1" and it's full model Draw("data1,Gauss1,Gauss2") - draw data object "data1", full model and model components with names "Gauss1" and "Gauss2" All objects is created via CreateDrawObject() method and stored in internal list. They will be moved to ROOT when fitter will be destroyed.
Definition at line 1076 of file TGo4Fitter.cxx.
References CreateDrawObject(), FindModel(), fxDrawObjs, GetData(), GetDataName(), GetModel(), GetNumData(), GetNumModel(), TGo4FitModel::IsAssignTo(), MoveDrawObjectsToROOT(), and TGo4FitNamed::SetOwner().
Referenced by Example1(), Example10(), Example11(), Example12(), Example13(), Example2(), Example4(), Example5(), Example6(), Example7(), and GetNumComp().
void TGo4Fitter::EstimateAmplitudes | ( | Int_t | NumIters = 1 | ) |
Estimate amplitude of all model components. This routine typically should be executed before general minimization routine. To obtain good estimation of amplitudes, rest model parameters (like position and widths) should has good estimation, otherwise amplitude estimation routine gives unacceptable values.
Definition at line 720 of file TGo4Fitter.cxx.
References TGo4FitAmplEstimation::DoAction().
Referenced by GetNumComp().
|
overridevirtual |
Collect all TGo4FitSlot objects, situated in fitter, data and models to givven TObjArray.
Reimplemented from TGo4FitSlotList.
Definition at line 737 of file TGo4Fitter.cxx.
References TGo4FitSlotList::FillSlotList(), GetComp(), and GetNumComp().
Referenced by GetNumComp().
|
overrideprotectedvirtual |
Finalize fitter data. Called during Finalize() method. Should be reimplemented in derived classes.
Reimplemented from TGo4FitterAbstract.
Definition at line 541 of file TGo4Fitter.cxx.
References TGo4FitData::Finalize(), TGo4FitModel::Finalize(), GetData(), GetModel(), GetNumData(), and GetNumModel().
TGo4FitData * TGo4Fitter::FindData | ( | const char * | DataName | ) |
Return data object with given name. if no corresponding objects, return 0.
Definition at line 114 of file TGo4Fitter.cxx.
References fxDatas.
Referenced by CalculateFitFunction(), CalculateNDF(), CalculatesIntegral(), CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4FitPanel::ChangeObjectName(), TGo4FitPanel::Cmd_AddRangeCondition(), CollectAllPars(), CreateDrawObject(), TGo4FitPeakFinder::DoAction(), Example6(), FindNextName(), TGo4FitPanel::FindPadWhereModel(), GetNumData(), TGo4FitPanel::LocateModel(), RemoveData(), SetGraph(), SetH1(), TGo4FitPanel::ShowItemAsGraph(), TGo4FitPanel::UpdateWizPaint(), TGo4FitPanel::Wiz_DataList_doubleClicked(), and TGo4FitPanel::Wiz_SelectedData().
TGo4FitModel * TGo4Fitter::FindModel | ( | const char * | ModelName | ) |
Return model component with given name. If no such model name exists, return 0.
Definition at line 205 of file TGo4Fitter.cxx.
References fxModels.
Referenced by AddPolynoms(), AddPolynomX(), AssignModelTo(), CalculatesIntegral(), CalculatesModelIntegral(), TGo4FitPanel::ChangeObjectName(), ClearModelAssignmentTo(), CloneModel(), CreateDrawObject(), Draw(), FindNextName(), GetNumModel(), RemoveModel(), TXXXCalibPar::TXXXCalibPar(), TXXXCalibPar::UpdateFrom(), TGo4FitPanel::Wiz_ModelList_doubleClicked(), and TGo4FitPanel::Wiz_SelectedModel().
TString TGo4Fitter::FindNextName | ( | const char * | Head, |
Int_t | start, | ||
Bool_t | isModel = kTRUE |
||
) |
Definition at line 1315 of file TGo4Fitter.cxx.
References TGo4FitSlotList::CheckDuplicatesOnSlot(), FindData(), FindModel(), TGo4FitSlotList::PrepareSlotsForWriting(), TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by TGo4FitPanel::CreateData(), TGo4FitPanel::CreateDataFor(), TGo4FitPanel::CreateModel(), GetNumComp(), TGo4FitPeakFinder::HansEsselPeakFinder(), TGo4FitPeakFinder::ROOTPeakFinder(), and TGo4FitPeakFinder::SergeyLinevPeakFinder().
TGo4FitComponent * TGo4Fitter::GetComp | ( | Int_t | n | ) |
Return TGo4FitComponent object with given index. If index < GetNumData() return data object, else return model component. If index not valid, return 0.
Definition at line 227 of file TGo4Fitter.cxx.
References GetData(), GetModel(), and GetNumData().
Referenced by FillSlotList(), and GetNumComp().
TGo4FitData * TGo4Fitter::GetData | ( | Int_t | n | ) |
Return data object with given index. If index out of valid range, return 0.
Definition at line 104 of file TGo4Fitter.cxx.
References fxDatas.
Referenced by AssignModelTo(), TGo4FitPanel::Button_FitterDraw(), TGo4FitPanel::Button_PeakFinder(), TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::Button_SimpleFit(), CalculateFCN(), CalculateNDF(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), CollectAllPars(), TGo4FitPanel::CreateModel(), Draw(), QFitterWidget::FillSpecificData(), FinalizeFitterData(), GetComp(), GetDataName(), GetNumData(), InitFitterData(), TGo4FitPanel::PaintFitter(), RebuildAll(), TGo4FitPanel::UpdateItem(), TGo4FitPanel::UpdateWizDataList(), and TGo4FitPanel::Wiz_TakeCurrentRange().
|
protected |
Definition at line 764 of file TGo4Fitter.cxx.
References TGo4FitData::GetBinsDevs().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
protected |
Definition at line 769 of file TGo4Fitter.cxx.
References TGo4FitData::GetBinsResult().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
protected |
Definition at line 754 of file TGo4Fitter.cxx.
References TGo4FitData::GetBinsSize().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
protected |
Definition at line 759 of file TGo4Fitter.cxx.
References TGo4FitData::GetBinsValues().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
const char * TGo4Fitter::GetDataName | ( | Int_t | n | ) |
Return name of data object with given index. If index not valid, return 0.
Definition at line 109 of file TGo4Fitter.cxx.
References GetData().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitPanel::Cmd_AssignModelToData(), Draw(), TGo4FitPanel::FillPopupForItem(), GetNumData(), and TGo4FitPanel::UpdateWizDataList().
|
inline |
Return type of fitted function. For possible values see SetFitFunctionType() method.
Definition at line 85 of file TGo4Fitter.h.
References fiFitFunctionType.
Referenced by CalculateFitFunction(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), QFitterWidget::FillSpecificData(), and TGo4FitPanel::UpdateWizStackWidget().
|
inline |
Return value of memory usage parameter. See SetMemoryUsage for detailed description.
Definition at line 113 of file TGo4Fitter.h.
References Clear(), and fiMemoryUsage.
Referenced by CalculateFCN(), and InitFitterData().
TGo4FitModel * TGo4Fitter::GetModel | ( | Int_t | n | ) |
Return model component with given index. If index out of valid range, return 0.
Definition at line 200 of file TGo4Fitter.cxx.
References fxModels.
Referenced by TGo4FitPanel::Button_FitterDraw(), CalculateFCN(), CalculateNDF(), CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), ChangeDataNameInAssignments(), CollectAllPars(), CreateDrawObject(), DeleteModelsAssosiatedTo(), Draw(), TGo4FitPanel::FillParsTable(), QFitDataWidget::FillSpecificData(), QFitterWidget::FillSpecificData(), FinalizeFitterData(), GetComp(), GetNumModel(), InitFitterData(), NumModelsAssosiatedTo(), TGo4FitPanel::PaintModelsFor(), RebuildAll(), TGo4FitPanel::UpdateItem(), TGo4FitPanel::UpdateWizModelsList(), and TGo4FitPanel::UpdateWizStackWidget().
|
protected |
Definition at line 774 of file TGo4Fitter.cxx.
References TGo4FitModel::GetModelBins().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
inline |
Return total number of TGo4FitComponent (data and model) objects in fitter. This is just a sum GetNumData()+GetNumModel().
Definition at line 281 of file TGo4Fitter.h.
References AddAmplEstimation(), AddStandardActions(), CalculateFitFunction(), CalculateNDF(), CalculatesIntegral(), CalculatesModelIntegral(), CalculatesMomentums(), CreateDrawObject(), Draw(), EstimateAmplitudes(), FillSlotList(), FindNextName(), GetComp(), GetNumData(), GetNumModel(), Print(), PrintAmpls(), PrintLines(), and ProvideLastDrawObjects().
Referenced by FillSlotList(), and PrintAmpls().
|
inline |
Return number of data objects in fitter.
Definition at line 123 of file TGo4Fitter.h.
References AddData(), AddGraph(), AddH1(), DeleteAllData(), FindData(), fxDatas, GetData(), GetDataName(), RemoveData(), SetGraph(), and SetH1().
Referenced by AssignModelTo(), TGo4FitPanel::Button_FitterDraw(), TGo4FitPanel::Button_SimpleFit(), CalculateFCN(), CalculateNDF(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), CollectAllPars(), TGo4FitPanel::CreateModel(), Draw(), TGo4FitPanel::FillPopupForItem(), QFitterWidget::FillSpecificData(), FinalizeFitterData(), GetComp(), GetNumComp(), InitFitterData(), TGo4FitPanel::PaintFitter(), RebuildAll(), TGo4FitPanel::UpdateItem(), TGo4FitPanel::UpdateStatusBar(), TGo4FitPanel::UpdateWizDataList(), TGo4FitPanel::Wiz_RebuildDataList(), and TGo4FitPanel::Wiz_TakeCurrentRange().
|
inline |
Return number of model component in fitter.
Definition at line 178 of file TGo4Fitter.h.
References AddGauss1(), AddModel(), AddPolynoms(), AddPolynomX(), AssignModelTo(), ChangeDataNameInAssignments(), ClearModelAssignmentTo(), CloneModel(), DeleteAllModels(), DeleteModelsAssosiatedTo(), FindModel(), fxModels, GetModel(), NumModelsAssosiatedTo(), and RemoveModel().
Referenced by TGo4FitPanel::Button_FitterDraw(), CalculateFCN(), CalculateNDF(), CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), ChangeDataNameInAssignments(), CollectAllPars(), CreateDrawObject(), DeleteModelsAssosiatedTo(), Draw(), TGo4FitPanel::FillParsTable(), QFitDataWidget::FillSpecificData(), QFitterWidget::FillSpecificData(), FinalizeFitterData(), GetNumComp(), InitFitterData(), NumModelsAssosiatedTo(), TGo4FitPanel::PaintModelsFor(), PrintLines(), RebuildAll(), TGo4FitPanel::UpdateItem(), TGo4FitPanel::UpdateStatusBar(), TGo4FitPanel::UpdateWizModelsList(), and TGo4FitPanel::UpdateWizStackWidget().
|
overrideprotectedvirtual |
Initialize fitter data. Called during Initialize() method. Should be reimplemented in derived classes.
Reimplemented from TGo4FitterAbstract.
Definition at line 500 of file TGo4Fitter.cxx.
References TGo4FitModel::ConnectToDataIfAssigned(), ff_least_squares, ff_user, fiFitFunctionType, fxUserFitFunction, GetData(), GetMemoryUsage(), GetModel(), GetNumData(), GetNumModel(), TGo4FitData::Initialize(), and TGo4FitModel::Initialize().
|
protected |
Definition at line 744 of file TGo4Fitter.cxx.
References TGo4FitModel::BuffersAllocated().
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
private |
Definition at line 1305 of file TGo4Fitter.cxx.
References fxDrawObjs.
Referenced by Draw(), and ~TGo4Fitter().
Int_t TGo4Fitter::NumModelsAssosiatedTo | ( | const char * | DataName | ) |
Counts models associated with specific data.
Definition at line 431 of file TGo4Fitter.cxx.
References GetModel(), GetNumModel(), and TGo4FitModel::IsAssignTo().
Referenced by GetNumModel().
|
protected |
Definition at line 550 of file TGo4Fitter.cxx.
References ff_chi_gamma, ff_chi_Neyman, ff_chi_Pearson, ff_chi_square, ff_least_squares, ff_ML_Poisson, ff_user, and fxUserFitFunction.
Referenced by CalculateFCN().
|
override |
Print containment of fitter. If option = "**", print also containment of all associated objects like histogram, calibrations and so on.
Definition at line 779 of file TGo4Fitter.cxx.
References ff_chi_gamma, ff_chi_Neyman, ff_chi_Pearson, ff_chi_square, ff_ML_Poisson, ff_user, fiFitFunctionType, fxDatas, fxModels, TGo4FitterAbstract::Print(), PrintAmpls(), PrintLines(), TGo4FitParsList::PrintPars(), and TGo4FitterAbstract::PrintResults().
Referenced by Example10(), Example11(), Example12(), Example13(), Example2(), Example4(), Example5(), Example7(), Example8(), and GetNumComp().
void TGo4Fitter::PrintAmpls | ( | ) | const |
Print value of all amplitude parameters.
Definition at line 1242 of file TGo4Fitter.cxx.
References TGo4FitComponent::GetAmplError(), TGo4FitComponent::GetAmplFullName(), TGo4FitComponent::GetAmplPar(), TGo4FitComponent::GetAmplValue(), and GetNumComp().
Referenced by GetNumComp(), and Print().
void TGo4Fitter::PrintLines | ( | ) | const |
Print amplitude, position and width for each model components
Definition at line 1253 of file TGo4Fitter.cxx.
References TGo4FitComponent::GetAmplValue(), GetNumModel(), TGo4FitModel::GetPosition(), and TGo4FitModel::GetWidth().
Referenced by GetNumComp(), TYYYParameter::Print(), Print(), and TXXXCalibPar::UpdateFrom().
void TGo4Fitter::ProvideLastDrawObjects | ( | TObjArray & | lst | ) |
Copy pointer on drawn object after last command to specified TObjArray. From this moment user should take care about proper destroying of this objects.
Definition at line 1296 of file TGo4Fitter.cxx.
References fxDrawObjs.
Referenced by GetNumComp().
|
protected |
Update all data objects and model components according to current parameters values. Only those objects will be recalculated, which parameters were changed after last recalculation. If ForceBuild flag is set (default = kFALSE), all objects will be recalculated anyway.
Definition at line 697 of file TGo4Fitter.cxx.
References TGo4FitModel::AddModelToDataResult(), TGo4FitData::BuffersAllocated(), TGo4FitData::GetBinsResult(), TGo4FitData::GetBinsSize(), GetData(), GetModel(), GetNumData(), GetNumModel(), TGo4FitModel::IsAssignTo(), and TGo4FitModel::RebuildShape().
Referenced by CalculateFCN(), and TGo4FitAmplEstimation::CalculateWithBuffers().
TGo4FitData * TGo4Fitter::RemoveData | ( | const char * | DataName, |
Bool_t | IsDel = kFALSE |
||
) |
Remove data object from fitter. If IsDel flag is set, object will be destroyed, otherwise (by default) function return pointer on this object.
Definition at line 175 of file TGo4Fitter.cxx.
References CheckSlotsBeforeDelete(), FindData(), fxDatas, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by TGo4FitPanel::Cmd_DeleteData(), GetNumData(), and TGo4FitPanel::Wiz_RemoveData().
TGo4FitModel * TGo4Fitter::RemoveModel | ( | const char * | ModelName, |
Bool_t | IsDel = kFALSE |
||
) |
Remove model component from fitter. If IsDel flag specified, component is delete, otherwise (by default) function return pointer on this model component.
Definition at line 414 of file TGo4Fitter.cxx.
References CheckSlotsBeforeDelete(), FindModel(), fxModels, TGo4FitterAbstract::SetParsListChange(), and TGo4FitSlotList::SetUpdateSlotList().
Referenced by TGo4FitPanel::Cmd_RemoveModel(), GetNumModel(), and TGo4FitPanel::Wiz_DelModelBtn_clicked().
|
inline |
Set fitted function type for minimization. Possible values are: TGo4Fitter:ff_least_squares = 0 sum of difference squares between model and data; TGo4Fitter:ff_chi_square = 1 standard chi-square sum TGo4Fitter:ff_chi_Pearson = 2 Pearson chi-square for Poisson statistic TGo4Fitter:ff_chi_Neyman = 3 modified Neyman chi-square for Poisson statistic TGo4Fitter:ff_chi_gamma = 4 modified chi-square for Poisson statistic TGo4Fitter:ff_ML_Poisson = 5 -2Ln from maximum likelihood function for Poisson statistic TGo4Fitter:ff_user = 6 user function User function type should not be specified directly, but using SetUserFitFunction() method. More information about fit function types can be found in Go4Fit tutorial.
Definition at line 80 of file TGo4Fitter.h.
References fiFitFunctionType.
Referenced by TGo4FitPanel::CreateFitterFor(), QFitterWidget::FitFunctionTypeCmb_activated(), TGo4Fitter(), and TGo4FitPanel::Wiz_FitFuncCmb_activated().
TGo4FitDataGraph * TGo4Fitter::SetGraph | ( | const char * | DataName, |
TGraph * | gr, | ||
Bool_t | Owned = kFALSE |
||
) |
Set graph to existing TGo4FitDataGraph object
Definition at line 153 of file TGo4Fitter.cxx.
References FindData(), and TGo4FitDataGraph::SetGraph().
Referenced by GetNumData().
TGo4FitDataHistogram * TGo4Fitter::SetH1 | ( | const char * | DataName, |
TH1 * | histo, | ||
Bool_t | Owned = kFALSE |
||
) |
Set histogram to existing TGo4FitDataHistogram object
Definition at line 136 of file TGo4Fitter.cxx.
References FindData(), and TGo4FitDataHistogram::SetHistogram().
Referenced by GetNumData(), and TXXXCalibPar::SetCalibSpectrum().
void TGo4Fitter::SetMemoryUsage | ( | Int_t | iMemoryUsage | ) |
Set value of memory usage. This parameter can be: 0 - no additional memory will be allocated in buffers 1 - buffers will be allocated only for data objects 2 - buffers will be used for all data and models objects 3 - individual setup for data and model objects will be used for memory allocations
Definition at line 70 of file TGo4Fitter.cxx.
References fiMemoryUsage.
Referenced by BuildFitter(), TGo4FitPanel::Button_PeakFinder(), TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::Button_SimpleFit(), TGo4FitPanel::CreateFitterFor(), Example13(), Example8(), and SetUserFitFunction().
|
inline |
Set user-defined fitted function. Function should be global and has following signature: Double_t (TUserFitFunction)(Int_t, Double_t, Double_t*) First parameter - number of points, Second - array of data points, Third - array of model points. Function should return value, which will be MINIMIZED by fitter. If necessary maximization, fit function should return negative value.
Definition at line 97 of file TGo4Fitter.h.
References ff_user, fiFitFunctionType, fxUserFitFunction, and SetMemoryUsage().
|
friend |
Definition at line 385 of file TGo4Fitter.h.
Referenced by AddAmplEstimation().
|
protected |
Defines type of fitted function.
Definition at line 428 of file TGo4Fitter.h.
Referenced by DoCalculation(), GetFitFunctionType(), InitFitterData(), Print(), SetFitFunctionType(), and SetUserFitFunction().
|
protected |
Defines use of memory during actions executions.
Definition at line 433 of file TGo4Fitter.h.
Referenced by GetMemoryUsage(), and SetMemoryUsage().
|
protected |
Container for data objects.
Definition at line 418 of file TGo4Fitter.h.
Referenced by AddData(), DeleteAllData(), FindData(), GetData(), GetNumData(), Print(), RemoveData(), and TGo4Fitter().
|
private |
Definition at line 445 of file TGo4Fitter.h.
Referenced by Draw(), MoveDrawObjectsToROOT(), and ProvideLastDrawObjects().
|
protected |
Container for model components.
Definition at line 423 of file TGo4Fitter.h.
Referenced by AddModel(), DeleteAllModels(), DeleteModelsAssosiatedTo(), FindModel(), GetModel(), GetNumModel(), Print(), RemoveModel(), and TGo4Fitter().
|
private |
Pointer on user fit function.
Definition at line 443 of file TGo4Fitter.h.
Referenced by InitFitterData(), PointFitFunction(), and SetUserFitFunction().