Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Hal::CorrFit Class Reference
Inheritance diagram for Hal::CorrFit:
Hal::CorrFitFunc Hal::CorrFit1DCF Hal::CorrFitFunc3D Hal::CorrFit1DCFCumac Hal::CorrFit1DCF_Exp Hal::CorrFit1DCF_Gauss Hal::CorrFit1DCF_Lorentz Hal::CorrFit1DCF_Poly Hal::CorrFit1DCF_Square Hal::CorrFitKisiel Hal::CorrFitMath1DCF Hal::CorrFit3DCF

Public Types

enum  EMinFunc { kChi , kLog , kChi2 }
 
enum  EMinAlgo {
  kMinuitMigrad , kMinuitSimplex , kMinuitCombined , kMinuitScan ,
  kMinuitFumili , kGLSMultiMinConjungateFR , kGLSMultiMinConjugatePR , kGLSMultiMinBFGS ,
  kGLSMultiMinBFGS2 , kGLSMultiMinSteppestDescent , kGLSMultiFit , kGLSSimAn ,
  kDefaultAlgo , kHalScan , kHalAnt , kHalScanMigrad ,
  kHalScanScan
}
 
enum  ECalcOption { kSimple , kExtrapolated }
 

Public Member Functions

 CorrFit (Int_t parameters_no=2)
 
void SetParLimits (Int_t par, Double_t min, Double_t max)
 
void FixParameter (Int_t par, Double_t val)
 
void SetParameterName (Int_t par, TString name)
 
void SetLineColor (Color_t color)
 
void SetLineStyle (Style_t style)
 
void SetLineWidth (Width_t width)
 
void SetThreshold (Double_t thres)
 
void PrintFitResults () const
 
Bool_t IsParFixed (Int_t par) const
 
Bool_t IsParDiscrete (Int_t par) const
 
Double_t GetParMin (Int_t par) const
 
Double_t GetParMax (Int_t par) const
 
Double_t GetParError (Int_t par) const
 
Double_t GetParameter (Int_t par) const
 
const FitParamGetParamConf (Int_t par) const
 
Double_t GetNDF () const
 
Int_t GetParametersNo () const
 
Int_t GetParameterIndex (TString name) const
 
TString GetParameterName (Int_t no) const
 
virtual void SetMinimizer (EMinAlgo alg)
 
void SetMinimizedFunc (EMinFunc f)
 
void SetCalculationOption (ECalcOption f)
 
CorrFitPainterGetPainter () const
 

Protected Member Functions

std::vector< TString > AlgoToOptions (EMinAlgo algo) const
 
void CheckOrder ()
 
void ChangeParametersNo ()
 
virtual void ParametersChanged () const
 
Color_t GetLineColor () const
 
Style_t GetLineStyle () const
 
Width_t GetLineWidth () const
 
TF1 * GetTF1 (Int_t no) const
 
std::vector< std::pair< TF1 *, TVirtualPad * > > GetDrawFunctions () const
 
void OverwriteParam (Int_t par, Double_t val)
 
void CopyParamsToTF1 (TF1 *f, Bool_t copyNumPar=kTRUE, Bool_t copyGrapPar=kTRUE) const
 
void SetErrorsNegative ()
 
void SetFitOrder (std::initializer_list< Int_t > order)
 

Protected Attributes

ECalcOption fBinCalc
 
EMinFunc fMinFunc
 
EMinAlgo fMinAlgo
 
CorrFitPainterfPainter = {nullptr}
 
Int_t fNDF
 
Double_t fThreshold
 
std::vector< FitParamfParameters
 
std::vector< Int_t > fFitOrder
 
std::vector< std::pair< TF1 *, TVirtualPad * > > fDrawFunc
 
Double_t * fTempParamsEval
 

Friends

class CorrFitGUI
 

Detailed Description

Definition at line 33 of file CorrFit.h.

Member Enumeration Documentation

◆ ECalcOption

specify the way how the CF is calculated

Enumerator
kExtrapolated 

simple way of calculation of the CF extrapolate value of the CF by using information from bin edges

Definition at line 77 of file CorrFit.h.

◆ EMinAlgo

enum Hal::CorrFit::EMinAlgo

Definition at line 57 of file CorrFit.h.

◆ EMinFunc

Enumerator
kChi 

minimize function fitted to numerator

kLog 

loglikehood minimization

kChi2 

minimize function fitted to function

Definition at line 52 of file CorrFit.h.

Constructor & Destructor Documentation

◆ CorrFit()

Hal::CorrFit::CorrFit ( Int_t parameters_no = 2)

Definition at line 18 of file CorrFit.cxx.

◆ ~CorrFit()

Hal::CorrFit::~CorrFit ( )
virtual

Definition at line 188 of file CorrFit.cxx.

Member Function Documentation

◆ AlgoToOptions()

std::vector< TString > Hal::CorrFit::AlgoToOptions ( EMinAlgo algo) const
protected

Definition at line 36 of file CorrFit.cxx.

