GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitLinearTrans.h
Go to the documentation of this file.
1 // $Id: TGo4FitLinearTrans.h 2628 2019-10-01 08:14:31Z linev $
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  virtual void Transformation(Double_t* scales, Int_t naxis);
55 
56  virtual void Print(Option_t* option) const;
57 
58  protected:
59  Int_t fiAxis;
60  Double_t fdCoefK;
61  Double_t fdCoefB;
62 
63  ClassDef(TGo4FitLinearTrans,1)
64 };
65 
66 #endif // TGO4FITLINEARTRANS_H
void SetCoefB(Double_t b)
virtual void Transformation(Double_t *scales, Int_t naxis)
void SetAxis(Int_t iAxis)
TGo4FitParameter * GetPar(Int_t n)
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 SetValue(Double_t iValue)
Double_t GetValue() const
Int_t GetAxis() const
virtual void Print(Option_t *option) const