KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
algebraic_fitting_function.h
1#ifndef ALGEBRAIC_FITTING_FUNCTION_H
2#define ALGEBRAIC_FITTING_FUNCTION_H
3
4#include "ipde_fit_parameter.h"
5#include <TH1.h>
6namespace KVImpactParameters {
32 public:
33 ipde_fit_parameter k0; // minimum of k at c=1
34 ipde_fit_parameter alpha; // power of centrality
35 ipde_fit_parameter gamma; // power of (1-pow(c,alpha))
36 ipde_fit_parameter theta; // the (b-independent) fluctuation width Eqs(1),(2)
37 ipde_fit_parameter kmax; // value of k at b=0 Eq(8)
38 ipde_fit_parameter Xmax; // value of X at b=0
39 double chisquare;
40 double ndf;
41
42 bce_fit_results() = default;
44 : k0(other.k0), alpha(other.alpha), gamma(other.gamma), theta(other.theta), kmax(other.kmax), Xmax(other.Xmax)
45 {}
47 {
48 if (&other != this) {
49 k0 = (other.k0);
50 alpha = (other.alpha);
51 gamma = (other.gamma);
52 theta = (other.theta);
53 kmax = (other.kmax);
54 Xmax = (other.Xmax);
55 }
56 return *this;
57 }
58 void Print(Option_t* = "") const
59 {
61 std:: cout << " kmax = ";
62 kmax.print();
63 std::cout << " k0 = ";
64 k0.print();
65 std::cout << " alpha = ";
66 alpha.print();
67 std:: cout << " gamma = ";
68 gamma.print();
69 std::cout << " theta = ";
70 theta.print();
71 std::cout << std::endl;
72 }
74 public:
77 algebraic_fitting_function(double alph, double gam, double thet, double Xmi, double Xma);
79 {
82 }
84 {
87 }
89 {
91 params.kmax.value = 1. / params.theta.value;
92 params.k0.value = 0;
93 params.Xmax.value = 1;
94 }
95
96 int npar() const
97 {
98 return 5;
99 }
100 double k_cb(double cb) const;
101 void fill_params_from_array(double* p);
102 void fill_array_from_params(double* p) const;
103 double theta() const
104 {
105 return params.theta.value;
106 }
107 void set_par_names(TF1& f) const;
108 void set_initial_parameters(TH1* h, TF1& f);
109 void print_fit_params() const
110 {
111 params.Print();
112 }
113 double meanX(double cb) const
114 {
115 return theta() * k_cb(cb);
116 }
117 double redVar(double) const
118 {
119 return theta();
120 }
121 };
122
123}
124
125#endif // ALGEBRAIC_FITTING_FUNCTION_H
const char Option_t
Contains fit parameters for algebraic impact parameter dependence.
Algebraic relationship between mean value of observable and centrality.
class KVImpactParameters::algebraic_fitting_function::bce_fit_results param_backup
class KVImpactParameters::algebraic_fitting_function::bce_fit_results params