Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4FitComponent Class Reference

Basic absrtact class, combining common properties of data and model. More...

#include <TGo4FitComponent.h>

Inheritance diagram for TGo4FitComponent:

TGo4FitParsList TGo4FitSlotList TGo4FitNamed TGo4FitData TGo4FitModel TGo4FitDataGraph TGo4FitDataHistogram TGo4FitDataProfile TGo4FitDataRidge TGo4FitModelFormula TGo4FitModelFromData TGo4FitModelFunction TGo4FitModelGauss1 TGo4FitModelGauss2 TGo4FitModelGaussN TGo4FitModelPolynom TModelTemplate List of all members.

Public Member Functions

 TGo4FitComponent ()
 Default constructor.
 TGo4FitComponent (const char *iName, const char *iTitle)
 Creates TGo4FitComponent object.
virtual ~TGo4FitComponent ()
 Destroys TGo4FitComponent object.
TGo4FitParameterGetAmplPar ()
 Return ampltide parameter object.
const char * GetAmplName ()
 Returns name of amplitude parameter.
const char * GetAmplFullName ()
 Returns full name of amplitude parameter.
Double_t GetAmplValue ()
 Return value of amplitude parameter.
void SetAmplValue (Double_t iAmpl)
 Set value of amplitude parameter.
Double_t GetAmplError ()
 Return error of amplitude parameter.
void SetAmplError (Double_t iError)
 Set error of amplitude parameter.
Bool_t MakeAmpl (Bool_t isFixed=kFALSE)
 Create amplitude parameter and adds it to parameters list.
Bool_t RemoveAmpl ()
 Remove amplitude parameter from parameters list.
virtual Bool_t CanAmplTouch ()
 Signals, if amplitude parameter can be removed from or introduced to object.
void SetRange (Int_t naxis, Double_t min, Double_t max)
 Includes axis range in consideration.
void ExcludeRange (Int_t naxis, Double_t min, Double_t max)
 Exclude axis range from consideration.
void SetRangeMin (Int_t naxis, Double_t value)
 Set minimum axis value, taken into consideration.
void SetRangeMax (Int_t naxis, Double_t value)
 Set maximum axis value, taken into consideration.
void AddRangeCut (TCutG *cut, Bool_t exclude=kFALSE)
 Add TCutG object as range condition for two-dimensional case.
void ClearRanges (Int_t naxis=-1)
 Clear all range conditions for given axis.
Bool_t IsAnyRangeLimits ()
 Return kTRUE, if any range conditions were introduced.
Bool_t GetRangeMin (Int_t naxis, Double_t &value)
 Defines minimum allowed value for given range.
Bool_t GetRangeMax (Int_t naxis, Double_t &value)
 Defines maximum allowed value for given range.
Int_t GetNumRangeCondition () const
 Returns number of range condition (exclude range cuts).
