Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

TGo4FitModelGauss2 Class Reference

#include <TGo4FitModelGauss2.h>

Inheritance diagram for TGo4FitModelGauss2:
TGo4FitModel TGo4FitComponent TGo4FitParsList TGo4FitSlotList TGo4FitNamed

List of all members.

Public Member Functions

 TGo4FitModelGauss2 ()
 TGo4FitModelGauss2 (const char *iName, Double_t iPos1=1., Double_t iPos2=1., Double_t iWidth1=1., Double_t iWidth2=1., Double_t iCov12=0., Int_t iNaxis1=0, Int_t iNaxis2=1)
virtual ~TGo4FitModelGauss2 ()
Int_t GetNumAxis1 ()
Int_t GetNumAxis2 ()
Int_t SetNumAxis1 (Int_t n)
Int_t SetNumAxis2 (Int_t n)
virtual void Print (Option_t *option) const
virtual Bool_t BeforeEval (Int_t ndim)
virtual Double_t EvalN (const Double_t *v)

Protected Member Functions

virtual Int_t GetPosParIndex (Int_t naxis)
virtual Int_t GetWidthParIndex (Int_t naxis)

Protected Attributes

Int_t fiNaxis1
Int_t fiNaxis2

Private Attributes

Double_t Par_mu1
Double_t Par_mu2
Double_t Par_sig1
Double_t Par_sig2
Double_t Par_ro
Double_t Par_mult

Detailed Description

Two dimensional gaussian peak.

Has following parameters: "Ampl" - amplitude; "Pos0" - line position on first coordinate; "Pos1" - line position on second coordinate; "Width0" - line width on first coordinate; "Width1" - line width on second coordinate; "Cov0_1" - covariation between first and second coordinate. By default, first coordinate associated with x axis, second - with y axis. To create instance of this model:

TGo4FitModelGauss2 *g = new TGo4FitModelGauss2("Gauss", 5., 5., 1., 1., 0.5);

where first parameter - name of model component, then initial value for positions, widths and covariation parameters are defined. To assigned coordinates to another axis, two more parameters should be used in the constructor:

TGo4FitModelGauss2 *g = new TGo4FitModelGauss2("Gauss", 5., 5., 1., 1., 0.5, 1, 2);

where 1 - assignment of first coordinate to y axis , 2 - assignment of second coordinate to z axis.

Definition at line 39 of file TGo4FitModelGauss2.h.


Constructor & Destructor Documentation

TGo4FitModelGauss2::TGo4FitModelGauss2 (  ) 

Default constructor.

Definition at line 21 of file TGo4FitModelGauss2.cxx.

TGo4FitModelGauss2::TGo4FitModelGauss2 ( const char *  iName,
Double_t  iPos1 = 1.,
Double_t  iPos2 = 1.,
Double_t  iWidth1 = 1.,
Double_t  iWidth2 = 1.,
Double_t  iCov12 = 0.,
Int_t  iNaxis1 = 0,
Int_t  iNaxis2 = 1 
)

Creates TGo4FitModelGauss2 with specified name. Initial value for positions, widths and covariation parameters can be specified. Also number of selected axis, where 2-dim gaussian will be build, can be specified (default 0 and 1).

Definition at line 24 of file TGo4FitModelGauss2.cxx.

References TGo4FitComponent::NewParameter().

TGo4FitModelGauss2::~TGo4FitModelGauss2 (  )  [virtual]

Destroys TGo4FitModelGauss2 object.

Definition at line 35 of file TGo4FitModelGauss2.cxx.


Member Function Documentation

Bool_t TGo4FitModelGauss2::BeforeEval ( Int_t  ndim  )  [virtual]

Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function. Number of axis, which will be used in evaluations, should be specified.

Reimplemented from TGo4FitModel.

Definition at line 39 of file TGo4FitModelGauss2.cxx.

References fiNaxis1, fiNaxis2, TGo4FitParsList::GetPar(), TGo4FitParameter::GetValue(), Par_mu1, Par_mu2, Par_mult, Par_ro, Par_sig1, and Par_sig2.

