simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TSFuncModel2D.h
1 /*
2  * TSFuncModel2D.h
3  *
4  * Created on: Aug 7, 2014
5  * Author: Silvestro di Luise
6  * Silvestro.Di.Luise@cern.ch
7  *
8  */
9 
10 #ifndef TSFUNCMODEL2D_H_
11 #define TSFUNCMODEL2D_H_
12 
13 #include "TFormula.h"
14 #include "TF2.h"
15 
16 
17 #include "TSFuncModel.h"
18 
19 /*
20  *
21  */
22 
23 
24 class TSFuncModel2D: public TSFuncModel {
25 
26 public:
27 
28  TSFuncModel2D(TString name,TString title);
29  TSFuncModel2D(TString name,TString title,const TSArgList& set, const TSArgSet &coefs);
30  TSFuncModel2D(TString name,TString title,const TSArgList& set);
31  TSFuncModel2D(TString name,TString title,TString formula,const TSArgList& set, const TSArgSet &coefs);
32  TSFuncModel2D(TString name,TString title,TString formula,const TSArgList& set);
33  virtual ~TSFuncModel2D();
34 
35  virtual double Eval(double x, double y=0) const;
36  virtual double Eval() const;
37  virtual double Evaluate() const;
38  virtual double EvalFunc(double *x, double *p) const {return Eval(x[0],x[1]);}
39 
40  void Init();
41 
42 private:
43 
44  int fCheckFunctions();
45 
46  double fEvaluateLinear() const;
47  double fEvaluateTFormula() const;
48 
49  mutable TFormula *f2Cache;
50 
51 };
52 
53 #endif /* TSFUNCMODEL2D_H_ */
Definition: TSArgList.h:30
Definition: TSFuncModel.h:33
Definition: TSFuncModel2D.h:24