void GetRangeCondition (Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
 Return value for specified range condition.
void SetRangeCondition (Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
 Change specified range condition.
void AddRangeCondition (Int_t typ, Int_t naxis, Double_t left, Double_t right)
 Add new range condition.
void RemoveRangeCondition (Int_t n)
 Removes specified range condition.
Int_t GetNumRangeCut () const
 Returns number of range cuts, assigned to object.
TCutG * GetRangeCut (Int_t n) const
 Returns specified range cut.
Bool_t IsRangeCutExcluding (Int_t n)
 Return kTRUE if cut eclude range.
void SetRangeCutExcluding (Int_t n, Bool_t exclude=kTRUE)
 Set type of range cut (excluding or including).
void RemoveRangeCut (Int_t n)
 Delete range cut with specified index.
Bool_t CheckRangeConditions (const Double_t *values, Int_t numaxis)
 Check all range conditions for specified point.
virtual void CollectParsTo (TGo4FitParsList &list)
 Collect all parameters to provided parameters list object.
void SetUseBuffers (Bool_t iUse)
 Sets usage of additional buffers.
Bool_t GetUseBuffers ()
 Returns flag of usage of additional buffers.
virtual void Print (Option_t *option) const
 Print info about object on standard output.

Protected Member Functions

TGo4FitParameterNewParameter (const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
 Create new parameter with provided properties and add to parameters list.
TGo4FitParameterNewAmplitude (const char *Name=0, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
 Create amplitude parameter with specified properties.
Int_t GetAmplIndex ()
 Returns index of amplitude parameter.
void SetAmplIndex (Int_t iAmplIndex=-1)
 Set index of amplitude parameter.

Private Attributes

TArrayI fxRangeAxis
 Array for range conditions storage (axis indexes).
TArrayD fxRangeValue
 Array for range values storaging.
TObjArray fxCuts
 Array of TCutG objects, used for range selection.
Int_t fiAmplIndex
 Index of amplitude parameter (-1 if none).
Bool_t fbUseBuffers
 Specify usage of buffers after initialization.

Detailed Description

Basic absrtact class, combining common properties of data and model.

Definition at line 31 of file TGo4FitComponent.h.


Constructor & Destructor Documentation

TGo4FitComponent::TGo4FitComponent  ) 
 

Default constructor.

Definition at line 25 of file TGo4FitComponent.cxx.

TGo4FitComponent::TGo4FitComponent const char *  iName,
const char *  iTitle
 

Creates TGo4FitComponent object.

Definition at line 29 of file TGo4FitComponent.cxx.

References fxCuts.

TGo4FitComponent::~TGo4FitComponent  )  [virtual]
 

Destroys TGo4FitComponent object.

Definition at line 35 of file TGo4FitComponent.cxx.


Member Function Documentation

TGo4FitParameter * TGo4FitComponent::GetAmplPar  ) 
 

Return ampltide parameter object.

If amplitude not exists, return 0.

Definition at line 57 of file TGo4FitComponent.cxx.

References fiAmplIndex, and TGo4FitParsList::GetPar().

Referenced by TGo4FitModel::BeforeEval(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), GetAmplError(), GetAmplFullName(), GetAmplName(), GetAmplValue(), TGo4FitModelFormula::GetNumberOfExprPar(), TGo4FitModelFunction::GetNumberOfFuncPar(), MakeAmpl(), TGo4Fitter::PrintAmpls(), RemoveAmpl(), SetAmplError(), and SetAmplValue().

const char * TGo4FitComponent::GetAmplName  ) 
 

Returns name of amplitude parameter.

If none, return 0.

Definition at line 62 of file TGo4FitComponent.cxx.

References GetAmplPar().

const char * TGo4FitComponent::GetAmplFullName  ) 
 

Returns full name of amplitude parameter.

If none, return 0.

Definition at line 67 of file TGo4FitComponent.cxx.

References GetAmplPar().

Referenced by TGo4Fitter::PrintAmpls().

Double_t TGo4FitComponent::GetAmplValue  ) 
 

Return value of amplitude parameter.

If none, return 1.

Definition at line 71 of file TGo4FitComponent.cxx.

References GetAmplPar().

Referenced by TGo4FitModel::AddModelToDataResult(), TGo4Fitter::CalculateFCN(), TGo4Fitter::CalculatesIntegral(), TGo4Fitter::CalculatesMomentums(), TGo4FitAmplEstimation::CalculateWithIterators(), TGo4Fitter::CreateDrawObject(), TGo4FitModel::Evaluate(), TGo4FitPeakFinder::HansEsselPeakFinder(), TGo4FitModelGauss1::Integral(), TGo4Fitter::PrintAmpls(), TGo4Fitter::PrintLines(), TGo4FitPeakFinder::ROOTPeakFinder(), and TGo4FitPeakFinder::SergeyLinevPeakFinder().

void TGo4FitComponent::SetAmplValue Double_t  iAmpl  ) 
 

Set value of amplitude parameter.

Definition at line 76 of file TGo4FitComponent.cxx.

References fiAmplIndex, TGo4FitParsList::Get(), and GetAmplPar().

Referenced by TGo4Fitter::AddGauss1(), TGo4Fitter::AddPolynomX(), TGo4FitAmplEstimation::CalculateWithBuffers(), TGo4FitAmplEstimation::CalculateWithIterators(), Example8(), and Example9().

Double_t TGo4FitComponent::GetAmplError  ) 
 

Return error of amplitude parameter.

If none, return 0.

Definition at line 81 of file TGo4FitComponent.cxx.

References GetAmplPar().

Referenced by TGo4Fitter::PrintAmpls().

void TGo4FitComponent::SetAmplError Double_t  iError  ) 
 

Set error of amplitude parameter.

Definition at line 86 of file TGo4FitComponent.cxx.

References fiAmplIndex, TGo4FitParsList::Get(), and GetAmplPar().

Referenced by TGo4FitAmplEstimation::CalculateWithBuffers(), and TGo4FitAmplEstimation::CalculateWithIterators().

Bool_t TGo4FitComponent::MakeAmpl Bool_t  isFixed = kFALSE  ) 
 

Create amplitude parameter and adds it to parameters list.

Typically amplitude is situated in the beggining of parameters list.

