a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
ModelParameter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 HEPfit Collaboration
3  *
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #ifndef MODELPARAMETER_H
9 #define MODELPARAMETER_H
10 
11 #include <string>
12 #include <iostream>
13 #include <boost/tokenizer.hpp>
14 
29 public:
30 
38  ModelParameter(std::string name_in, double ave_in, double errg_in, double errf_in);
39 
44 
49  boost::tokenizer<boost::char_separator<char> >::iterator & ParseModelParameter(boost::tokenizer<boost::char_separator<char> >::iterator & beg);
50 
54  virtual ~ModelParameter();
55 
60  bool IsCorrelated() const
61  {
62  return(!cgp_name.empty());
63  }
64 
69  std::string getname() const
70  {
71  return name;
72  }
73 
78  double getave() const
79  {
80  return ave;
81  }
82 
87  double geterrf() const
88  {
89  return errf;
90  }
91 
96  double geterrg() const
97  {
98  return errg;
99  }
100 
105  double getmin() const
106  {
107  return min;
108  }
109 
114  double getmax() const
115  {
116  return max;
117  }
118 
123  bool IsFixed() const
124  {
125  return isFixed;
126  }
127 
132  std::string getCgp_name() const
133  {
134  return cgp_name;
135  }
136 
140  void setCgp_name(std::string cgp_name)
141  {
142  this->cgp_name = cgp_name;
143  }
144 
151  friend std::ostream& operator<<(std::ostream& output, const ModelParameter& m);
152 
153 private:
154  std::string name;
155  double ave;
156  double errg;
157  double errf;
158  double min;
159  double max;
160  bool isFixed;
161  std::string cgp_name;
162 };
163 
164 #endif /* MODELPARAMETER_H */
165 
ModelParameter::~ModelParameter
virtual ~ModelParameter()
The default destructor.
Definition: ModelParameter.cpp:28
ModelParameter::errg
double errg
The Gaussian error of the model parameter.
Definition: ModelParameter.h:156
ModelParameter::operator<<
friend std::ostream & operator<<(std::ostream &output, const ModelParameter &m)
Befriending of the std::ostream operator << to generate an output stream for printing the model param...
Definition: ModelParameter.cpp:32
ModelParameter::getmax
double getmax() const
A get method to get the maximum value.
Definition: ModelParameter.h:114
ModelParameter::ave
double ave
The average value of the model parameter.
Definition: ModelParameter.h:155
ModelParameter::max
double max
The maximum value of the model parameter.
Definition: ModelParameter.h:159
ModelParameter::ParseModelParameter
boost::tokenizer< boost::char_separator< char > >::iterator & ParseModelParameter(boost::tokenizer< boost::char_separator< char > >::iterator &beg)
Parser for model parameters.
Definition: ModelParameter.cpp:39
ModelParameter::geterrf
double geterrf() const
A get method to get the flat error.
Definition: ModelParameter.h:87
ModelParameter::IsFixed
bool IsFixed() const
A method to check if the parameter is fixed.
Definition: ModelParameter.h:123
ModelParameter::getname
std::string getname() const
A get method to get the name of each parameter.
Definition: ModelParameter.h:69
ModelParameter::errf
double errf
The flat error of the model parameter.
Definition: ModelParameter.h:157
ModelParameter::getave
double getave() const
A get method to get the average.
Definition: ModelParameter.h:78
ModelParameter::name
std::string name
The name of the model parameter.
Definition: ModelParameter.h:154
ModelParameter
A class for model parameters.
Definition: ModelParameter.h:28
ModelParameter::setCgp_name
void setCgp_name(std::string cgp_name)
A set method to set the name of the set of correlated parameter.
Definition: ModelParameter.h:140
ModelParameter::getmin
double getmin() const
A get method to get the minimum value.
Definition: ModelParameter.h:105
ModelParameter::IsCorrelated
bool IsCorrelated() const
A method to check if the parameters are correlated or not.
Definition: ModelParameter.h:60
ModelParameter::getCgp_name
std::string getCgp_name() const
A get method to get the name of the set of correlated parameter.
Definition: ModelParameter.h:132
ModelParameter::ModelParameter
ModelParameter()
Constructor.
Definition: ModelParameter.cpp:25
ModelParameter::cgp_name
std::string cgp_name
Definition: ModelParameter.h:161
ModelParameter::geterrg
double geterrg() const
A get method to get the gaussian error.
Definition: ModelParameter.h:96
ModelParameter::min
double min
The minimum value of the model parameter.
Definition: ModelParameter.h:158
ModelParameter::isFixed
bool isFixed
A boolean flag that is true if the parameter is fixed.
Definition: ModelParameter.h:160