1 #ifndef ROGLY_FITTING_FUNCTION_H
2 #define ROGLY_FITTING_FUNCTION_H
4 #include "ipde_fit_parameter.h"
8 #include "KVNameValueList.h"
27 template<
unsigned int PolyDegree>
52 for (
auto param : params) {
69 return PolyDegree + 2;
72 double k_cb(
double cb)
const
77 for (
unsigned int j = 1; j <= PolyDegree; ++j) kcb +=
poly_param[j - 1].
value *
pow(cb, j);
91 for (
unsigned int j = 1; j <= PolyDegree; ++j)
poly_param[j - 1].
value =
p[j + 1];
104 for (
unsigned int j = 1; j <= PolyDegree; ++j)
p[j + 1] =
poly_param[j - 1].
value ;
112 l.SetValue(
"kmax",
kmax.value);
120 f.SetParName(0,
"#theta");
121 f.SetParName(1,
"k_{max}");
122 for (
unsigned int j = 1; j <= PolyDegree; ++j)
f.SetParName(j + 1,
Form(
"a_{%d}", j));
129 f.SetParameter(0,
theta_p.value = 0.5);
130 f.SetParLimits(0, 0.1, 5);
135 for (
unsigned int j = 1; j <= PolyDegree; ++j) {
137 f.SetParLimits(j + 1, -5, 5);
142 std::cout <<
"Theta = ";
145 std::cout <<
"kmax = ";
147 std::cout <<
"(Xmax = " <<
theta_p.value*
kmax.value <<
")";
149 for (
unsigned int j = 1; j <= PolyDegree; ++j) {
150 std::cout <<
"a" << j <<
" = ";
#define ClassDef(name, id)
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Exponential function relating mean value of observable to centrality.
void set_initial_parameters(TH1 *h, TF1 &f)
double k_cb(double cb) const
KVNameValueList get_params() const
double meanX(double cb) const
void normalise_shape_function()
ipde_fit_parameter theta_p
fluctuation parameter
rogly_fitting_function(const rogly_fitting_function &prev_fit)
ipde_fit_parameter kmax
maximum of mean value for
void set_par_names(TF1 &f) const
void print_fit_params() const
rogly_fitting_function(std::initializer_list< double > params)
std::vector< ipde_fit_parameter > poly_param
polynomial coefficients
void fill_array_from_params(double *p) const
constexpr int npar() const
void fill_params_from_array(double *p)
double redVar(double) const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
virtual Double_t GetBinUpEdge(Int_t bin) const
virtual Int_t GetNbinsX() const
virtual Double_t Uniform(Double_t x1, Double_t x2)
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)