TGo4FitModelFormula.h

Go to the documentation of this file.
00001 // $Id: TGo4FitModelFormula.h 478 2009-10-29 12:26:09Z linev $
00002 //-----------------------------------------------------------------------
00003 //       The GSI Online Offline Object Oriented (Go4) Project
00004 //         Experiment Data Processing at EE department, GSI
00005 //-----------------------------------------------------------------------
00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
00007 //                     Planckstr. 1, 64291 Darmstadt, Germany
00008 // Contact:            http://go4.gsi.de
00009 //-----------------------------------------------------------------------
00010 // This software can be used under the license agreements as stated
00011 // in Go4License.txt file which is part of the distribution.
00012 //-----------------------------------------------------------------------
00013 
00014 #ifndef TGO4FITMODELFORMULA_H
00015 #define TGO4FITMODELFORMULA_H
00016 
00017 #include "TGo4FitModel.h"
00018 
00019 class TFormula;
00020 
00028 class TGo4FitModelFormula : public TGo4FitModel {
00029    public:
00030 
00034       TGo4FitModelFormula();
00035 
00040       TGo4FitModelFormula(const char* iName, const char* iExpressionStr = "", Int_t iNPars = 0, Bool_t AddAmplitude = kFALSE);
00041 
00045       virtual ~TGo4FitModelFormula();
00046 
00050       virtual Bool_t CanAmplTouch() { return kTRUE; }
00051 
00055       const char* GetExpression() { return fxExpression.Data(); }
00056 
00060       void SetExpression(const char* expr) { fxExpression = expr; }
00061 
00065       Int_t GetNumberOfExprPar();
00066 
00070       Bool_t SetNumberOfExprPar(Int_t num);
00071 
00072       void SetPosParIndex(Int_t naxis, Int_t indx = -1);
00073       void SetWidthParIndex(Int_t naxis, Int_t indx = -1);
00074 
00075       virtual Bool_t BeforeEval(Int_t ndim);
00076       virtual Double_t EvalN(const Double_t* v);
00077       virtual void AfterEval();
00078 
00082       virtual void Print(Option_t* option) const;
00083 
00084    protected:
00085 
00086       virtual Bool_t Initialize(Int_t UseBuffers = -1);
00087       virtual void Finalize();
00088 
00089       TGo4FitParameter* GetExprPar(Int_t n);
00090       TString GetExprParName(Int_t n);
00091 
00092       Bool_t CompileFormula();
00093       void CloseFormula();
00094 
00095       virtual Int_t GetPosParIndex(Int_t naxis);
00096       virtual Int_t GetWidthParIndex(Int_t naxis);
00097 
00101       TString fxExpression;
00102 
00103       TArrayI fxPosIndex;
00104 
00105       TArrayI fxWidthIndex;
00106 
00110       TFormula *fxFormula;               
00111    private:
00112 
00116       Int_t Par_ndim;                  
00117 
00118    ClassDef(TGo4FitModelFormula,1)
00119 };
00120 #endif // TGO4FITMODELFORMULA_H

Generated on Thu Oct 28 15:54:12 2010 for Go4-Fitpackagev4.04-2 by  doxygen 1.5.1