Definition at line 91 of file TGo4FitComponent.cxx.

References GetAmplPar(), and NewAmplitude().

Bool_t TGo4FitComponent::RemoveAmpl  ) 
 

Remove amplitude parameter from parameters list.

Definition at line 98 of file TGo4FitComponent.cxx.

References GetAmplIndex(), GetAmplPar(), TGo4FitParsList::RemoveParByIndex(), and SetAmplIndex().

virtual Bool_t TGo4FitComponent::CanAmplTouch  )  [inline, virtual]
 

Signals, if amplitude parameter can be removed from or introduced to object.

Reimplemented in TGo4FitData, TGo4FitModelFormula, and TGo4FitModelFunction.

Definition at line 103 of file TGo4FitComponent.h.

void TGo4FitComponent::SetRange Int_t  naxis,
Double_t  min,
Double_t  max
 

Includes axis range in consideration.

Number of axis and minium and maximum values should be specified.

Definition at line 186 of file TGo4FitComponent.cxx.

References AddRangeCondition().

Referenced by BuildFitter(), Example13(), and Example9().

void TGo4FitComponent::ExcludeRange Int_t  naxis,
Double_t  min,
Double_t  max
 

Exclude axis range from consideration.

Definition at line 190 of file TGo4FitComponent.cxx.

References AddRangeCondition().

void TGo4FitComponent::SetRangeMin Int_t  naxis,
Double_t  value
 

Set minimum axis value, taken into consideration.

All smaller values will be removed from consideration independently from other range conditions.

Definition at line 194 of file TGo4FitComponent.cxx.

References AddRangeCondition().

void TGo4FitComponent::SetRangeMax Int_t  naxis,
Double_t  value
 

Set maximum axis value, taken into consideration.

All lager values will be removed from consideration independently from other range conditions.

Definition at line 198 of file TGo4FitComponent.cxx.

References AddRangeCondition().

void TGo4FitComponent::AddRangeCut TCutG *  cut,
Bool_t  exclude = kFALSE
 

Add TCutG object as range condition for two-dimensional case.

Region, defined by TCutG object, can be included or excluded from consideration according value of exclude flag.

Definition at line 225 of file TGo4FitComponent.cxx.

References fxCuts, and kExcludeCut.

Referenced by Example13().

void TGo4FitComponent::ClearRanges Int_t  naxis = -1  ) 
 

Clear all range conditions for given axis.

If naxis=-1, all range conditions will be removed.

Definition at line 202 of file TGo4FitComponent.cxx.

References fxCuts, fxRangeAxis, and fxRangeValue.

Bool_t TGo4FitComponent::IsAnyRangeLimits  ) 
 

Return kTRUE, if any range conditions were introduced.

Definition at line 221 of file TGo4FitComponent.cxx.

References GetNumRangeCondition(), and GetNumRangeCut().

Referenced by TGo4FitModel::Initialize().

Bool_t TGo4FitComponent::GetRangeMin Int_t  naxis,
Double_t &  value
 

Defines minimum allowed value for given range.

Returns kFALSE, if no range condition were specified for given axis.

Definition at line 257 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, GetNumRangeCut(), GetRangeCut(), and kExcludeCut.

Bool_t TGo4FitComponent::GetRangeMax Int_t  naxis,
Double_t &  value
 

Defines maximum allowed value for given range.

Returns kFALSE, if no range condition were specified for given axis.

Definition at line 280 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, GetNumRangeCut(), GetRangeCut(), and kExcludeCut.

Int_t TGo4FitComponent::GetNumRangeCondition  )  const [inline]
 

Returns number of range condition (exclude range cuts).

Definition at line 160 of file TGo4FitComponent.h.

References fxRangeAxis.

Referenced by CheckRangeConditions(), GetRangeCondition(), IsAnyRangeLimits(), Print(), RemoveRangeCondition(), and SetRangeCondition().

void TGo4FitComponent::GetRangeCondition Int_t  n,
Int_t &  typ,
Int_t &  naxis,
Double_t &  left,
Double_t &  right
const
 

Return value for specified range condition.

Following procedures produces correspondent values: typ=0: SetRange() typ=1: ExcludeRange() typ=2: SetRangeMin() right not defined typ=3: SetRangeMax() left not defined

Definition at line 105 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Referenced by CheckRangeConditions(), TGo4FitGuiArrow::ExecuteEvent(), TGo4FitGuiArrow::Locate(), and Print().

void TGo4FitComponent::SetRangeCondition Int_t  n,
Int_t  typ,
Int_t  naxis,
Double_t  left,
Double_t  right
 

