a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
CorrelatedGaussianObservables.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 CORRELATEDGAUSSIANOBSERVABLES_H
9#define CORRELATEDGAUSSIANOBSERVABLES_H
10
11#include "Observable.h"
12#include "gslpp.h"
13#include <boost/ptr_container/ptr_vector.hpp>
14#include <TMatrixDSym.h>
15#include <TMatrixDSymEigen.h>
16
17class ThObsFactory;
18
35public:
36
41 CorrelatedGaussianObservables(std::string name_i);
42
47
52
57
62 void ComputeCov(const TMatrixDSym& Corr);
63
67 virtual double computeWeight();
68
72 std::vector<double> computeLeaveOneOutWeights();
73
78 void AddObs(Observable& Obs_i);
79
85 std::vector<Observable> getObs() const
86 {
87 return Obs;
88 }
89
95 Observable getObs(int i) const
96 {
97 return (Obs.at(i));
98 }
99
104 std::string getName() const
105 {
106 return name;
107 }
108
112 const TMatrixDSym& getCov() const
113 {
114 return InvCov;
115 }
116
128 int ParseCGO(boost::ptr_vector<Observable>& Observables,
129 std::ifstream& ifile,
130 boost::tokenizer<boost::char_separator<char> >::iterator& beg,
131 std::string& infilename,
132 ThObsFactory& myObsFactory,
133 StandardModel * myModel,
134 int lineNo,
135 int rank);
140 bool isEOF()
141 {
142 return IsEOF;
143 }
144
149 void setIsPrediction(bool IsPrediction_i)
150 {
151 IsPrediction = IsPrediction_i;
152 }
153
159 {
160 return IsPrediction;
161 }
162
167 void setName(std::string name_i)
168 {
169 name = name_i;
170 }
171
176 void setCovarianceFromConfig (bool setInvCov)
177 {
178 covarianceFromConfig = setInvCov;
179 }
180
181private:
182 std::vector<Observable> Obs;
183 TMatrixDSym InvCov;
184 TVectorD x;
185 std::string name;
186 std::string filepath;
187 bool IsEOF;
190};
191
196#endif /* CORRELATEDGAUSSIANOBSERVABLES_H */
197
A class for correlated Gaussian observables.
std::vector< Observable > Obs
A vector of observables whose correlation will be calculated.
bool IsPrediction
Flag to define a set of Correlated Observables to be predicted.
bool isEOF()
A method to check if the end of file has been reached.
void setIsPrediction(bool IsPrediction_i)
A method to set a set of CGO to be predicted.
Observable getObs(int i) const
A get method to access an element of the vector of observables that are defined in one correlated Gau...
std::string filepath
The path to the config file being parsed.
virtual double computeWeight()
A method to compute the weight associated with the observable.
CorrelatedGaussianObservables()
The default Constructor.
int ParseCGO(boost::ptr_vector< Observable > &Observables, std::ifstream &ifile, boost::tokenizer< boost::char_separator< char > >::iterator &beg, std::string &infilename, ThObsFactory &myObsFactory, StandardModel *myModel, int lineNo, int rank)
The parser for CorrelatedGaussianObservables.
std::string getName() const
A get method to access the name of the correlated Gaussian observables set.
virtual ~CorrelatedGaussianObservables()
The default destructor.
std::vector< double > computeLeaveOneOutWeights()
A method to compute the full weight and the weights associated with the observable when one observabl...
bool IsEOF
A boolean which is true if the end of file is reached.
bool isPrediction()
A method to check if the Correlated Observables are set for prediction.
const TMatrixDSym & getCov() const
A get method to access the covariance matrix of the correlated Gaussian observables.
TVectorD x
The vector of the differences between the theory and average values of the observables in the set.
std::vector< Observable > getObs() const
A get method to access the vector of observables that are defined in one correlated Gaussian observab...
void ComputeCov(const TMatrixDSym &Corr)
Computes the covariance matrix for the correlated Gaussian observables set.
std::string name
The name of the correlated Gaussian Observables set.
void AddObs(Observable &Obs_i)
A method to add observables to the list of correlated Gaussian observables.
void setName(std::string name_i)
A method to set a set of CGO to be predicted.
TMatrixDSym InvCov
The inverse covariance matrix.
void setCovarianceFromConfig(bool setInvCov)
A method to specify whether the inverse covariance is being set from the config file.
A class for observables.
Definition: Observable.h:28
A model class for the Standard Model.
A class for.
Definition: ThObsFactory.h:26