GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
40 public:
42 TGo4FitLinearTrans(const char *iName, const char *iTitle, Int_t iAxis = 0);
43 virtual ~TGo4FitLinearTrans();
44
45 Int_t GetAxis() const { return fiAxis; }
46 void SetAxis(Int_t iAxis) { fiAxis = iAxis; }
47 Double_t GetCoefK() { return GetPar(0)->GetValue(); }
48 void SetCoefK(Double_t k) { GetPar(0)->SetValue(k); }
49 Double_t GetCoefB() { return GetPar(1)->GetValue(); }
50 void SetCoefB(Double_t b) { GetPar(1)->SetValue(b); }
51
52 void SetCoef(Double_t iCoefK, Double_t iCoefB)
53 { GetPar(0)->SetValue(iCoefK); GetPar(1)->SetValue(iCoefB); }
54 void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2);
55 void SetCoefByPoints(Double_t n1, Double_t y1, Double_t n2, Double_t y2);
56
57 void Transformation(Double_t *scales, Int_t naxis) override;
58
59 void Print(Option_t *option = "") const override;
60
61 protected:
62 Int_t fiAxis{0};
63 Double_t fdCoefK{0};
64 Double_t fdCoefB{0};
65
66 ClassDefOverride(TGo4FitLinearTrans,1)
67};
68
69#endif // TGO4FITLINEARTRANS_H
The linear transformation of selected data axis.
void SetCoefByPoints(Double_t n1, Double_t y1, Double_t n2, Double_t y2)
void SetCoefB(Double_t b)
void SetCoefK(Double_t k)
void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2)
void Transformation(Double_t *scales, Int_t naxis) override
void SetAxis(Int_t iAxis)
void SetCoef(Double_t iCoefK, Double_t iCoefB)
void Print(Option_t *option="") const override
Double_t GetValue() const
Return parameter value.
void SetValue(Double_t iValue)
Set parameter value.
TGo4FitParameter * GetPar(Int_t n)
Return parameter according given index.