Change specified range condition.

Range condition should already exists before calling of these procedure. For exact meaning of parameters see GetRangeCondition() method.

Definition at line 139 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Referenced by AddRangeCondition(), and TGo4FitGuiArrow::ExecuteEvent().

void TGo4FitComponent::AddRangeCondition Int_t  typ,
Int_t  naxis,
Double_t  left,
Double_t  right
 

Add new range condition.

For exact meaning of parameters see GetRangeCondition() method.

Definition at line 167 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and SetRangeCondition().

Referenced by ExcludeRange(), SetRange(), SetRangeMax(), and SetRangeMin().

void TGo4FitComponent::RemoveRangeCondition Int_t  n  ) 
 

Removes specified range condition.

Definition at line 173 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Int_t TGo4FitComponent::GetNumRangeCut  )  const
 

Returns number of range cuts, assigned to object.

Definition at line 230 of file TGo4FitComponent.cxx.

References fxCuts.

Referenced by CheckRangeConditions(), GetRangeMax(), GetRangeMin(), IsAnyRangeLimits(), and Print().

TCutG * TGo4FitComponent::GetRangeCut Int_t  n  )  const
 

Returns specified range cut.

Definition at line 234 of file TGo4FitComponent.cxx.

References fxCuts.

Referenced by CheckRangeConditions(), GetRangeMax(), GetRangeMin(), IsRangeCutExcluding(), Print(), RemoveRangeCut(), and SetRangeCutExcluding().

Bool_t TGo4FitComponent::IsRangeCutExcluding Int_t  n  ) 
 

Return kTRUE if cut eclude range.

Definition at line 238 of file TGo4FitComponent.cxx.

References GetRangeCut(), and kExcludeCut.

void TGo4FitComponent::SetRangeCutExcluding Int_t  n,
Bool_t  exclude = kTRUE
 

Set type of range cut (excluding or including).

Definition at line 243 of file TGo4FitComponent.cxx.

References GetRangeCut(), and kExcludeCut.

void TGo4FitComponent::RemoveRangeCut Int_t  n  ) 
 

Delete range cut with specified index.

Definition at line 248 of file TGo4FitComponent.cxx.

References fxCuts, and GetRangeCut().

Bool_t TGo4FitComponent::CheckRangeConditions const Double_t *  values,
Int_t  numaxis
 

Check all range conditions for specified point.

Definition at line 304 of file TGo4FitComponent.cxx.

References GetNumRangeCondition(), GetNumRangeCut(), GetRangeCondition(), GetRangeCut(), and kExcludeCut.

Referenced by TGo4FitData::ApplyRangesForModelMask(), TGo4FitDataIter::CheckPointForRange(), and TGo4FitModel::EvaluateAtPoint().

void TGo4FitComponent::CollectParsTo TGo4FitParsList list  )  [virtual]
 

Collect all parameters to provided parameters list object.

Not only parameters of TGo4FitComponent copies to list. All parameters, which are situated in incpsulated objects, also will be copied to this list.

Reimplemented from TGo4FitParsList.

Definition at line 359 of file TGo4FitComponent.cxx.

References TGo4FitParsList::CollectParsTo(), TGo4FitSlot::GetObject(), TGo4FitSlot::GetOwned(), TGo4FitSlotList::GetSlot(), and TGo4FitSlotList::NumSlots().

Referenced by TGo4Fitter::CollectAllPars(), and TGo4FitModel::Initialize().

void TGo4FitComponent::SetUseBuffers Bool_t  iUse  )  [inline]
 

Sets usage of additional buffers.

Buffers can only be created in Initialize procedure..

Definition at line 232 of file TGo4FitComponent.h.

References fbUseBuffers.

Bool_t TGo4FitComponent::GetUseBuffers  )  [inline]
 

Returns flag of usage of additional buffers.

Buffers can only be created in Initialize procedure..

Definition at line 238 of file TGo4FitComponent.h.

References fbUseBuffers.

void TGo4FitComponent::Print Option_t *  option  )  const [virtual]
 

Print info about object on standard output.

Reimplemented from TGo4FitParsList.

Reimplemented in TGo4FitData, TGo4FitDataGraph, TGo4FitDataHistogram, TGo4FitDataProfile, TGo4FitDataRidge, TGo4FitModel, TGo4FitModelFormula, TGo4FitModelFromData, TGo4FitModelFunction, TGo4FitModelGauss1, TGo4FitModelGauss2, TGo4FitModelGaussN, and TGo4FitModelPolynom.

