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

TGo4FitModelGaussN Class Reference

N-dimensional gaussian peak. More...

#include <TGo4FitModelGaussN.h>

Inheritance diagram for TGo4FitModelGaussN:

TGo4FitModel TGo4FitComponent TGo4FitParsList TGo4FitSlotList TGo4FitNamed List of all members.

Public Methods

 TGo4FitModelGaussN ()
 Default constructor. More...

 TGo4FitModelGaussN (const char *iName, Int_t iNDimension=3)
 Creates TGo4FitModelGaussN model with given name. More...

virtual ~TGo4FitModelGaussN ()
 Destroys TGo4FitModelGaussN object. More...

Int_t GetAxisNumbers ()
 Returns number of dimensions (number of axises), where gaussian will be build. More...

Bool_t SetAxisNumbers (Int_t naxis)
 Sets number of axises (dimensions), where gaussian will be build. More...

Int_t GetAxisForIndex (Int_t indx)
 Gets axis number (0 - x-axis, 1 - y-axis) for specified dimension of gaussian. More...

void SetAxisForIndex (Int_t indx, Int_t axis)
 Change axis number for specified index (dimension) of gaussian. More...

Bool_t ResortIndexes (Int_t leaveaxis=-1)
 Checks duplicates in axis numbers, associated to different gaussian dimensions. More...

void FillMuVector (TVectorD &Mu)
 Fills vector of gaussian position from parameters values. More...

void FillSigmaMatrix (TMatrixD &Sigma)
 Fill covariance matrix from parameters values. More...

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

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

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


Protected Methods

TString GetPosParName (Int_t naxis)
TString GetWidthParName (Int_t naxis)
TString GetCovarParName (Int_t naxis1, Int_t naxis2)
virtual Int_t GetPosParIndex (Int_t naxis)
 Return index of parameter (if exist), which represent position of model for given axis. More...

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

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


Protected Attributes

TArrayI fxIndexes
 Array of axis indexes, where n-dim gaussian will be build. More...


Private Attributes

Int_t ndim
 Temporary variable for EvalN() function. More...

Int_t * indx
 Temporary variable for EvalN() function. More...

TVectorD * Vect_mu
 Temporary variable for EvalN() function. More...

TMatrixD * Matr_sig
 Temporary variable for EvalN() function. More...

TVectorD * Vect_x
 Temporary variable for EvalN() function. More...

TVectorD * Vect_dx
 Temporary variable for EvalN() function. More...


Detailed Description

N-dimensional gaussian peak.

Has following parameters: "Ampl" - amplitude; "Pos0", "Pos1", ... - line positions; "Width0", "Width1", "... - line widths; "Cov0_1", "Cov0_2", ..., "Cov1_2", "Cov1_3", ... - covariations parameters. To create instance of this model:

TGo4FitModelGaussN *g = new TGo4FitModelGaussN("Gauss", 2);

where first parameter - name of model component, second - number of dimensions.

Definition at line 37 of file TGo4FitModelGaussN.h.


Constructor & Destructor Documentation

TGo4FitModelGaussN::TGo4FitModelGaussN  
 

Default constructor.

Definition at line 24 of file TGo4FitModelGaussN.cxx.

TGo4FitModelGaussN::TGo4FitModelGaussN const char *    iName,
Int_t    iNDimension = 3
 

Creates TGo4FitModelGaussN model with given name.

Number of dimensions also can be specified (default = 3).

Definition at line 28 of file TGo4FitModelGaussN.cxx.

References fxIndexes, GetCovarParName(), GetPosParName(), GetWidthParName(), n, and TGo4FitComponent::NewParameter().

TGo4FitModelGaussN::~TGo4FitModelGaussN   [virtual]
 

Destroys TGo4FitModelGaussN object.

Definition at line 44 of file TGo4FitModelGaussN.cxx.

References Matr_sig, Vect_dx, Vect_mu, and Vect_x.


Member Function Documentation

Int_t TGo4FitModelGaussN::GetAxisNumbers   [inline]
 

Returns number of dimensions (number of axises), where gaussian will be build.

Definition at line 59 of file TGo4FitModelGaussN.h.

References fxIndexes.

Referenced by SetAxisNumbers().

Bool_t TGo4FitModelGaussN::SetAxisNumbers Int_t    naxis
 

Sets number of axises (dimensions), where gaussian will be build.

Should be more than 0.

Definition at line 71 of file TGo4FitModelGaussN.cxx.

References TGo4FitParsList::FindPar(), fxIndexes, GetAxisNumbers(), GetCovarParName(), TGo4FitParsList::GetParIndex(), GetPosParName(), GetWidthParName(), n, TGo4FitComponent::NewParameter(), and TGo4FitParsList::RemovePar().

Int_t TGo4FitModelGaussN::GetAxisForIndex Int_t    indx [inline]
 

Gets axis number (0 - x-axis, 1 - y-axis) for specified dimension of gaussian.

Can be, that first dimension of gaussian assign to z-axis, 2-nd dimension to x-axis, 3-rd dimension to y-axis. Default (created in constructor) is normal numbering, when number of dimension is equal to number of axis.

Definition at line 71 of file TGo4FitModelGaussN.h.

References fxIndexes, and indx.

void TGo4FitModelGaussN::SetAxisForIndex Int_t    indx,
Int_t    axis
[inline]
 

Change axis number for specified index (dimension) of gaussian.

Definition at line 76 of file TGo4FitModelGaussN.h.

References fxIndexes, and indx.

Bool_t TGo4FitModelGaussN::ResortIndexes Int_t    leaveaxis = -1
 

