GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4FitLinearTrans Class Reference

The linear transformation of selected data axis. More...

#include <TGo4FitLinearTrans.h>

+ Inheritance diagram for TGo4FitLinearTrans:

Public Member Functions

 TGo4FitLinearTrans ()
 
 TGo4FitLinearTrans (const char *iName, const char *iTitle, Int_t iAxis=0)
 
virtual ~TGo4FitLinearTrans ()
 
Int_t GetAxis () const
 
Double_t GetCoefB ()
 
Double_t GetCoefK ()
 
void Print (Option_t *option="") const override
 
void SetAxis (Int_t iAxis)
 
void SetCoef (Double_t iCoefK, Double_t iCoefB)
 
void SetCoefB (Double_t b)
 
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 SetCoefK (Double_t k)
 
void Transformation (Double_t *scales, Int_t naxis) override
 
- Public Member Functions inherited from TGo4FitAxisTrans
 TGo4FitAxisTrans ()
 
 TGo4FitAxisTrans (const char *iName, const char *iTitle)
 
virtual ~TGo4FitAxisTrans ()
 
- Public Member Functions inherited from TGo4FitParsList
 TGo4FitParsList ()
 Default constructor.
 
 TGo4FitParsList (Bool_t IsParsOwned)
 Create TGo4FitParsList object and set flag of ownership of parameters object.
 
 TGo4FitParsList (const char *Name, const char *Title, Bool_t IsParsOwned)
 Create TGo4FitParsList object, set it's name and title, and ownership flag of parameters pbjects.
 
virtual ~TGo4FitParsList ()
 Destroy TGo4FitParsList object.
 
virtual bool CanRollbackPars ()
 Return true if parameters can be safely restored from memorized values;.
 
void ClearPars ()
 Remove all parameters from list.
 
virtual void CollectParsTo (TGo4FitParsList &list)
 Add all parameters to provided TGo4FitParsList object.
 
TGo4FitParameterCreatePar (const char *ParName, const char *Title, Double_t iValue=0)
 Create new TGo4FitParameter object with given name, title and parameter value, and put this object to the list.
 
TGo4FitParameterFindPar (const char *OwnerFullName, const char *ParName)
 Find parameter with given owner full name and parameter name.
 
TGo4FitParameterFindPar (const char *ParName)
 Find parameter object with given name.
 
TGo4FitParameterFindPar (TGo4FitParameter *par)
 Find parameter in list.
 
TGo4FitParameterGetPar (Int_t n)
 Return parameter according given index.
 
virtual Bool_t GetParEpsilon (const char *ParName, Double_t &Epsilon)
 Get epsilon value for parameter with given name.
 
Double_t GetParError (const char *ParName)
 Get error value for parameter with given name.
 
virtual Bool_t GetParFixed (const char *ParName)
 Return status for parameter with given name, is it fixed or not.
 
const char * GetParFullName (Int_t n)
 Return full name of parameter with given index.
 
Int_t GetParIndex (const TGo4FitParameter *par)
 Return index of given parameter in list.
 
const char * GetParName (Int_t n)
 Return name of parameter with given index.
 
virtual Bool_t GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
 Get range limits for parameter with given name.
 
void GetParsValues (Double_t *pars)
 Copy values of all parameters in list to provided array.
 
Double_t GetParValue (const char *ParName)
 Return value of parameter with given name.
 
Bool_t IsAllParsFixed ()
 Returns true, if all parameters in list fixed;.
 
virtual void MemorizePars ()
 Memorize values of all parameters.
 
Int_t NumFixedPars ()
 Return number of fixed pars.
 
Int_t NumFreePars ()
 Return number of free pars.
 
virtual Int_t NumPars ()
 Return number of parameters in list.
 
void Print (Option_t *option="") const override
 Default print method.
 
void PrintPars () const
 Print only value and error of all parameters in list.
 
virtual void RememberPars ()
 Restore parameters values, which were stored by MemorizePars() routine;.
 
