GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitModelGauss1.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 TGO4FITMODELGAUSS1_H
15#define TGO4FITMODELGAUSS1_H
16
17#include "TGo4FitModel.h"
18
37 public:
38
43
48 TGo4FitModelGauss1(const char *iName, Double_t iPosition = 1., Double_t iWidth = 1., Int_t iNaxis = 0);
49
53 virtual ~TGo4FitModelGauss1();
54
58 Int_t GetNumAxis() const { return fiNaxis; }
59
63 void SetNumAxis(Int_t n) { if(n >= 0) fiNaxis = n; }
64
68 void Print(Option_t *option = "") const override;
69
70 Double_t Integral() override;
71
72 Bool_t BeforeEval(Int_t ndim) override;
73 Double_t EvalN(const Double_t *v) override;
74
75 protected:
76 Int_t GetPosParIndex(Int_t naxis) override { return (naxis==fiNaxis) ? 1 : -1; }
77 Int_t GetWidthParIndex(Int_t naxis) override { return (naxis==fiNaxis) ? 2 : -1; }
78
82 Int_t fiNaxis{0};
83
84 private:
85
89 Double_t Par_x0{0.};
90
94 Double_t Par_k{0.};
95
96 ClassDefOverride(TGo4FitModelGauss1,1)
97};
98
99#endif // TGO4FITMODELGAUSS1_H
One dimensional gaussian peak.
Bool_t BeforeEval(Int_t ndim) override
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
TGo4FitModelGauss1()
Default constructor.
Int_t GetWidthParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent width of model component for given axis.
Int_t GetPosParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent position of model for given axis.
Int_t GetNumAxis() const
Return number of axis, where gauss will be build.
Int_t fiNaxis
Number of selected axis, where gaussian will be build.
void SetNumAxis(Int_t n)
Sets number of selected axis.
Double_t Integral() override
Calculates integral of model component.
virtual ~TGo4FitModelGauss1()
Destroys TGo4FitModelGauss1 object.
Double_t EvalN(const Double_t *v) override
Calculates value of model according current parameters values and provided axes values.
void Print(Option_t *option="") const override
Print information to standard output.
Double_t Par_x0
Temporary variable for EvalN() function.
Double_t Par_k
Temporary variable for EvalN() function.
TGo4FitModel()
Default constructor.