KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
algebraic_fitting_function.h
Go to the documentation of this file.
1 #ifndef ALGEBRAIC_FITTING_FUNCTION_H
2 #define ALGEBRAIC_FITTING_FUNCTION_H
3 
4 #include "ipde_fit_parameter.h"
5 #include <TH1.h>
6 namespace KVImpactParameters {
30  public:
31  ipde_fit_parameter k0; // minimum of k at c=1
32  ipde_fit_parameter alpha; // power of centrality
33  ipde_fit_parameter gamma; // power of (1-pow(c,alpha))
34  ipde_fit_parameter theta; // the (b-independent) fluctuation width Eqs(1),(2)
35  ipde_fit_parameter kmax; // value of k at b=0 Eq(8)
36  ipde_fit_parameter Xmax; // value of X at b=0
37  double chisquare;
38  double ndf;
39 
40  bce_fit_results() = default;
42  : k0(other.k0), alpha(other.alpha), gamma(other.gamma), theta(other.theta), kmax(other.kmax), Xmax(other.Xmax)
43  {}
45  {
46  if (&other != this) {
47  k0 = (other.k0);
48  alpha = (other.alpha);
49  gamma = (other.gamma);
50  theta = (other.theta);
51  kmax = (other.kmax);
52  Xmax = (other.Xmax);
53  }
54  return *this;
55  }
56  void Print(Option_t* = "") const
57  {
59  std:: cout << " kmax = ";
60  kmax.print();
61  std::cout << " k0 = ";
62  k0.print();
63  std::cout << " alpha = ";
64  alpha.print();
65  std:: cout << " gamma = ";
66  gamma.print();
67  std::cout << " theta = ";
68  theta.print();
69  std::cout << std::endl;
70  }
72  public:
75  algebraic_fitting_function(double alph, double gam, double thet, double Xmi, double Xma);
77  {
80  }
82  {
85  }
87  {
89  params.kmax.value = 1. / params.theta.value;
90  params.k0.value = 0;
91  params.Xmax.value = 1;
92  }
93 
94  int npar() const
95  {
96  return 5;
97  }
98  double k_cb(double cb) const;
99  void fill_params_from_array(double* p);
100  void fill_array_from_params(double* p) const;
101  double theta() const
102  {
103  return params.theta.value;
104  }
105  void set_par_names(TF1& f) const;
106  void set_initial_parameters(TH1* h, TF1& f);
107  void print_fit_params() const
108  {
109  params.Print();
110  }
111  double meanX(double cb) const
112  {
113  return theta() * k_cb(cb);
114  }
115  double redVar(double) const
116  {
117  return theta();
118  }
119  };
120 
121 }
122 
123 #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