Checks duplicates in axis numbers, associated to different gaussian dimensions.

leaveaixs (if specified) sets dimension number, which will be unchanged.

Definition at line 116 of file TGo4FitModelGaussN.cxx.

References fxIndexes, and n.

void TGo4FitModelGaussN::FillMuVector TVectorD &    Mu
 

Fills vector of gaussian position from parameters values.

Definition at line 151 of file TGo4FitModelGaussN.cxx.

References fxIndexes, TGo4FitParsList::GetPar(), TGo4FitParameter::GetValue(), n, and ndim.

Referenced by BeforeEval().

void TGo4FitModelGaussN::FillSigmaMatrix TMatrixD &    Sigma
 

Fill covariance matrix from parameters values.

Definition at line 158 of file TGo4FitModelGaussN.cxx.

References fxIndexes, TGo4FitParsList::GetPar(), TGo4FitParameter::GetValue(), indx, n, and ndim.

Referenced by BeforeEval().

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

Print information on standard output.

Reimplemented from TGo4FitModel.

Definition at line 212 of file TGo4FitModelGaussN.cxx.

References fxIndexes, i, and TGo4FitModel::Print().

Bool_t TGo4FitModelGaussN::BeforeEval Int_t    [virtual]
 

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

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

Reimplemented from TGo4FitModel.

Definition at line 172 of file TGo4FitModelGaussN.cxx.

References AfterEval(), FillMuVector(), FillSigmaMatrix(), fxIndexes, i, indx, Matr_sig, ndim, Vect_dx, Vect_mu, and Vect_x.

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

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

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

Reimplemented from TGo4FitModel.

Definition at line 195 of file TGo4FitModelGaussN.cxx.

References indx, Matr_sig, n, ndim, Vect_dx, Vect_mu, and Vect_x.

TString TGo4FitModelGaussN::GetPosParName Int_t    naxis [protected]
 

Definition at line 51 of file TGo4FitModelGaussN.cxx.

Referenced by SetAxisNumbers(), and TGo4FitModelGaussN().

TString TGo4FitModelGaussN::GetWidthParName Int_t    naxis [protected]
 

Definition at line 57 of file TGo4FitModelGaussN.cxx.

Referenced by SetAxisNumbers(), and TGo4FitModelGaussN().

TString TGo4FitModelGaussN::GetCovarParName Int_t    naxis1,
Int_t    naxis2
[protected]
 

Definition at line 63 of file TGo4FitModelGaussN.cxx.

Referenced by SetAxisNumbers(), and TGo4FitModelGaussN().

Int_t TGo4FitModelGaussN::GetPosParIndex Int_t    naxis [protected, virtual]
 

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

Reimplemented from TGo4FitModel.

Definition at line 139 of file TGo4FitModelGaussN.cxx.

References fxIndexes, and n.

Int_t TGo4FitModelGaussN::GetWidthParIndex Int_t    naxis [protected, virtual]
 

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

Reimplemented from TGo4FitModel.

Definition at line 145 of file TGo4FitModelGaussN.cxx.

References fxIndexes, and n.

void TGo4FitModelGaussN::AfterEval   [protected, virtual]
 

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

Reimplemented from TGo4FitModel.

Definition at line 205 of file TGo4FitModelGaussN.cxx.

References Matr_sig, Vect_dx, Vect_mu, and Vect_x.

Referenced by BeforeEval().


Member Data Documentation

TArrayI TGo4FitModelGaussN::fxIndexes [protected]
 

Array of axis indexes, where n-dim gaussian will be build.

Definition at line 115 of file TGo4FitModelGaussN.h.

Referenced by BeforeEval(), FillMuVector(), FillSigmaMatrix(), GetAxisForIndex(), GetAxisNumbers(), GetPosParIndex(), GetWidthParIndex(), Print(), ResortIndexes(), SetAxisForIndex(), SetAxisNumbers(), and TGo4FitModelGaussN().

Int_t TGo4FitModelGaussN::ndim [private]
 

Temporary variable for EvalN() function.

Definition at line 122 of file TGo4FitModelGaussN.h.

Referenced by BeforeEval(), EvalN(), FillMuVector(), and FillSigmaMatrix().

Int_t* TGo4FitModelGaussN::indx [private]
 

Temporary variable for EvalN() function.

Definition at line 128 of file TGo4FitModelGaussN.h.

Referenced by BeforeEval(), EvalN(), FillSigmaMatrix(), GetAxisForIndex(), and SetAxisForIndex().

TVectorD* TGo4FitModelGaussN::Vect_mu [private]
 

Temporary variable for EvalN() function.

Definition at line 134 of file TGo4FitModelGaussN.h.

Referenced by AfterEval(), BeforeEval(), EvalN(), and ~TGo4FitModelGaussN().

TMatrixD* TGo4FitModelGaussN::Matr_sig [private]
 

Temporary variable for EvalN() function.

Definition at line 140 of file TGo4FitModelGaussN.h.

Referenced by AfterEval(), BeforeEval(), EvalN(), and ~TGo4FitModelGaussN().

TVectorD* TGo4FitModelGaussN::Vect_x [private]
 

Temporary variable for EvalN() function.

Definition at line 146 of file TGo4FitModelGaussN.h.

Referenced by AfterEval(), BeforeEval(), EvalN(), and ~TGo4FitModelGaussN().

TVectorD* TGo4FitModelGaussN::Vect_dx [private]
 

Temporary variable for EvalN() function.

Definition at line 152 of file TGo4FitModelGaussN.h.

Referenced by AfterEval(), BeforeEval(), EvalN(), and ~TGo4FitModelGaussN().


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