Bool_t RemovePar (const char *name)
 Remove parameter from list with given name.
 
Bool_t RemovePar (TGo4FitParameter *par)
 Remove parameter from list.
 
virtual Bool_t SetParEpsilon (const char *ParName, Double_t Epsilon)
 Set epsilon value for parameter with given name.
 
Bool_t SetParError (const char *ParName, Double_t iError)
 Set error value for parameter with given name.
 
virtual Bool_t SetParFixed (const char *ParName, Bool_t iFixed=kTRUE)
 Set for parameter with given name, is it fixed or not.
 
void SetParName (Int_t n, const char *name)
 Set new name for parameter object with provided index.
 
virtual Bool_t SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax)
 Set range limits for parameter with given name.
 
void SetParsNames (const char *name0="Par0", const char *name1="Par1", const char *name2="Par2", const char *name3="Par3", const char *name4="Par4", const char *name5="Par5", const char *name6="Par6", const char *name7="Par7", const char *name8="Par8", const char *name9="Par9")
 Set names of first 10 parameters.
 
void SetParsValues (Double_t *pars)
 Set value for all parameters from array.
 
void SetParsValues (Double_t par0=0., Double_t par1=0., Double_t par2=0., Double_t par3=0., Double_t par4=0., Double_t par5=0., Double_t par6=0., Double_t par7=0., Double_t par8=0., Double_t par9=0.)
 Set values for first 10 parameters.
 
Bool_t SetParValue (const char *ParName, Double_t iValue)
 Set value of parameter with given name.
 
- Public Member Functions inherited from TGo4FitNamed
 TGo4FitNamed ()
 Default constructor.
 
 TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr)
 Creates TGo4FitNamed object and set name and title.
 
virtual ~TGo4FitNamed ()
 Destroy TGo4FitNamed object.
 
const char * GetFullName ()
 Returns full name of object.
 
TNamed * GetOwner ()
 Return owner of object.
 
const char * GetOwnerFullName ()
 Return full name of owner.
 
void Print (Option_t *option="") const override
 
void SetOwner (TNamed *iOwner)
 Sets owner of object.
 

Protected Attributes

Double_t fdCoefB {0}
 
Double_t fdCoefK {0}
 
Int_t fiAxis {0}
 

Additional Inherited Members

- Protected Member Functions inherited from TGo4FitParsList
TGo4FitParameterAddPar (TGo4FitParameter *par)
 
void ClearParsBlocking ()
 
TGo4FitParameterFind (const char *OwnerFullName, const char *ParName)
 
TGo4FitParameterFind (const char *ParName)
 
TGo4FitParameterFind (TGo4FitParameter *par)
 
virtual TGo4FitParameterGet (Int_t n)
 
TGo4FitParameterInsertPar (TGo4FitParameter *par, Int_t indx)
 
Bool_t RemoveParByIndex (Int_t indx)
 
void SetParsOwner (TGo4FitNamed *iOwner)
 

Detailed Description

The linear transformation of selected data axis.

It has two coefficients to transfrom axis values like:

scale[naxis] = CoefK * scale[naxis] + CoefB

After linear transformation object is constructed, the coefficients can be defined by three ways:

  • SetCalibration() - just setting these coefficients;
  • SetCalibrationByRange() - coefficients defines from range and number of points in this range;
  • SetCalibrationByPoints() - coefficients calculates from coordinates of two points, where first coordinate is channel number and second - axis value.

Definition at line 39 of file TGo4FitLinearTrans.h.

Constructor & Destructor Documentation

◆ TGo4FitLinearTrans() [1/2]

TGo4FitLinearTrans::TGo4FitLinearTrans ( )

Definition at line 20 of file TGo4FitLinearTrans.cxx.

References TGo4FitAxisTrans::TGo4FitAxisTrans().

◆ TGo4FitLinearTrans() [2/2]

TGo4FitLinearTrans::TGo4FitLinearTrans ( const char * iName,
const char * iTitle,
Int_t iAxis = 0 )

◆ ~TGo4FitLinearTrans()