Double_t TGo4FitModelGauss2::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 56 of file TGo4FitModelGauss2.cxx.

References fiNaxis1, fiNaxis2, Par_mu1, Par_mu2, Par_mult, Par_ro, Par_sig1, and Par_sig2.

Int_t TGo4FitModelGauss2::GetNumAxis1 (  )  [inline]

Return number of first selected axis.

Definition at line 64 of file TGo4FitModelGauss2.h.

References fiNaxis1.

Referenced by QFitModelGauss2Widget::Axis2Spin_valueChanged().

Int_t TGo4FitModelGauss2::GetNumAxis2 (  )  [inline]

Return number of second selcted axis.

Definition at line 69 of file TGo4FitModelGauss2.h.

References fiNaxis2.

Referenced by QFitModelGauss2Widget::Axis1Spin_valueChanged().

virtual Int_t TGo4FitModelGauss2::GetPosParIndex ( Int_t   )  [inline, protected, virtual]

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

Reimplemented from TGo4FitModel.

Definition at line 90 of file TGo4FitModelGauss2.h.

References fiNaxis1, and fiNaxis2.

virtual Int_t TGo4FitModelGauss2::GetWidthParIndex ( Int_t   )  [inline, protected, virtual]

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

Reimplemented from TGo4FitModel.

Definition at line 91 of file TGo4FitModelGauss2.h.

References fiNaxis1, and fiNaxis2.

void TGo4FitModelGauss2::Print ( Option_t *  option  )  const [virtual]

Prints information to standard output.

Reimplemented from TGo4FitModel.

Definition at line 63 of file TGo4FitModelGauss2.cxx.

References fiNaxis1, and fiNaxis2.

Int_t TGo4FitModelGauss2::SetNumAxis1 ( Int_t  n  )  [inline]

Sets number of first selected axis.

Definition at line 74 of file TGo4FitModelGauss2.h.

References fiNaxis1.

Referenced by QFitModelGauss2Widget::Axis1Spin_valueChanged(), and QFitModelGauss2Widget::Axis2Spin_valueChanged().

Int_t TGo4FitModelGauss2::SetNumAxis2 ( Int_t  n  )  [inline]

Sets number of second selected axis.

Definition at line 79 of file TGo4FitModelGauss2.h.

References fiNaxis2.

Referenced by QFitModelGauss2Widget::Axis1Spin_valueChanged(), and QFitModelGauss2Widget::Axis2Spin_valueChanged().


Member Data Documentation

Int_t TGo4FitModelGauss2::fiNaxis1 [protected]

Number of first selected axis.

Definition at line 97 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), EvalN(), GetNumAxis1(), GetPosParIndex(), GetWidthParIndex(), Print(), and SetNumAxis1().

Int_t TGo4FitModelGauss2::fiNaxis2 [protected]

Number of second selected axis.

Definition at line 102 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), EvalN(), GetNumAxis2(), GetPosParIndex(), GetWidthParIndex(), Print(), and SetNumAxis2().

Double_t TGo4FitModelGauss2::Par_mu1 [private]

Temporary variable for EvalN() function.

Definition at line 109 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().

Double_t TGo4FitModelGauss2::Par_mu2 [private]

Temporary variable for EvalN() function.

Definition at line 115 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().

Double_t TGo4FitModelGauss2::Par_mult [private]

Temporary variable for EvalN() function.

Definition at line 139 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().

Double_t TGo4FitModelGauss2::Par_ro [private]

Temporary variable for EvalN() function.

Definition at line 133 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().

Double_t TGo4FitModelGauss2::Par_sig1 [private]

Temporary variable for EvalN() function.

Definition at line 121 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().

Double_t TGo4FitModelGauss2::Par_sig2 [private]

Temporary variable for EvalN() function.

Definition at line 127 of file TGo4FitModelGauss2.h.

Referenced by BeforeEval(), and EvalN().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines