Thermal-FIST  1.3
Package for hadron resonance gas model applications
ThermalModelFitParameters.h
Go to the documentation of this file.
1 /*
2  * Thermal-FIST package
3  *
4  * Copyright (c) 2019 Volodymyr Vovchenko
5  *
6  * GNU General Public License (GPLv3 or later)
7  */
8 #ifndef THERMALMODELFITPARAMETERS_H
9 #define THERMALMODELFITPARAMETERS_H
10 
11 #include <string>
12 
14 
15 namespace thermalfist {
16 
20  struct FitParameter {
23  double value;
24 
25  double error;
26  double errp, errm;
27  double xmin, xmax;
28  bool toFit;
29  std::string name;
30 
34  FitParameter(std::string namep = "", bool toFitp = true, double val = 1., double err = 0., double vmin = -2., double vmax = 2.) :
35  toFit(toFitp), value(val), error(err), errp(err), errm(err), xmin(vmin), xmax(vmax), name(namep) {
36  }
37  };
38 
54 
56 
58  double chi2ndf;
59 
61  FitParameter nH, rhoB, rhoQ, en, entropy, pressure;
64  };
65 
70  static const int ParameterCount = 11;
71 
72  bool GCE;
73 
75  FitParameter T, muB, muS, muQ, muC, gammaq, gammaS, gammaC, R, Rc;
76 
79 
81  std::vector<FitParameter*> ParameterList;
82 
84  int B, S, Q, C;
85 
87  double chi2;
88 
90  double chi2ndf;
91 
93  int ndf;
94 
103 
106 
109 
111  void FillParameterList();
112 
114  int IndexByName(const std::string& name) const;
115 
117 
123  FitParameter GetParameter(const std::string& name) const;
124  FitParameter& GetParameter(const std::string& name);
126 
128 
134  FitParameter GetParameter(const int index) const;
135  FitParameter& GetParameter(const int index);
137 
139  void SetParameter(const std::string& name, const FitParameter& param);
140 
146  void SetParameter(const std::string& name, double val, double err, double xmin, double xmax);
147 
149  void SetParameterValue(const std::string& name, double value);
150 
152  void SetParameterFitFlag(const std::string& name, bool toFit);
153 
155  ThermalModelParameters GetThermalModelParameters();
156  };
157 
158 } // namespace thermalfist
159 
160 #endif
Abstract base class for an HRG model implementation.
FitParameter T
All the fit parameters.
FitParameter(std::string namep="", bool toFitp=true, double val=1., double err=0., double vmin=-2., double vmax=2.)
Construct a new FitParameter object.
int ndf
Number of degrees of freedom.
Structure containing all thermal parameters of the model.
Extended structure for calculating uncertainties in non-fit quantities resulting from uncertanties in...
double xmax
Lower and uppers bounds on parameter value.
std::string name
Name of the parameter.
Structure holding information about parameters of a thermal fit.
std::vector< FitParameter * > ParameterList
Vector of pointer to all the parameters.
Structure for an arbitrary fit parameter.
bool toFit
Whether the parameter is fitted or fixed.
FitParameter Tkin
Since version 1.3: Kinetic freeze-out temperature.
double error
Parameter error (symmetric)
The main namespace where all classes and functions of the Thermal-FIST library reside.
double errm
Asymmetric errors.