StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_MDFCorrectionC.h
1 #ifndef St_MDFCorrectionC_h
2 #define St_MDFCorrectionC_h
3 #include <string.h>
4 #include "TChair.h"
5 #include "tables/St_MDFCorrection_Table.h"
6 #include "TF3.h"
7 #include "TF2.h"
8 #include "TF1.h"
9 class St_MDFCorrectionC : public TChair {
10  public:
11  enum EMDFPolyType {
12  kMonomials,
13  kChebyshev,
14  kLegendre
15  };
16  St_MDFCorrectionC(St_MDFCorrection *table=0);
17  MDFCorrection_st *Struct(Int_t k = 0) const {return ((St_MDFCorrection*) Table())->GetTable()+k;}
18  UInt_t getNumRows() const {return GetNRows();}
19  UChar_t idx(Int_t k = 0) const {return Struct(k)->idx;}
20  UChar_t nrows(Int_t k = 0) const {return Struct(k)->nrows;}
21  UChar_t PolyType(Int_t k = 0) const {return Struct(k)->PolyType;}
22  UChar_t NVariables(Int_t k = 0) const {return Struct(k)->NVariables;}
23  UChar_t NCoefficients(Int_t k = 0) const {return Struct(k)->NCoefficients;}
24  UChar_t* Powers(Int_t k = 0) const {return Struct(k)->Power;}
25  Double_t DMean(Int_t k = 0) const {return Struct(k)->DMean;}
26  Double_t* XMin(Int_t k = 0) const {return Struct(k)->XMin;}
27  Double_t* XMax(Int_t k = 0) const {return Struct(k)->XMax;}
28  Double_t* Coefficients(Int_t k = 0) const {return Struct(k)->Coefficients;}
29  Double_t* CoefficientsRMS(Int_t k = 0) const {return Struct(k)->CoefficientsRMS;}
30  Double_t Eval(Int_t k = 0, Double_t *x = 0) const;
31  Double_t Eval(Int_t k, Double_t x0, Double_t x1) const;
32  Double_t EvalError(Int_t k = 0, Double_t *x = 0) const;
33  Int_t IsActiveChair() const;
34  TF1* GetFunction(Int_t k = 0) const { return fFunc ? fFunc[k] : 0;}
35  static Double_t MDFunc(Double_t *x = 0, Double_t *p = 0);
36  static St_MDFCorrectionC *fgMDFCorrectionC;
37  protected:
38  virtual ~St_MDFCorrectionC();
39  private:
40  Double_t EvalFactor(Int_t k = 0, Int_t p = 0, Double_t x = 0) const;
41  TF1 **fFunc;
42  ClassDefChair(St_MDFCorrection, MDFCorrection_st )
43  ClassDef(St_MDFCorrectionC,1) //C++ TChair for MDFCorrection table class
44 };
45 #endif
Definition: TChair.h:27