A class for model parameters.
More...
#include <ModelParameter.h>
A class for model parameters.
- Author
- HEPfit Collaboration
- Copyright
- GNU General Public License
This class stores the details of the model parameters defined in the SomeModel.conf file or specified by the user. The name of the model parameter has to correspond to the list of names in the SomeModel.cpp file in the Model src directories.
e.g. GF, which can be found in StandardModel.cpp file in the StandardModel project source folder StandardModel/src.
Definition at line 28 of file ModelParameter.h.
|
| double | ave |
| | The average value of the model parameter. More...
|
| |
| std::string | cgp_name |
| |
| double | errf |
| | The flat error of the model parameter. More...
|
| |
| double | errg |
| | The Gaussian error of the model parameter. More...
|
| |
| bool | isFixed |
| | A boolean flag that is true if the parameter is fixed. More...
|
| |
| double | max |
| | The maximum value of the model parameter. More...
|
| |
| double | min |
| | The minimum value of the model parameter. More...
|
| |
| std::string | name |
| | The name of the model parameter. More...
|
| |
|
| std::ostream & | operator<< (std::ostream &output, const ModelParameter &m) |
| | Befriending of the std::ostream operator << to generate an output stream for printing the model parameters. More...
|
| |
◆ ModelParameter() [1/2]
| ModelParameter::ModelParameter |
( |
std::string |
name_in, |
|
|
double |
ave_in, |
|
|
double |
errg_in, |
|
|
double |
errf_in |
|
) |
| |
Constructor.
- Parameters
-
| [in] | name_in | the name for the model parameter |
| [in] | ave_in | the average value for the model parameter |
| [in] | errg_in | the gaussian error for the model parameter |
| [in] | errf_in | the flat error for the model parameter |
Definition at line 10 of file ModelParameter.cpp.
◆ ModelParameter() [2/2]
| ModelParameter::ModelParameter |
( |
| ) |
|
◆ ~ModelParameter()
| ModelParameter::~ModelParameter |
( |
| ) |
|
|
virtual |
◆ getave()
| double ModelParameter::getave |
( |
| ) |
const |
|
inline |
A get method to get the average.
- Returns
- the average of the parameter
Definition at line 78 of file ModelParameter.h.
◆ getCgp_name()
| std::string ModelParameter::getCgp_name |
( |
| ) |
const |
|
inline |
A get method to get the name of the set of correlated parameter.
- Returns
- a string that contains the name
Definition at line 132 of file ModelParameter.h.
◆ geterrf()
| double ModelParameter::geterrf |
( |
| ) |
const |
|
inline |
A get method to get the flat error.
- Returns
- the flat error of the parameter
Definition at line 87 of file ModelParameter.h.
◆ geterrg()
| double ModelParameter::geterrg |
( |
| ) |
const |
|
inline |
A get method to get the gaussian error.
- Returns
- the Gaussian error of the parameter
Definition at line 96 of file ModelParameter.h.
◆ getmax()
| double ModelParameter::getmax |
( |
| ) |
const |
|
inline |
A get method to get the maximum value.
- Returns
- the maximum value of the parameter
Definition at line 114 of file ModelParameter.h.
◆ getmin()
| double ModelParameter::getmin |
( |
| ) |
const |
|
inline |
A get method to get the minimum value.
- Returns
- the minimum value of the parameter
Definition at line 105 of file ModelParameter.h.
◆ getname()
| std::string ModelParameter::getname |
( |
| ) |
const |
|
inline |
A get method to get the name of each parameter.
- Returns
- a string that contains the name
Definition at line 69 of file ModelParameter.h.
◆ IsCorrelated()
| bool ModelParameter::IsCorrelated |
( |
| ) |
const |
|
inline |
A method to check if the parameters are correlated or not.
- Returns
- a boolean which is true of the parameters are correlated
Definition at line 60 of file ModelParameter.h.
◆ IsFixed()
| bool ModelParameter::IsFixed |
( |
| ) |
const |
|
inline |
A method to check if the parameter is fixed.
- Returns
- a boolean that is true if the parameter is fixed
Definition at line 123 of file ModelParameter.h.
◆ ParseModelParameter()
| boost::tokenizer< boost::char_separator< char > >::iterator & ModelParameter::ParseModelParameter |
( |
boost::tokenizer< boost::char_separator< char > >::iterator & |
beg | ) |
|
Parser for model parameters.
- Parameters
-
| [in] | beg | iterator for reading the model parameter |
Definition at line 39 of file ModelParameter.cpp.
44 ave = atof((*beg).c_str());
46 errg = atof((*beg).c_str());
48 errf = atof((*beg).c_str());
◆ setCgp_name()
| void ModelParameter::setCgp_name |
( |
std::string |
cgp_name | ) |
|
|
inline |
A set method to set the name of the set of correlated parameter.
Definition at line 140 of file ModelParameter.h.
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
output, |
|
|
const ModelParameter & |
m |
|
) |
| |
|
friend |
Befriending of the std::ostream operator << to generate an output stream for printing the model parameters.
- Parameters
-
| [out] | output | the formatted output stream to print the model parameters |
| [in] | m | a reference to an object of type ModelParameter() |
Definition at line 32 of file ModelParameter.cpp.
34 output <<
"ModelParameter name, average, gaussian error, flat error" << std::endl;
35 output << m.
name <<
" " << m.
ave <<
" " << m.
errg <<
" " << m.
errf << std::endl;
◆ ave
| double ModelParameter::ave |
|
private |
◆ cgp_name
| std::string ModelParameter::cgp_name |
|
private |
◆ errf
| double ModelParameter::errf |
|
private |
◆ errg
| double ModelParameter::errg |
|
private |
◆ isFixed
| bool ModelParameter::isFixed |
|
private |
A boolean flag that is true if the parameter is fixed.
Definition at line 160 of file ModelParameter.h.
◆ max
| double ModelParameter::max |
|
private |
◆ min
| double ModelParameter::min |
|
private |
◆ name
| std::string ModelParameter::name |
|
private |
The documentation for this class was generated from the following files: