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#include <TMatrixDSymEigen.h>
14
25public:
26
31 CorrelatedGaussianParameters(std::string name_i);
32
37
42
47
52 void DiagonalizePars(TMatrixDSym Corr);
53
58 void AddPar(ModelParameter& Par_i);
59
65 const std::vector<ModelParameter>& getPars() const
66 {
67 return Pars;
68 }
69
76 {
77 return (Pars.at(i));
78 }
79
84 std::string getName() const
85 {
86 return name;
87 }
88
92 const TMatrixDSym& getCov() const
93 {
94 return Cov;
95 }
96
101 const std::vector<ModelParameter>& getDiagPars() const
102 {
103 return DiagPars;
104 }
105
106
107 std::vector<double> getOrigParsValue(const std::vector<double>& DiagPars_i) const;
108
119 int ParseCGP(std::vector<ModelParameter>& ModPars,
120 std::string& filename,
121 std::ifstream& ifile,
122 boost::tokenizer<boost::char_separator<char> >::iterator & beg,
123 int lineNo,
124 int rank);
125
130 bool isEOF()
131 {
132 return IsEOF;
133 }
134
135private:
136 std::vector<ModelParameter> Pars;
137 TMatrixDSym Cov;
138 std::string name;
139 gslpp::matrix<double> * v;
140 gslpp::vector<double> * e;
141 std::vector<ModelParameter> DiagPars;
142 bool IsEOF;
143};
144
149#endif /* CORRELATEDGAUSSIANPARAMETERS_H */
150
A class for correlated Gaussian parameters.
std::vector< ModelParameter > DiagPars
The eigenvector of the covariance matrix.
TMatrixDSym Cov
The covariance matrix.
const std::vector< ModelParameter > & getPars() const
A get method to access the vector of parameters that are defined in one correlated Gaussian parameter...
std::string name
The name of the correlated Gaussian Parameters set.
bool isEOF()
A method to check if the end of file has been reached.
void AddPar(ModelParameter &Par_i)
A method to add parameters to the list of correlated Gaussian parameters.
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.
gslpp::matrix< double > * v
The rotation matrix form the diagonalized parameters to the original parameters.
virtual ~CorrelatedGaussianParameters()
The default destructor.
const std::vector< ModelParameter > & getDiagPars() const
A get method to access the diagonalized parameters.
CorrelatedGaussianParameters()
The default Constructor.
std::string getName() const
A get method to access the name of the correlated Gaussian parameters set.
std::vector< double > getOrigParsValue(const std::vector< double > &DiagPars_i) const
void DiagonalizePars(TMatrixDSym Corr)
Diagonalizes the correlated Gaussian parameters set.
std::vector< ModelParameter > Pars
A vector of parameters whose correlation will be calculated.
const TMatrixDSym & getCov() const
A get method to access the covariance matrix of the correlated Gaussian parameters.
ModelParameter getPar(int i) const
A get method to access an element of the vector of parameters that are defined in one correlated Gaus...
gslpp::vector< double > * e
The diagonalized parameters.
A class for model parameters.