Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4FITLINEARTRANS_H
00015 #define TGO4FITLINEARTRANS_H
00016
00017 #include "TGo4FitAxisTrans.h"
00018
00019 #include "TGo4FitParameter.h"
00020
00036 class TGo4FitLinearTrans : public TGo4FitAxisTrans {
00037 public:
00038 TGo4FitLinearTrans();
00039 TGo4FitLinearTrans(const char* iName, const char* iTitle, Int_t iAxis = 0);
00040 virtual ~TGo4FitLinearTrans();
00041
00042 Int_t GetAxis() { return fiAxis; }
00043 void SetAxis(Int_t iAxis) { fiAxis = iAxis; }
00044 Double_t GetCoefK() { return GetPar(0)->GetValue(); }
00045 void SetCoefK(Double_t k) { GetPar(0)->SetValue(k); }
00046 Double_t GetCoefB() { return GetPar(1)->GetValue(); }
00047 void SetCoefB(Double_t b) { GetPar(1)->SetValue(b); }
00048
00049 void SetCoef(Double_t iCoefK, Double_t iCoefB)
00050 { GetPar(0)->SetValue(iCoefK); GetPar(1)->SetValue(iCoefB); }
00051 void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2);
00052 void SetCoefByPoints(Double_t n1, Double_t y1, Double_t n2, Double_t y2);
00053
00054 virtual void Transformation(Double_t* scales, Int_t naxis);
00055
00056 virtual void Print(Option_t* option) const;
00057
00058 protected:
00059 Int_t fiAxis;
00060 Double_t fdCoefK;
00061 Double_t fdCoefB;
00062
00063 ClassDef(TGo4FitLinearTrans,1)
00064 };
00065 #endif // TGO4FITLINEARTRANS_H