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