a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
CorrelatedGaussianParameters.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 HEPfit Collaboration
3  *
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 #ifndef CORRELATEDGAUSSIANPARAMETERS_H
9 #define CORRELATEDGAUSSIANPARAMETERS_H
10 
11 #include "ModelParameter.h"
12 #include "gslpp.h"
13 
24 public:
25 
30  CorrelatedGaussianParameters(std::string name_i);
31 
36 
41 
46 
52 
57  void AddPar(ModelParameter& Par_i);
58 
64  const std::vector<ModelParameter>& getPars() const
65  {
66  return Pars;
67  }
68 
74  ModelParameter getPar(int i) const
75  {
76  return (Pars.at(i));
77  }
78 
83  std::string getName() const
84  {
85  return name;
86  }
87 
92  {
93  return *Cov;
94  }
95 
100  const std::vector<ModelParameter>& getDiagPars() const
101  {
102  return DiagPars;
103  }
104 
105 
106  std::vector<double> getOrigParsValue(const std::vector<double>& DiagPars_i) const;
107 
118  int ParseCGP(std::vector<ModelParameter>& ModPars,
119  std::string& filename,
120  std::ifstream& ifile,
121  boost::tokenizer<boost::char_separator<char> >::iterator & beg,
122  int lineNo,
123  int rank);
124 
129  bool isEOF()
130  {
131  return IsEOF;
132  }
133 
134 private:
135  std::vector<ModelParameter> Pars;
137  std::string name;
140  std::vector<ModelParameter> DiagPars;
141  bool IsEOF;
142 };
143 
148 #endif /* CORRELATEDGAUSSIANPARAMETERS_H */
149 
gslpp::matrix< double >
A class for constructing and defining operations on real matrices.
Definition: gslpp_matrix_double.h:48
CorrelatedGaussianParameters
A class for correlated Gaussian parameters.
Definition: CorrelatedGaussianParameters.h:23
CorrelatedGaussianParameters::getPars
const std::vector< ModelParameter > & getPars() const
A get method to access the vector of parameters that are defined in one correlated Gaussian parameter...
Definition: CorrelatedGaussianParameters.h:64
gslpp.h
CorrelatedGaussianParameters::getName
std::string getName() const
A get method to access the name of the correlated Gaussian parameters set.
Definition: CorrelatedGaussianParameters.h:83
ModelParameter.h
CorrelatedGaussianParameters::ParseCGP
int ParseCGP(std::vector< ModelParameter > &ModPars, std::string &filename, std::ifstream &ifile, boost::tokenizer< boost::char_separator< char > >::iterator &beg, int lineNo, int rank)
The parser for CorrelatedGaussianParameters.
Definition: CorrelatedGaussianParameters.cpp:129
CorrelatedGaussianParameters::e
gslpp::vector< double > * e
The diagonalized parameters.
Definition: CorrelatedGaussianParameters.h:139
CorrelatedGaussianParameters::v
gslpp::matrix< double > * v
The rotation matrix form the diagonalized parameters to the original parameters.
Definition: CorrelatedGaussianParameters.h:138
CorrelatedGaussianParameters::DiagonalizePars
void DiagonalizePars(gslpp::matrix< double > Corr)
Diagonalizes the correlated Gaussian parameters set.
Definition: CorrelatedGaussianParameters.cpp:60
CorrelatedGaussianParameters::DiagPars
std::vector< ModelParameter > DiagPars
The eigenvector of the covariance matrix.
Definition: CorrelatedGaussianParameters.h:140
CorrelatedGaussianParameters::AddPar
void AddPar(ModelParameter &Par_i)
A method to add parameters to the list of correlated Gaussian parameters.
Definition: CorrelatedGaussianParameters.cpp:55
CorrelatedGaussianParameters::getCov
gslpp::matrix< double > getCov() const
A get method to access the covariance matrix of the correlated Gaussian parameters.
Definition: CorrelatedGaussianParameters.h:91
ModelParameter
A class for model parameters.
Definition: ModelParameter.h:28
CorrelatedGaussianParameters::Pars
std::vector< ModelParameter > Pars
A vector of parameters whose correlation will be calculated.
Definition: CorrelatedGaussianParameters.h:135
gslpp::vector< double >
A class for constructing and defining operations on real vectors.
Definition: gslpp_vector_double.h:33
CorrelatedGaussianParameters::CorrelatedGaussianParameters
CorrelatedGaussianParameters()
The default Constructor.
Definition: CorrelatedGaussianParameters.cpp:25
CorrelatedGaussianParameters::name
std::string name
The name of the correlated Gaussian Parameters set.
Definition: CorrelatedGaussianParameters.h:137
CorrelatedGaussianParameters::getOrigParsValue
std::vector< double > getOrigParsValue(const std::vector< double > &DiagPars_i) const
Definition: CorrelatedGaussianParameters.cpp:104
CorrelatedGaussianParameters::Cov
gslpp::matrix< double > * Cov
The covariance matrix.
Definition: CorrelatedGaussianParameters.h:136
CorrelatedGaussianParameters::~CorrelatedGaussianParameters
virtual ~CorrelatedGaussianParameters()
The default destructor.
Definition: CorrelatedGaussianParameters.cpp:44
CorrelatedGaussianParameters::isEOF
bool isEOF()
A method to check if the end of file has been reached.
Definition: CorrelatedGaussianParameters.h:129
CorrelatedGaussianParameters::getDiagPars
const std::vector< ModelParameter > & getDiagPars() const
A get method to access the diagonalized parameters.
Definition: CorrelatedGaussianParameters.h:100
CorrelatedGaussianParameters::getPar
ModelParameter getPar(int i) const
A get method to access an element of the vector of parameters that are defined in one correlated Gaus...
Definition: CorrelatedGaussianParameters.h:74
CorrelatedGaussianParameters::IsEOF
bool IsEOF
Definition: CorrelatedGaussianParameters.h:141