Definition at line 370 of file TGo4FitComponent.cxx.

References fiAmplIndex, GetNumRangeCondition(), GetNumRangeCut(), GetRangeCondition(), GetRangeCut(), kExcludeCut, TGo4FitParsList::Print(), and TGo4FitNamed::Print().

Referenced by TGo4FitModel::Print(), and TGo4FitData::Print().

TGo4FitParameter * TGo4FitComponent::NewParameter const char *  Name,
const char *  Title,
Double_t  iValue = 0.,
Bool_t  Fixed = kFALSE,
Int_t  AtIndx = -1
[protected]
 

Create new parameter with provided properties and add to parameters list.

Definition at line 38 of file TGo4FitComponent.cxx.

References TGo4FitParsList::AddPar(), TGo4FitParsList::InsertPar(), and TGo4FitParameter::SetFixed().

Referenced by TGo4FitModelPolynom::CreateOrdersPars(), TGo4FitModelGaussN::SetAxisNumbers(), TGo4FitModelFormula::SetNumberOfExprPar(), TGo4FitModelFunction::SetNumberOfFuncPar(), TGo4FitModelFormula::TGo4FitModelFormula(), TGo4FitModelFunction::TGo4FitModelFunction(), TGo4FitModelGauss1::TGo4FitModelGauss1(), TGo4FitModelGauss2::TGo4FitModelGauss2(), TGo4FitModelGaussN::TGo4FitModelGaussN(), and TModelTemplate::TModelTemplate().

TGo4FitParameter * TGo4FitComponent::NewAmplitude const char *  Name = 0,
Double_t  iValue = 0.,
Bool_t  IsFixed = kFALSE,
Int_t  AtIndx = 0
[protected]
 

Create amplitude parameter with specified properties.

Definition at line 46 of file TGo4FitComponent.cxx.

References TGo4FitParsList::AddPar(), TGo4FitParsList::InsertPar(), TGo4FitParsList::NumPars(), SetAmplIndex(), and TGo4FitParameter::SetFixed().

Referenced by MakeAmpl(), TGo4FitData::TGo4FitData(), and TGo4FitModel::TGo4FitModel().

Int_t TGo4FitComponent::GetAmplIndex  )  [inline, protected]
 

Returns index of amplitude parameter.

Definition at line 260 of file TGo4FitComponent.h.

References fiAmplIndex.

Referenced by TGo4FitModelFormula::GetExprPar(), TGo4FitModelFunction::GetFuncPar(), TGo4FitModel::RebuildShape(), and RemoveAmpl().

void TGo4FitComponent::SetAmplIndex Int_t  iAmplIndex = -1  )  [inline, protected]
 

Set index of amplitude parameter.

Definition at line 265 of file TGo4FitComponent.h.

References fiAmplIndex.

Referenced by NewAmplitude(), and RemoveAmpl().


Member Data Documentation

TArrayI TGo4FitComponent::fxRangeAxis [private]
 

Array for range conditions storage (axis indexes).

Definition at line 272 of file TGo4FitComponent.h.

Referenced by AddRangeCondition(), ClearRanges(), GetNumRangeCondition(), GetRangeCondition(), GetRangeMax(), GetRangeMin(), RemoveRangeCondition(), and SetRangeCondition().

TArrayD TGo4FitComponent::fxRangeValue [private]
 

Array for range values storaging.

Definition at line 277 of file TGo4FitComponent.h.

Referenced by AddRangeCondition(), ClearRanges(), GetRangeCondition(), GetRangeMax(), GetRangeMin(), RemoveRangeCondition(), and SetRangeCondition().

TObjArray TGo4FitComponent::fxCuts [private]
 

Array of TCutG objects, used for range selection.

Definition at line 282 of file TGo4FitComponent.h.

Referenced by AddRangeCut(), ClearRanges(), GetNumRangeCut(), GetRangeCut(), RemoveRangeCut(), and TGo4FitComponent().

Int_t TGo4FitComponent::fiAmplIndex [private]
 

Index of amplitude parameter (-1 if none).

Definition at line 287 of file TGo4FitComponent.h.

Referenced by GetAmplIndex(), GetAmplPar(), Print(), SetAmplError(), SetAmplIndex(), and SetAmplValue().

Bool_t TGo4FitComponent::fbUseBuffers [private]
 

Specify usage of buffers after initialization.

Definition at line 292 of file TGo4FitComponent.h.

Referenced by GetUseBuffers(), and SetUseBuffers().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 13:00:54 2008 for Go4-v3.04-1 by  doxygen 1.4.2