KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVImpactParameters::rogly_fitting_function< PolyDegree > Class Template Reference

Detailed Description

template<unsigned int PolyDegree>
class KVImpactParameters::rogly_fitting_function< PolyDegree >

Exponential function relating mean value of observable to centrality.

Template Parameters
PolyDegreeThe degree of the polynomial, \(N\)

This implements the function

\[ k(c_b) = k_0 \exp{\left(-\sum_{i=1}^{N} a_i c_b^i\right)} \]

from Rogly et al., Phys. Rev. C 98, 024902(2018), describing the centrality dependence of the mean value of an observable which decreases monotonically with impact parameter.

Definition at line 27 of file rogly_fitting_function.h.

#include <rogly_fitting_function.h>

Public Member Functions

 rogly_fitting_function ()
 
 rogly_fitting_function (const rogly_fitting_function &prev_fit)
 
 rogly_fitting_function (std::initializer_list< double > params)
 
void backup_params ()
 
void fill_array_from_params (double *p) const
 
void fill_params_from_array (double *p)
 
double k_cb (double cb) const
 
double meanX (double cb) const
 
void normalise_shape_function ()
 
constexpr int npar () const
 
void print_fit_params () const
 
double redVar (double) const
 
void restore_params ()
 
void set_initial_parameters (TH1 *h, TF1 &f)
 
void set_par_names (TF1 &f) const
 

Private Attributes

ipde_fit_parameter kmax
 maximum of mean value for \(b=0\)
 
std::vector< ipde_fit_parameter > poly_param
 polynomial coefficients
 
ipde_fit_parameter theta_p
 fluctuation parameter \(\theta\)
 

Constructor & Destructor Documentation

◆ rogly_fitting_function() [1/3]

template<unsigned int PolyDegree>
KVImpactParameters::rogly_fitting_function< PolyDegree >::rogly_fitting_function ( )
inline

Definition at line 33 of file rogly_fitting_function.h.

◆ rogly_fitting_function() [2/3]

template<unsigned int PolyDegree>
KVImpactParameters::rogly_fitting_function< PolyDegree >::rogly_fitting_function ( const rogly_fitting_function< PolyDegree > &  prev_fit)
inline

Definition at line 36 of file rogly_fitting_function.h.

◆ rogly_fitting_function() [3/3]

template<unsigned int PolyDegree>
KVImpactParameters::rogly_fitting_function< PolyDegree >::rogly_fitting_function ( std::initializer_list< double >  params)
inline

Constructor with initializer list containing (in order): theta, kmax, PolyDegree coefficients

i.e. with PolyDegree=3 can construct with

rogly_fitting_function<3> fit_result{0.3, 25, -1.3, 0.21, -0.67}
Exponential function relating mean value of observable to centrality.

Definition at line 41 of file rogly_fitting_function.h.

Member Function Documentation

◆ backup_params()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::backup_params ( )
inline

Store all current values of parameters in backup

Definition at line 150 of file rogly_fitting_function.h.

◆ fill_array_from_params()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::fill_array_from_params ( double *  p) const
inline

Copy values of parameters into the array (interface to ROOT TF1)

Parameters
[in]paddress of an array of size given by npar()
[in]p[0]\(\theta\)
[in]p[1]\(k_{max}\)
[in]p[2]\(a_1\)
[in]p[...]...
[in]p[1+PolyDegree]\(a_{PolyDegree}\)

Definition at line 92 of file rogly_fitting_function.h.

◆ fill_params_from_array()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::fill_params_from_array ( double *  p)
inline

Set values of parameters from values in the array (interface to ROOT TF1)

Parameters
[in]paddress of an array of size given by npar()
[in]p[0]\(\theta\)
[in]p[1]\(k_{max}\)
[in]p[2]\(a_1\)
[in]p[...]...
[in]p[1+PolyDegree]\(a_{PolyDegree}\)

Definition at line 79 of file rogly_fitting_function.h.

◆ k_cb()

template<unsigned int PolyDegree>
double KVImpactParameters::rogly_fitting_function< PolyDegree >::k_cb ( double  cb) const
inline
Returns
value of \(k(c_b)\) for given centrality
Parameters
[in]cbcentrality

Definition at line 71 of file rogly_fitting_function.h.

◆ meanX()

template<unsigned int PolyDegree>
double KVImpactParameters::rogly_fitting_function< PolyDegree >::meanX ( double  cb) const
inline

Definition at line 175 of file rogly_fitting_function.h.

◆ normalise_shape_function()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::normalise_shape_function ( )
inline

Modify values of parameters so that \(k(c_b)\) varies between 1 at \(c_b=0\) to 0 at \(c_b=1\).

Todo:
Currently this just scales \(k_{max}\) to 1, the minimum at \(c_b=1\) will not be zero.

Definition at line 168 of file rogly_fitting_function.h.

◆ npar()

template<unsigned int PolyDegree>
constexpr int KVImpactParameters::rogly_fitting_function< PolyDegree >::npar ( ) const
inlineconstexpr
Returns
number of parameters for fitting function (=PolyDegree+2)

Definition at line 65 of file rogly_fitting_function.h.

◆ print_fit_params()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::print_fit_params ( ) const
inline

Definition at line 134 of file rogly_fitting_function.h.

◆ redVar()

template<unsigned int PolyDegree>
double KVImpactParameters::rogly_fitting_function< PolyDegree >::redVar ( double  ) const
inline

Definition at line 179 of file rogly_fitting_function.h.

◆ restore_params()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::restore_params ( )
inline

Retore all current values of parameters from backup

Definition at line 159 of file rogly_fitting_function.h.

◆ set_initial_parameters()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::set_initial_parameters ( TH1 h,
TF1 f 
)
inline

Set initial values for parameters in TF1 object based on data in histogram h

Parameters
[in]hhistogram with data (inclusive distribution of observable, \(P(X)\)) to be fitted
[in,out]fROOT function using this implementation of \(k(c_b)\)

Definition at line 118 of file rogly_fitting_function.h.

◆ set_par_names()

template<unsigned int PolyDegree>
void KVImpactParameters::rogly_fitting_function< PolyDegree >::set_par_names ( TF1 f) const
inline

double theta() const { // Get value of \(\theta\) parameter return theta_p.value; }

Set name of parameters in TF1 object

Parameters
[in,out]fROOT function using this implementation of \(k(c_b)\)

Definition at line 110 of file rogly_fitting_function.h.

Member Data Documentation

◆ kmax

template<unsigned int PolyDegree>
ipde_fit_parameter KVImpactParameters::rogly_fitting_function< PolyDegree >::kmax
private

maximum of mean value for \(b=0\)

Definition at line 29 of file rogly_fitting_function.h.

◆ poly_param

template<unsigned int PolyDegree>
std::vector<ipde_fit_parameter> KVImpactParameters::rogly_fitting_function< PolyDegree >::poly_param
private

polynomial coefficients

Definition at line 30 of file rogly_fitting_function.h.

◆ theta_p

template<unsigned int PolyDegree>
ipde_fit_parameter KVImpactParameters::rogly_fitting_function< PolyDegree >::theta_p
private

fluctuation parameter \(\theta\)

Definition at line 28 of file rogly_fitting_function.h.