Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
ThermalModelFitQuantities.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 THERMALMODELFITQUANTITIES_H
9#define THERMALMODELFITQUANTITIES_H
10
11#include <string>
12
14
20
21namespace thermalfist {
22
30 long long fPDGID;
31
33 double fValue;
34
36 double fError;
37
40
49 ExperimentMultiplicity(long long PDGID = -211, double value = 300., double error = 20., Feeddown::Type fd = Feeddown::StabilityFlag) :
50 fPDGID(PDGID), fValue(value), fError(error), fFeedDown(fd) { }
51
53 void addSystematicError(double percent) {
54 fError = sqrt(fError*fError + percent * percent * fValue * fValue);
55 }
56 };
57
65 long long fPDGID1;
66
68 long long fPDGID2;
69
71 double fValue;
72
74 double fError;
75
78
81
92 ExperimentRatio(long long PDGID1 = 211, long long PDGID2 = -211, double value = 1., double error = 0.1, Feeddown::Type fd1 = Feeddown::StabilityFlag, Feeddown::Type fd2 = Feeddown::StabilityFlag) :
93 fPDGID1(PDGID1), fPDGID2(PDGID2), fValue(value), fError(error), fFeedDown1(fd1), fFeedDown2(fd2) { }
94
110 ExperimentRatio(long long PDGID1, long long PDGID2, double value1, double error1, double value2, double error2, Feeddown::Type fd1 = Feeddown::StabilityFlag, Feeddown::Type fd2 = Feeddown::StabilityFlag) :
111 fPDGID1(PDGID1), fPDGID2(PDGID2), fFeedDown1(fd1), fFeedDown2(fd2) {
112 fValue = value1 / value2;
113 fError = sqrt(error1*error1 / value2 / value2 + value1 * value1 / value2 / value2 / value2 / value2 * error2 * error2);
114 }
115 };
116
128
131
133 bool toFit;
134
137
140
143 toFit = true;
145 mult = ExperimentMultiplicity(-211, 10., 1.);
146 }
147
151 toFit = true;
153 mult = op;
154 }
155
159 toFit = true;
161 ratio = op;
162 }
163
165 double Value() const {
166 if (type == Multiplicity)
167 return mult.fValue;
168 else
169 return ratio.fValue;
170 }
171
173 double ValueError() const {
174 if (type == Multiplicity)
175 return mult.fError;
176 else
177 return ratio.fError;
178 }
179 };
180
181} // namespace thermalfist
182
183#endif
Contains structures related to particle decays.
The main namespace where all classes and functions of the Thermal-FIST library reside.
Definition CosmicEoS.h:9
Structure containing the experimental yield (multiplicity) to be fitted.
Feeddown::Type fFeedDown
The feeddown contributions to be included.
long long fPDGID
PDG code of the particle yield.
void addSystematicError(double percent)
Adds a relative systematic error as a fraction of the total yield.
ExperimentMultiplicity(long long PDGID=-211, double value=300., double error=20., Feeddown::Type fd=Feeddown::StabilityFlag)
Construct a new ExperimentMultiplicity object.
Structure containing the experimental ratio of yields to be fitted.
Feeddown::Type fFeedDown2
The feeddown contributions to be included for the yield in the denominator.
long long fPDGID1
PDG code of the particle yield in the numerator.
double fValue
Experimental value of the yield ratio.
double fError
Experimental error of the yield ratio.
long long fPDGID2
PDG code of the particle yield in the denominator.
Feeddown::Type fFeedDown1
The feeddown contributions to be included for the yield in the numerator.
ExperimentRatio(long long PDGID1, long long PDGID2, double value1, double error1, double value2, double error2, Feeddown::Type fd1=Feeddown::StabilityFlag, Feeddown::Type fd2=Feeddown::StabilityFlag)
Construct a new ExperimentRatio object two individual yields and their errors.
ExperimentRatio(long long PDGID1=211, long long PDGID2=-211, double value=1., double error=0.1, Feeddown::Type fd1=Feeddown::StabilityFlag, Feeddown::Type fd2=Feeddown::StabilityFlag)
Construct a new ExperimentRatio object.
@ StabilityFlag
Feeddown from all particles marked as unstable.
ExperimentRatio ratio
The ratio data. Used if type is FittedQuantityType::Ratio.
bool toFit
Whether this quantity contributes to the of a fit.
double Value() const
Value of the measurement.
double ValueError() const
Error of the measurement.
FittedQuantityType
Yield (multiplicity) or ratio.
FittedQuantityType type
Whether it is a yield (multiplicity) or a ratio.
FittedQuantity(const ExperimentRatio &op)
FittedQuantity(const ExperimentMultiplicity &op)
ExperimentMultiplicity mult
The yield data. Used if type is FittedQuantityType::Multiplicity.