◆ ChangeParametersNo()

void Hal::CorrFit::ChangeParametersNo ( )
protected

resize arrays used for storing parameters, it should be called only if number of parameters is not the same as in ctor

Definition at line 96 of file CorrFit.cxx.

◆ CheckOrder()

void Hal::CorrFit::CheckOrder ( )
protected

check parameter order, if wrong, fix it

Definition at line 221 of file CorrFit.cxx.

◆ CopyParamsToTF1()

void Hal::CorrFit::CopyParamsToTF1 ( TF1 * f,
Bool_t copyNumPar = kTRUE,
Bool_t copyGrapPar = kTRUE ) const
protected

copy current parameters into given TF1

Parameters
ffunction to set
copyNumParcopy values of parameters
copyGraphParcopy graphical settings of this function (line color etc.)

Definition at line 175 of file CorrFit.cxx.

◆ FixParameter()

void Hal::CorrFit::FixParameter ( Int_t par,
Double_t val )

fix parameter

Parameters
parparameter no
valvalue for fixing

Definition at line 106 of file CorrFit.cxx.

◆ GetDrawFunctions()

std::vector< std::pair< TF1 *, TVirtualPad * > > Hal::CorrFit::GetDrawFunctions ( ) const
inlineprotected
Returns
pointers to drawable functions (if exists) and their pads

Definition at line 148 of file CorrFit.h.

◆ GetLineColor()

Color_t Hal::CorrFit::GetLineColor ( ) const
inlineprotected
Returns
line color

Definition at line 127 of file CorrFit.h.

◆ GetLineStyle()

Style_t Hal::CorrFit::GetLineStyle ( ) const
inlineprotected
Returns
line style

Definition at line 132 of file CorrFit.h.

◆ GetLineWidth()

Width_t Hal::CorrFit::GetLineWidth ( ) const
inlineprotected
Returns
line widht

Definition at line 137 of file CorrFit.h.

◆ GetNDF()

Double_t Hal::CorrFit::GetNDF ( ) const
inline
Returns
number of degree of freedom fitted function

Definition at line 264 of file CorrFit.h.

◆ GetPainter()

CorrFitPainter * Hal::CorrFit::GetPainter ( ) const
inline
Returns
painter for this class (if exists)

Definition at line 303 of file CorrFit.h.

◆ GetParamConf()

const FitParam & Hal::CorrFit::GetParamConf ( Int_t par) const
inline
Parameters
par
Returns
step for discrete parameter

Definition at line 259 of file CorrFit.h.

◆ GetParameter()

Double_t Hal::CorrFit::GetParameter ( Int_t par) const
Parameters
parparameter no
Returns
value of fitted parameter

Definition at line 141 of file CorrFit.cxx.

◆ GetParameterIndex()

Int_t Hal::CorrFit::GetParameterIndex ( TString name) const
Parameters
parameternumber
Returns
parameter index, -1 if no parameter with given name was found

Definition at line 114 of file CorrFit.cxx.

◆ GetParameterName()

TString Hal::CorrFit::GetParameterName ( Int_t no) const
inline
Parameters
noparameter name
Returns
parameter name

Definition at line 280 of file CorrFit.h.

◆ GetParametersNo()

Int_t Hal::CorrFit::GetParametersNo ( ) const
inline
Returns
number of parameters

Definition at line 269 of file CorrFit.h.

◆ GetParError()

Double_t Hal::CorrFit::GetParError ( Int_t par) const
Parameters
parparameter no
Returns
error from fitting given parameter

Definition at line 149 of file CorrFit.cxx.

◆ GetParMax()

Double_t Hal::CorrFit::GetParMax ( Int_t par) const
Parameters
parparameter id
Returns
uppper value of parameter range

Definition at line 136 of file CorrFit.cxx.

◆ GetParMin()

Double_t Hal::CorrFit::GetParMin ( Int_t par) const
Parameters
parparameter id
Returns
lower value of parameter range

Definition at line 131 of file CorrFit.cxx.

◆ GetTF1()

TF1 * Hal::CorrFit::GetTF1 ( Int_t no) const
inlineprotected
Parameters
no
Returns
pointer to drawable function (if exists)

Definition at line 143 of file CorrFit.h.

◆ IsParDiscrete()

Bool_t Hal::CorrFit::IsParDiscrete ( Int_t par) const
Parameters
par
Returns
true if parameter is discrete

Definition at line 126 of file CorrFit.cxx.

◆ IsParFixed()

Bool_t Hal::CorrFit::IsParFixed ( Int_t par) const
Parameters
parparameter id
Returns
true if parameter is fixed, false otherwise

Definition at line 121 of file CorrFit.cxx.

◆ OverwriteParam()

void Hal::CorrFit::OverwriteParam ( Int_t par,
Double_t val )
inlineprotected

overwrite fitted parameter (used by GUI)

Parameters
par
val

Definition at line 154 of file CorrFit.h.

◆ ParametersChanged()

virtual void Hal::CorrFit::ParametersChanged ( ) const
inlineprotectedvirtual