TGo4FitLinearTrans::~TGo4FitLinearTrans ( )
virtual

Definition at line 34 of file TGo4FitLinearTrans.cxx.

Member Function Documentation

◆ GetAxis()

Int_t TGo4FitLinearTrans::GetAxis ( ) const
inline

Definition at line 45 of file TGo4FitLinearTrans.h.

References fiAxis.

Referenced by QFitLinearTransWidget::FillSpecificData(), and Transformation().

◆ GetCoefB()

Double_t TGo4FitLinearTrans::GetCoefB ( )
inline

Definition at line 49 of file TGo4FitLinearTrans.h.

References TGo4FitParsList::GetPar(), and TGo4FitParameter::GetValue().

Referenced by Transformation().

◆ GetCoefK()

Double_t TGo4FitLinearTrans::GetCoefK ( )
inline

Definition at line 47 of file TGo4FitLinearTrans.h.

References TGo4FitParsList::GetPar(), and TGo4FitParameter::GetValue().

Referenced by Transformation().

◆ Print()

void TGo4FitLinearTrans::Print ( Option_t * option = "") const
override

Definition at line 54 of file TGo4FitLinearTrans.cxx.

References fiAxis, and TGo4FitNamed::Print().

◆ SetAxis()

void TGo4FitLinearTrans::SetAxis ( Int_t iAxis)
inline

Definition at line 46 of file TGo4FitLinearTrans.h.

References fiAxis.

Referenced by QFitLinearTransWidget::NumAxisSpin_valueChanged().

◆ SetCoef()

void TGo4FitLinearTrans::SetCoef ( Double_t iCoefK,
Double_t iCoefB )
inline

Definition at line 52 of file TGo4FitLinearTrans.h.

References TGo4FitParsList::GetPar(), and TGo4FitParameter::SetValue().

Referenced by SetCoefByPoints(), and SetCoefByRange().

◆ SetCoefB()

void TGo4FitLinearTrans::SetCoefB ( Double_t b)
inline

Definition at line 50 of file TGo4FitLinearTrans.h.

References TGo4FitParsList::GetPar(), and TGo4FitParameter::SetValue().

◆ SetCoefByPoints()

void TGo4FitLinearTrans::SetCoefByPoints ( Double_t n1,
Double_t y1,
Double_t n2,
Double_t y2 )

Definition at line 42 of file TGo4FitLinearTrans.cxx.

References fdCoefK, and SetCoef().

◆ SetCoefByRange()

void TGo4FitLinearTrans::SetCoefByRange ( Int_t nbins,
Double_t y1,
Double_t y2 )

Definition at line 37 of file TGo4FitLinearTrans.cxx.

References SetCoef().

Referenced by ConstructTrans().

◆ SetCoefK()

void TGo4FitLinearTrans::SetCoefK ( Double_t k)
inline

Definition at line 48 of file TGo4FitLinearTrans.h.

References TGo4FitParsList::GetPar(), and TGo4FitParameter::SetValue().

◆ Transformation()

void TGo4FitLinearTrans::Transformation ( Double_t * scales,
Int_t naxis )
overridevirtual

Implements TGo4FitAxisTrans.

Definition at line 48 of file TGo4FitLinearTrans.cxx.

References GetAxis(), GetCoefB(), and GetCoefK().

Field Documentation

◆ fdCoefB

Double_t TGo4FitLinearTrans::fdCoefB {0}
protected

Definition at line 64 of file TGo4FitLinearTrans.h.

◆ fdCoefK

Double_t TGo4FitLinearTrans::fdCoefK {0}
protected

Definition at line 63 of file TGo4FitLinearTrans.h.

Referenced by SetCoefByPoints().

◆ fiAxis

Int_t TGo4FitLinearTrans::fiAxis {0}
protected

Definition at line 62 of file TGo4FitLinearTrans.h.

Referenced by TGo4FitLinearTrans(), GetAxis(), Print(), and SetAxis().


The documentation for this class was generated from the following files: