GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitModelFormula.h
Go to the documentation of this file.
1 // $Id: TGo4FitModelFormula.h 2628 2019-10-01 08:14:31Z linev $
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 TGO4FITMODELFORMULA_H
15 #define TGO4FITMODELFORMULA_H
16 
17 #include "TGo4FitModel.h"
18 
19 class TFormula;
20 
29  public:
30 
35 
40  TGo4FitModelFormula(const char* iName, const char* iExpressionStr = "", Int_t iNPars = 0, Bool_t AddAmplitude = kFALSE);
41 
45  virtual ~TGo4FitModelFormula();
46 
50  virtual Bool_t CanAmplTouch() { return kTRUE; }
51 
55  const char* GetExpression() const { return fxExpression.Data(); }
56 
60  void SetExpression(const char* expr) { fxExpression = expr; }
61 
65  Int_t GetNumberOfExprPar();
66 
70  Bool_t SetNumberOfExprPar(Int_t num);
71 
72  void SetPosParIndex(Int_t naxis, Int_t indx = -1);
73  void SetWidthParIndex(Int_t naxis, Int_t indx = -1);
74 
75  virtual Bool_t BeforeEval(Int_t ndim);
76  virtual Double_t EvalN(const Double_t* v);
77  virtual void AfterEval();
78 
82  virtual void Print(Option_t* option) const;
83 
84  protected:
85 
86  virtual Bool_t Initialize(Int_t UseBuffers = -1);
87  virtual void Finalize();
88 
89  TGo4FitParameter* GetExprPar(Int_t n);
90  TString GetExprParName(Int_t n);
91 
92  Bool_t CompileFormula();
93  void CloseFormula();
94 
95  virtual Int_t GetPosParIndex(Int_t naxis);
96  virtual Int_t GetWidthParIndex(Int_t naxis);
97 
101  TString fxExpression;
102 
103  TArrayI fxPosIndex;
104 
105  TArrayI fxWidthIndex;
106 
110  TFormula *fxFormula;
111  private:
112 
116  Int_t Par_ndim;
117 
119 };
120 #endif // TGO4FITMODELFORMULA_H
virtual Bool_t CanAmplTouch()
void SetExpression(const char *expr)
TString GetExprParName(Int_t n)
virtual Int_t GetWidthParIndex(Int_t naxis)
TGo4FitParameter * GetExprPar(Int_t n)
virtual Bool_t Initialize(Int_t UseBuffers=-1)
virtual Bool_t BeforeEval(Int_t ndim)
virtual Int_t GetPosParIndex(Int_t naxis)
void SetPosParIndex(Int_t naxis, Int_t indx=-1)
ClassDef(TGo4FitSlotList, 1)
const char * GetExpression() const
Bool_t SetNumberOfExprPar(Int_t num)
virtual Double_t EvalN(const Double_t *v)
void SetWidthParIndex(Int_t naxis, Int_t indx=-1)
virtual void Print(Option_t *option) const