used to recalculate parameters

Reimplemented in Hal::CorrFitFunc, and Hal::CorrFitMath3DCF.

Definition at line 122 of file CorrFit.h.

◆ PrintFitResults()

void Hal::CorrFit::PrintFitResults ( ) const

display fit resutls

Definition at line 157 of file CorrFit.cxx.

◆ SetCalculationOption()

void Hal::CorrFit::SetCalculationOption ( ECalcOption f)
inline

set option of calcuation of the value of the CF for given bin

Parameters
foption of calculation : kSimple - assume that CF(x) i equalt to CF(bin_center) kExtrapolated calculate the value of the CF by information from histogram edges

Definition at line 298 of file CorrFit.h.

◆ SetErrorsNegative()

void Hal::CorrFit::SetErrorsNegative ( )
protected

set all uncertainties negative (uses for gui when user change params

Definition at line 196 of file CorrFit.cxx.

◆ SetFitOrder()

void Hal::CorrFit::SetFitOrder ( std::initializer_list< Int_t > order)
protected

set order of parameters pass to minizer - can be used for optimization code performance

Parameters
order

Definition at line 201 of file CorrFit.cxx.

◆ SetLineColor()

void Hal::CorrFit::SetLineColor ( Color_t color)
inline

set line color

Parameters
colorcolor to set

Definition at line 196 of file CorrFit.h.

◆ SetLineStyle()

void Hal::CorrFit::SetLineStyle ( Style_t style)
inline

set line style

Parameters
style

Definition at line 201 of file CorrFit.h.

◆ SetLineWidth()

void Hal::CorrFit::SetLineWidth ( Width_t width)
inline

set line widht

Parameters
width

Definition at line 206 of file CorrFit.h.

◆ SetMinimizedFunc()

void Hal::CorrFit::SetMinimizedFunc ( EMinFunc f)
inline

set minimized function, might be overwriten by fit option

Parameters
f

Definition at line 291 of file CorrFit.h.

◆ SetMinimizer()

virtual void Hal::CorrFit::SetMinimizer ( EMinAlgo alg)
inlinevirtual

set minimizer (library and type of minimizaltion algorithm. this might be overwriten by fit option

Parameters
alg

Reimplemented in Hal::CorrFit3DCFMultiDim.

Definition at line 286 of file CorrFit.h.

◆ SetParameterName()

void Hal::CorrFit::SetParameterName ( Int_t par,
TString name )

set name of parameter

Parameters
parparameter no
namename of parameter

Definition at line 110 of file CorrFit.cxx.

◆ SetParLimits()

void Hal::CorrFit::SetParLimits ( Int_t par,
Double_t min,
Double_t max )

set litms on given parameter

Parameters
parparameter number
minlowest value of parameter
maxhightes value of parameter

Definition at line 102 of file CorrFit.cxx.

◆ SetThreshold()

void Hal::CorrFit::SetThreshold ( Double_t thres)
inline

set threshold value used for calculation of CF, if number of entries if numerator or denominator for given bin is smaller than threshold value then such bin is not taken into account during calculations of chi2

Parameters
thresthreshold value

Definition at line 213 of file CorrFit.h.

Friends And Related Symbol Documentation

◆ CorrFitGUI

friend class CorrFitGUI
friend

Definition at line 34 of file CorrFit.h.

Member Data Documentation

◆ fBinCalc

ECalcOption Hal::CorrFit::fBinCalc
protected

specify how to calculate the value of CF

Definition at line 87 of file CorrFit.h.

◆ fDrawFunc

std::vector<std::pair<TF1*, TVirtualPad*> > Hal::CorrFit::fDrawFunc
protected

Definition at line 105 of file CorrFit.h.

◆ fFitOrder

std::vector<Int_t> Hal::CorrFit::fFitOrder
protected

Definition at line 104 of file CorrFit.h.

◆ fMinAlgo

EMinAlgo Hal::CorrFit::fMinAlgo
protected

Definition at line 89 of file CorrFit.h.

◆ fMinFunc

EMinFunc Hal::CorrFit::fMinFunc
protected

Definition at line 88 of file CorrFit.h.

◆ fNDF

Int_t Hal::CorrFit::fNDF
protected

number of degrees of freedom

Definition at line 95 of file CorrFit.h.

◆ fPainter

CorrFitPainter* Hal::CorrFit::fPainter = {nullptr}
protected

Definition at line 90 of file CorrFit.h.

◆ fParameters

std::vector<FitParam> Hal::CorrFit::fParameters
protected

max step

Definition at line 103 of file CorrFit.h.

◆ fTempParamsEval

Double_t* Hal::CorrFit::fTempParamsEval
mutableprotected

flat array used to pass arguments int cf eval and recalculate

Definition at line 109 of file CorrFit.h.

◆ fThreshold

Double_t Hal::CorrFit::fThreshold
protected

minimal number of entries in numerator and denominator in bin

Definition at line 99 of file CorrFit.h.


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