GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitModelGaussN.h
Go to the documentation of this file.
1// $Id$
2//-----------------------------------------------------------------------
3// The GSI Online Offline Object Oriented (Go4) Project
4// Experiment Data Processing at EE department, GSI
5//-----------------------------------------------------------------------
6// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7// Planckstr. 1, 64291 Darmstadt, Germany
8// Contact: http://go4.gsi.de
9//-----------------------------------------------------------------------
10// This software can be used under the license agreements as stated
11// in Go4License.txt file which is part of the distribution.
12//-----------------------------------------------------------------------
13
14#ifndef TGO4FITMODELGAUSSN_H
15#define TGO4FITMODELGAUSSN_H
16
17#include "TGo4FitModel.h"
18
19#include "TArrayI.h"
20#include "TVectorD.h"
21#include "TMatrixD.h"
22
43 public:
44
49
54 TGo4FitModelGaussN(const char *iName, Int_t iNDimension = 3);
55
59 virtual ~TGo4FitModelGaussN();
60
64 Int_t GetAxisNumbers() const { return fxIndexes.GetSize(); }
65
69 Bool_t SetAxisNumbers(Int_t naxis);
70
76 Int_t GetAxisForIndex(Int_t indx) const { return fxIndexes[indx]; }
77
81 void SetAxisForIndex(Int_t indx, Int_t axis) { fxIndexes[indx] = axis; }
82
87 Bool_t ResortIndexes(Int_t leaveaxis = -1);
88
92 void FillMuVector(TVectorD &Mu);
93
97 void FillSigmaMatrix(TMatrixD &Sigma);
98
102 void Print(Option_t *option = "") const override;
103
104 Bool_t BeforeEval(Int_t) override;
105 Double_t EvalN(const Double_t *v) override;
106
107 protected:
108 TString GetPosParName(Int_t naxis);
109 TString GetWidthParName(Int_t naxis);
110 TString GetCovarParName(Int_t naxis1, Int_t naxis2);
111
112 Int_t GetPosParIndex(Int_t naxis) override;
113 Int_t GetWidthParIndex(Int_t naxis) override;
114
115 void AfterEval() override;
116
120 TArrayI fxIndexes;
121
122 private:
123
127 Int_t Par_ndim{0};
128
132 Int_t *Par_indx{nullptr};
133
137 TVectorD *Vect_mu{nullptr};
138
142 TMatrixD *Matr_sig{nullptr};
143
147 TVectorD *Vect_x{nullptr};
148
152 TVectorD *Vect_dx{nullptr};
153
154 ClassDefOverride(TGo4FitModelGaussN,1)
155};
156#endif // TGO4FITMODELGAUSSN_H
N-dimensional gaussian peak.
void SetAxisForIndex(Int_t indx, Int_t axis)
Change axis number for specified index (dimension) of gaussian.
void FillMuVector(TVectorD &Mu)
Fills vector of gaussian position from parameters values.
Int_t GetAxisForIndex(Int_t indx) const
Gets axis number (0 - x-axis, 1 - y-axis) for specified dimension of gaussian.
TMatrixD * Matr_sig
Temporary variable for EvalN() function.
TString GetPosParName(Int_t naxis)
Int_t GetAxisNumbers() const
Returns number of dimensions (number of axes), where gaussian will be build.
void Print(Option_t *option="") const override
Print information on standard output.
Double_t EvalN(const Double_t *v) override
Calculates value of model according current parameters values and provided axes values.
void FillSigmaMatrix(TMatrixD &Sigma)
Fill covariance matrix from parameters values.
TGo4FitModelGaussN()
Default constructor.
TVectorD * Vect_mu
Temporary variable for EvalN() function.
void AfterEval() override
Clear buffers, which were created by BeforeEval() method.
TString GetWidthParName(Int_t naxis)
Bool_t BeforeEval(Int_t) override
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
TVectorD * Vect_dx
Temporary variable for EvalN() function.
Int_t GetWidthParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent width of model component for given axis.
TString GetCovarParName(Int_t naxis1, Int_t naxis2)
TArrayI fxIndexes
Array of axis indexes, where n-dim gaussian will be build.
virtual ~TGo4FitModelGaussN()
Destroys TGo4FitModelGaussN object.
Int_t * Par_indx
Temporary variable for EvalN() function.
Bool_t SetAxisNumbers(Int_t naxis)
Sets number of axes (dimensions), where gaussian will be build.
TVectorD * Vect_x
Temporary variable for EvalN() function.
Bool_t ResortIndexes(Int_t leaveaxis=-1)
Checks duplicates in axis numbers, associated to different gaussian dimensions.
Int_t GetPosParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent position of model for given axis.
Int_t Par_ndim
Temporary variable for EvalN() function.
TGo4FitModel()
Default constructor.