Thermal-FIST
1.3
Package for hadron resonance gas model applications
|
Class implementing the thermal model fit procedure. More...
#include <ThermalModelFit.h>
Public Member Functions | |
ThermalModelFit (ThermalModelBase *model) | |
Construct a new ThermalModelFit object. More... | |
~ThermalModelFit (void) | |
Destroy the Thermal Model Fit object. More... | |
void | SetFitFlag (const std::string &name, bool flag) |
Set whether FitParameter with a given name should be fitted. More... | |
void | SetData (const std::vector< FittedQuantity > &inData) |
Sets the data to fit. More... | |
void | SetQuantities (const std::vector< FittedQuantity > &inQuantities) |
Same as SetData() More... | |
void | AddData (const std::vector< FittedQuantity > &inData) |
Add more data to fit. More... | |
void | AddQuantities (const std::vector< FittedQuantity > &inQuantities) |
Same as AddData() More... | |
void | AddDataPoint (const FittedQuantity &inDataPoint) |
Add one more data point to fit. More... | |
void | AddQuantity (const FittedQuantity &inQuantity) |
Same as AddDataPoint() More... | |
void | ClearData () |
Clear the fitted data. More... | |
void | ClearQuantities () |
Same as ClearData() More... | |
void | PrintFitLog (std::string filename="", std::string comment="Thermal fit", bool asymm=false) |
Prints the result of the fitting procedure to a file. More... | |
ThermalModelFitParameters | PerformFit (bool verbose=true, bool AsymmErrors=false) |
The thermal fit procedure. More... | |
int | GetNdf () const |
Number of degrees of freedom in the fit. More... | |
void | Increment () |
Used by MINUIT. More... | |
const ThermalModelFitParameters & | Parameters () const |
void | SetParameters (const ThermalModelFitParameters ¶ms) |
Sets the fit parameters. More... | |
void | SetParameter (const std::string &name, const FitParameter ¶m) |
Sets the fit parameter with a given name. More... | |
void | SetParameter (const std::string &name, double val, double err, double xmin, double xmax) |
Sets the fit parameter with a given name. More... | |
void | SetParameterValue (const std::string &name, double value) |
Sets the (initial) value for the fit parameter with a given name. More... | |
void | SetParameterFitFlag (const std::string &name, bool toFit) |
Sets whether the fit parameter with a given name is fitted. More... | |
const ThermalModelFitParametersExtended & | ExtendedParameters () const |
ThermalModelBase * | model () |
ThermalModelPCE * | modelpce () |
void | SetSBConstraint (double SB) |
void | SetQBConstraint (double QB) |
double | SoverB () const |
double | QoverB () const |
const std::vector< ExperimentMultiplicity > & | Multiplicities () const |
const std::vector< ExperimentRatio > & | Ratios () const |
const std::vector< FittedQuantity > & | FittedQuantities () const |
Return a vector of the fitted quantities (data) More... | |
void | UseTkin (bool YieldsAtTkin) |
Sets whether the yields should be evaluated at Tkin using partial chemical equilibrium. More... | |
bool | UseTkin () const |
void | UseSahaForNuclei (bool UseSaha) |
Sets whether the nuclear abundances are evaluated in PCE using the Saha equation. More... | |
void | PCEFreezeLongLived (bool FreezeLongLived) |
Sets whether the yields of long-lived resonance are frozen in the PCE. More... | |
void | SetPCEWidthCut (double WidthCut) |
Sets the resonance width cut for freezeing the yields of long-lived resonances. More... | |
std::pair< double, double > | ModelDescriptionAccuracy () const |
Returns a relative error of the data description (and its uncertainty estimate) More... | |
void | SetRatios (const std::vector< ExperimentRatio > &inRatios) |
void | AddRatios (const std::vector< ExperimentRatio > &inRatios) |
void | AddRatio (const ExperimentRatio &inRatio) |
void | ClearRatios () |
void | PrintRatios () |
void | SetMultiplicities (const std::vector< ExperimentMultiplicity > &inMultiplicities) |
void | AddMultiplicities (const std::vector< ExperimentMultiplicity > &inMultiplicities) |
void | AddMultiplicity (const ExperimentMultiplicity &inMultiplicity) |
void | ClearMultiplicities () |
void | PrintParameters () |
Print function. More... | |
void | PrintMultiplicities () |
void | PrintYields () |
void | PrintYieldsTable (std::string filename="Yield.dat") |
void | PrintYieldsTable2 (std::string filename="Yield.dat") |
void | PrintYieldsLatex (std::string filename="Yield.dat", std::string name="A+A") |
void | PrintYieldsLatexAll (std::string filename="Yield.dat", std::string name="A+A", bool asymm=false) |
int & | Iters () |
double & | Chi2 () |
double & | BT () |
double & | QT () |
double & | ST () |
double & | CT () |
double & | ModelData (int index) |
int | ModelDataSize () const |
void | ClearModelData () |
int & | Ndf () |
void | FixVcOverV (bool fix) |
bool | FixVcOverV () const |
void | SetVcOverV (double VcOverV) |
double | VcOverV () const |
Static Public Member Functions | |
static std::vector< FittedQuantity > | loadExpDataFromFile (const std::string &filename) |
Load the experimental data from a file. More... | |
static void | saveExpDataToFile (const std::vector< FittedQuantity > &outQuantities, const std::string &filename) |
Class implementing the thermal model fit procedure.
Performs a fit within a generic HRG model to a set of measured multiplicities and/or yield ratios. This is achieved by minimizing
\[ \chi^2 = \frac{\chi^2}{N_{\rm dof}} ~=~\frac{1}{N_{\rm dof}}\sum_{i=1}^N\frac{\left(N_i^{\rm exp}~-~N_i^{\rm HRG}\right)^2}{\sigma_i^2} \]
with MINUIT2.
The actual HRG model to use is provided through a pointer to the corresponding thermalfist::ThermalModelBase object in the constructor.
The fitted thermal parameters can be specified in a thermalfist::ThermalModelFitParameters object and should be provided through the SetParameters() method.
The data to fit can be specified as vector of FittedQuantity objects. It can be provided through the SetQuantities() method, the data can be read from a file with loadExpDataFromFile().
Finally, the fit procedure is invoked through the PerformFit() method.
Definition at line 51 of file ThermalModelFit.h.
thermalfist::ThermalModelFit::ThermalModelFit | ( | ThermalModelBase * | model | ) |
Construct a new ThermalModelFit object.
model | Pointer to the ThermalModelBase object which implements the HRG model to use in fits |
Definition at line 214 of file ThermalModelFit.cpp.
thermalfist::ThermalModelFit::~ThermalModelFit | ( | void | ) |
Destroy the Thermal Model Fit object.
Definition at line 221 of file ThermalModelFit.cpp.
|
inline |
Add more data to fit.
inData | A vector of additional measurements to fit |
Definition at line 92 of file ThermalModelFit.h.
|
inline |
Add one more data point to fit.
inDataPoint | Data point to fit |
Definition at line 103 of file ThermalModelFit.h.
|
inline |
Definition at line 146 of file ThermalModelFit.h.
|
inline |
Definition at line 153 of file ThermalModelFit.h.
|
inline |
Same as AddData()
Definition at line 98 of file ThermalModelFit.h.
|
inline |
Same as AddDataPoint()
Definition at line 112 of file ThermalModelFit.h.
|
inline |
Definition at line 133 of file ThermalModelFit.h.
|
inline |
Definition at line 126 of file ThermalModelFit.h.
|
inline |
Definition at line 275 of file ThermalModelFit.h.
|
inline |
Definition at line 273 of file ThermalModelFit.h.
|
inline |
Clear the fitted data.
Definition at line 115 of file ThermalModelFit.h.
|
inline |
Definition at line 287 of file ThermalModelFit.h.
|
inline |
Definition at line 158 of file ThermalModelFit.h.
|
inline |
Same as ClearData()
Definition at line 118 of file ThermalModelFit.h.
|
inline |
Definition at line 138 of file ThermalModelFit.h.
|
inline |
Definition at line 281 of file ThermalModelFit.h.
|
inline |
Definition at line 226 of file ThermalModelFit.h.
|
inline |
Return a vector of the fitted quantities (data)
Definition at line 266 of file ThermalModelFit.h.
|
inline |
Whether the correlation volume is tied to the total volume or an independent parameter.
Definition at line 295 of file ThermalModelFit.h.
|
inline |
Definition at line 296 of file ThermalModelFit.h.
int thermalfist::ThermalModelFit::GetNdf | ( | ) | const |
Number of degrees of freedom in the fit.
Definition at line 1418 of file ThermalModelFit.cpp.
|
inline |
Used by MINUIT.
Definition at line 204 of file ThermalModelFit.h.
|
inline |
Used for real-time monitoring in the GUI.
Definition at line 271 of file ThermalModelFit.h.
|
static |
Load the experimental data from a file.
Definition at line 1267 of file ThermalModelFit.cpp.
|
inline |
Pointer to a ThermalModelBase object implementing the HRG model used
Definition at line 230 of file ThermalModelFit.h.
|
inline |
Definition at line 283 of file ThermalModelFit.h.
|
inline |
Definition at line 285 of file ThermalModelFit.h.
std::pair< double, double > thermalfist::ThermalModelFit::ModelDescriptionAccuracy | ( | ) | const |
Returns a relative error of the data description (and its uncertainty estimate)
Definition at line 1236 of file ThermalModelFit.cpp.
|
inline |
Pointer to a ThermalModelBase object implementing the partial chemical equilibrium HRG model used
Definition at line 234 of file ThermalModelFit.h.
|
inline |
Return a vector of the fitted multiplicities (yields) Ignores the ratios
Definition at line 259 of file ThermalModelFit.h.
|
inline |
Definition at line 289 of file ThermalModelFit.h.
|
inline |
Current fit parameters. Contains the fit result after PerformFit() was called.
Definition at line 208 of file ThermalModelFit.h.
|
inline |
Sets whether the yields of long-lived resonance are frozen in the PCE.
Definition at line 316 of file ThermalModelFit.h.
ThermalModelFitParameters thermalfist::ThermalModelFit::PerformFit | ( | bool | verbose = true , |
bool | AsymmErrors = false |
||
) |
The thermal fit procedure.
Performs a thermal fit of thermal parameters, specified by SetParameters(), to the experimental data, provided through SetQuantities(), within a HRG model provided by a pointer to thermalfist::ThermalModelBase in constructor.
Returns a thermalfist::ThermalModelFitParameters parameters object containing the values and errors of the fitted thermal parameters resulting from \( \chi^2 \) minimization.
verbose | If true, additional output is shown on screen during the fitting |
AsymmErrors | If true, asymmetric error bars are computed |
Definition at line 225 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintFitLog | ( | std::string | filename = "" , |
std::string | comment = "Thermal fit" , |
||
bool | asymm = false |
||
) |
Prints the result of the fitting procedure to a file.
Definition at line 982 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintMultiplicities | ( | ) |
Definition at line 594 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintParameters | ( | ) |
Print function.
Definition at line 575 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintRatios | ( | ) |
Definition at line 557 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintYields | ( | ) |
Definition at line 626 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintYieldsLatex | ( | std::string | filename = "Yield.dat" , |
std::string | name = "A+A" |
||
) |
Definition at line 763 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintYieldsLatexAll | ( | std::string | filename = "Yield.dat" , |
std::string | name = "A+A" , |
||
bool | asymm = false |
||
) |
Definition at line 822 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintYieldsTable | ( | std::string | filename = "Yield.dat" | ) |
Definition at line 679 of file ThermalModelFit.cpp.
void thermalfist::ThermalModelFit::PrintYieldsTable2 | ( | std::string | filename = "Yield.dat" | ) |
Definition at line 728 of file ThermalModelFit.cpp.
|
inline |
Definition at line 255 of file ThermalModelFit.h.
|
inline |
Definition at line 277 of file ThermalModelFit.h.
|
inline |
Return a vector of the fitted yield ratios Ignores the multiplicities
Definition at line 263 of file ThermalModelFit.h.
|
static |
Definition at line 1376 of file ThermalModelFit.cpp.
|
inline |
Sets the data to fit.
inData | A vector of measurements to fit |
Definition at line 79 of file ThermalModelFit.h.
|
inline |
Set whether FitParameter with a given name should be fitted.
name | FitParameter name |
flag | true – fitted, false – not fitted |
Definition at line 71 of file ThermalModelFit.h.
|
inline |
Definition at line 142 of file ThermalModelFit.h.
|
inline |
Sets the fit parameter with a given name.
Definition at line 214 of file ThermalModelFit.h.
|
inline |
Sets the fit parameter with a given name.
Definition at line 217 of file ThermalModelFit.h.
|
inline |
Sets whether the fit parameter with a given name is fitted.
Definition at line 223 of file ThermalModelFit.h.
|
inline |
Sets the fit parameters.
Definition at line 211 of file ThermalModelFit.h.
|
inline |
Sets the (initial) value for the fit parameter with a given name.
Definition at line 220 of file ThermalModelFit.h.
|
inline |
Sets the resonance width cut for freezeing the yields of long-lived resonances.
Definition at line 319 of file ThermalModelFit.h.
|
inline |
Set the electric-to-baryon charge ratio constraint for \(\mu_Q \)
Definition at line 246 of file ThermalModelFit.h.
|
inline |
Same as SetData()
Definition at line 87 of file ThermalModelFit.h.
|
inline |
Definition at line 122 of file ThermalModelFit.h.
|
inline |
Set the entropy per baryon constraint for \(\mu_B \)
Definition at line 238 of file ThermalModelFit.h.
|
inline |
The value of the correlation volume over the total volume ratio, \( V_c / V \). If FixVcOverV() is set to true this value is used fix \( V_c \) by the total volume.
Definition at line 304 of file ThermalModelFit.h.
|
inline |
Definition at line 253 of file ThermalModelFit.h.
|
inline |
Definition at line 279 of file ThermalModelFit.h.
|
inline |
Sets whether the nuclear abundances are evaluated in PCE using the Saha equation.
Definition at line 313 of file ThermalModelFit.h.
|
inline |
Sets whether the yields should be evaluated at Tkin using partial chemical equilibrium.
Definition at line 309 of file ThermalModelFit.h.
|
inline |
Definition at line 310 of file ThermalModelFit.h.
|
inline |
Definition at line 305 of file ThermalModelFit.h.