GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitLinearTrans.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4FITLINEARTRANS_H
15 #define TGO4FITLINEARTRANS_H
16 
17 #include "TGo4FitAxisTrans.h"
18 
19 #include "TGo4FitParameter.h"
20 
37  public:
39  TGo4FitLinearTrans(const char *iName, const char *iTitle, Int_t iAxis = 0);
40  virtual ~TGo4FitLinearTrans();
41 
42  Int_t GetAxis() const { return fiAxis; }
43  void SetAxis(Int_t iAxis) { fiAxis = iAxis; }
44  Double_t GetCoefK() { return GetPar(0)->GetValue(); }
45  void SetCoefK(Double_t k) { GetPar(0)->SetValue(k); }
46  Double_t GetCoefB() { return GetPar(1)->GetValue(); }
47  void SetCoefB(Double_t b) { GetPar(1)->SetValue(b); }
48 
49  void SetCoef(Double_t iCoefK, Double_t iCoefB)
50  { GetPar(0)->SetValue(iCoefK); GetPar(1)->SetValue(iCoefB); }
51  void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2);
52  void SetCoefByPoints(Double_t n1, Double_t y1, Double_t n2, Double_t y2);
53 
54  void Transformation(Double_t *scales, Int_t naxis) override;
55 
56  void Print(Option_t *option = "") const override;
57 
58  protected:
59  Int_t fiAxis{0};
60  Double_t fdCoefK{0};
61  Double_t fdCoefB{0};
62 
63  ClassDefOverride(TGo4FitLinearTrans,1)
64 };
65 
66 #endif // TGO4FITLINEARTRANS_H
Double_t GetValue() const
void SetCoefB(Double_t b)
void SetAxis(Int_t iAxis)
TGo4FitParameter * GetPar(Int_t n)
void Transformation(Double_t *scales, Int_t naxis) override
void SetCoefK(Double_t k)
void SetCoef(Double_t iCoefK, Double_t iCoefB)
void SetCoefByPoints(Double_t n1, Double_t y1, Double_t n2, Double_t y2)
void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2)
void Print(Option_t *option="") const override
void SetValue(Double_t iValue)