Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
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
15namespace 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
65
70 static const int ParameterCount = 11;
71
72 bool GCE;
73
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
156 };
157
158} // namespace thermalfist
159
160#endif
map< string, double > params
Abstract base class for an HRG model implementation.
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
Structure for an arbitrary fit parameter.
bool toFit
Whether the parameter is fitted or fixed.
double error
Parameter error (symmetric)
double xmax
Lower and uppers bounds on parameter value.
FitParameter(std::string namep="", bool toFitp=true, double val=1., double err=0., double vmin=-2., double vmax=2.)
Construct a new FitParameter object.
std::string name
Name of the parameter.
ThermalModelParameters GetThermalModelParameters()
Return ThermalModelParameters corresponding to the this ThermalModelFitParameters.
void SetParameter(const std::string &name, const FitParameter &param)
Set the FitParameter with a given name from a copy.
FitParameter Tkin
Since version 1.3: Kinetic freeze-out temperature.
void FillParameterList()
Fill ParameterList with pointers to all the parameters.
FitParameter T
All the fit parameters.
int IndexByName(const std::string &name) const
Find the index of the parameter with a given name in the ParameterList.
void SetParameterFitFlag(const std::string &name, bool toFit)
Set whether the FitParameter with a given name should be fitted.
ThermalModelFitParameters & operator=(const ThermalModelFitParameters &op)
Assignment operator.
std::vector< FitParameter * > ParameterList
Vector of pointer to all the parameters.
void SetParameterValue(const std::string &name, double value)
Set the value of the FitParameter with a given name.
FitParameter GetParameter(const std::string &name) const
Get the FitParameter by its name.
ThermalModelFitParameters(const ThermalModelParameters &params=ThermalModelParameters())
Default constructor.
Structure containing all thermal parameters of the model.