simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TSParameter.h
1 /*
2  * TSParameter.h
3  *
4  * Created on: May 26, 2014
5  * Author: sdiluise
6  */
27 #ifndef TSPARAMETER_H_
28 #define TSPARAMETER_H_
29 
30 #include <TObject.h>
31 
32 
33 #include <string>
34 
35 #include <TString.h>
36 
37 #include "TSArgList.h"
38 
39 #include "TSVariable.h"
40 
41 
42 class TSParameter: public TSVariable {
43 
44 
45 public:
46 
47  TSParameter();
48  TSParameter(TString name, TString label, TString title, TString unit="");
49  TSParameter(const TSParameter &);
50  virtual ~TSParameter();
51 
52 
53  void Clear();
54  void ClearError();
55  void ClearAsymErrors();
56  void Copy(const TSParameter &);
57  virtual TSParameter* Clone(TString name,int) const;
58  virtual TObject* Clone(const char* name="") const;
59 
60  void Fix();
61  virtual double GetError() const {return fError;}
62  virtual double GetErrorLow() const {return fErrLow;}
63  virtual double GetErrorUp() const {return fErrUp;}
64  virtual double GetErrorFrac() const;
65  virtual double GetPrecision() const {return fPrec;}
66  virtual double GetStep() const {return fStep;}
67 
68  bool HasAsymErrors() const {return fHasAsymErrors;}
69  bool HasError() const {return fHasError;}
70  bool IsFixed() const {return fIsFixed;}
71 
72  void Init();
73 
74  void Print() const;
75  void Release();
76  void SetAsymErrors(double err_low,double err_up);
77  void SetError(double err);
78  void SetFixed(double);
79  void SetPrecision(double);
80  void SetStep(double s);
81 
82  virtual bool SetFunction(TString expr,const TSArgList &) {}
83 
84  TSArgList* GetPrimaryParamList() const;
85  void PrintPrimaryParamList() const;
86  int GetNumOfPrimPars() const {return fPrimaryParamList->GetSize();}
87 
88 private:
89 
90  double fError;
91  double fErrLow;
92  double fErrUp;
93  double fPrec;
94  double fStep;
95  bool fHasAsymErrors;
96  bool fHasError;
97  bool fIsFixed;
98 
99 
100  virtual void fBuildPrimaryParamList();
101 
102  TSArgList *fPrimaryParamList;
103 
104 protected:
105  virtual void fClearPrimaryParamList();
106 
107 
108 
109 
110 // ClassDef(TSParameter,1)
111 };
112 
113 #endif /* TSPARAMETER_H_ */
Definition: TSArgList.h:30
Definition: TSVariable.h:55
Definition: TSParameter.h:39
void SetAsymErrors(double err_low, double err_up)
Definition: TSParameter.cc:255