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 
15 class ThObsFactory;
16 
33 public:
34 
39  CorrelatedGaussianObservables(std::string name_i);
40 
45 
50 
55 
61 
65  virtual double computeWeight();
66 
71  void AddObs(Observable& Obs_i);
72 
78  std::vector<Observable> getObs() const
79  {
80  return Obs;
81  }
82 
88  Observable getObs(int i) const
89  {
90  return (Obs.at(i));
91  }
92 
97  std::string getName() const
98  {
99  return name;
100  }
101 
106  {
107  return *InvCov;
108  }
109 
121  int ParseCGO(boost::ptr_vector<Observable>& Observables,
122  std::ifstream& ifile,
123  boost::tokenizer<boost::char_separator<char> >::iterator& beg,
124  std::string& infilename,
125  ThObsFactory& myObsFactory,
127  int lineNo,
128  int rank);
133  bool isEOF()
134  {
135  return IsEOF;
136  }
137 
142  void setIsPrediction(bool IsPrediction_i)
143  {
144  IsPrediction = IsPrediction_i;
145  }
146 
152  {
153  return IsPrediction;
154  }
155 
160  void setName(std::string name_i)
161  {
162  name = name_i;
163  }
164 
169  void setCovarianceFromConfig (bool setInvCov)
170  {
171  covarianceFromConfig = setInvCov;
172  }
173 
174 private:
175  std::vector<Observable> Obs;
177  std::string name;
178  std::string filepath;
179  bool IsEOF;
182 };
183 
188 #endif /* CORRELATEDGAUSSIANOBSERVABLES_H */
189 
CorrelatedGaussianObservables::setCovarianceFromConfig
void setCovarianceFromConfig(bool setInvCov)
A method to specify whether the inverse covariance is being set from the config file.
Definition: CorrelatedGaussianObservables.h:169
CorrelatedGaussianObservables::IsPrediction
bool IsPrediction
Flag to define a set of Correlated Observables to be predicted.
Definition: CorrelatedGaussianObservables.h:180
CorrelatedGaussianObservables::setIsPrediction
void setIsPrediction(bool IsPrediction_i)
A method to set a set of CGO to be predicted.
Definition: CorrelatedGaussianObservables.h:142
gslpp::matrix< double >
A class for constructing and defining operations on real matrices.
Definition: gslpp_matrix_double.h:48
CorrelatedGaussianObservables
A class for correlated Gaussian observables.
Definition: CorrelatedGaussianObservables.h:32
CorrelatedGaussianObservables::name
std::string name
The name of the correlated Gaussian Observables set.
Definition: CorrelatedGaussianObservables.h:177
gslpp.h
CorrelatedGaussianObservables::isPrediction
bool isPrediction()
A method to check if the Correlated Observables are set for prediction.
Definition: CorrelatedGaussianObservables.h:151
CorrelatedGaussianObservables::filepath
std::string filepath
The path to the config file being parsed.
Definition: CorrelatedGaussianObservables.h:178
CorrelatedGaussianObservables::getCov
gslpp::matrix< double > getCov() const
A get method to access the covariance matrix of the correlated Gaussian observables.
Definition: CorrelatedGaussianObservables.h:105
CorrelatedGaussianObservables::~CorrelatedGaussianObservables
virtual ~CorrelatedGaussianObservables()
The default destructor.
Definition: CorrelatedGaussianObservables.cpp:42
StandardModel
A model class for the Standard Model.
Definition: StandardModel.h:474
CorrelatedGaussianObservables::setName
void setName(std::string name_i)
A method to set a set of CGO to be predicted.
Definition: CorrelatedGaussianObservables.h:160
CorrelatedGaussianObservables::getObs
std::vector< Observable > getObs() const
A get method to access the vector of observables that are defined in one correlated Gaussian observab...
Definition: CorrelatedGaussianObservables.h:78
CorrelatedGaussianObservables::CorrelatedGaussianObservables
CorrelatedGaussianObservables()
The default Constructor.
Definition: CorrelatedGaussianObservables.cpp:22
CorrelatedGaussianObservables::AddObs
void AddObs(Observable &Obs_i)
A method to add observables to the list of correlated Gaussian observables.
Definition: CorrelatedGaussianObservables.cpp:48
myModel
My own Model.
Definition: Doxygen/examples-src/myModel/src/myModel.h:17
ThObsFactory
A class for.
Definition: ThObsFactory.h:26
Observable.h
CorrelatedGaussianObservables::covarianceFromConfig
bool covarianceFromConfig
Definition: CorrelatedGaussianObservables.h:181
CorrelatedGaussianObservables::IsEOF
bool IsEOF
A boolean which is true if the end of file is reached.
Definition: CorrelatedGaussianObservables.h:179
Observable
A class for observables.
Definition: Observable.h:28
CorrelatedGaussianObservables::InvCov
gslpp::matrix< double > * InvCov
The inverse covariance matrix.
Definition: CorrelatedGaussianObservables.h:176
CorrelatedGaussianObservables::computeWeight
virtual double computeWeight()
A method to compute the weight associated with the observable.
Definition: CorrelatedGaussianObservables.cpp:74
CorrelatedGaussianObservables::isEOF
bool isEOF()
A method to check if the end of file has been reached.
Definition: CorrelatedGaussianObservables.h:133
CorrelatedGaussianObservables::ParseCGO
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.
Definition: CorrelatedGaussianObservables.cpp:84
CorrelatedGaussianObservables::ComputeCov
void ComputeCov(gslpp::matrix< double > Corr)
Computes the covariance matrix for the correlated Gaussian observables set.
Definition: CorrelatedGaussianObservables.cpp:53
CorrelatedGaussianObservables::getName
std::string getName() const
A get method to access the name of the correlated Gaussian observables set.
Definition: CorrelatedGaussianObservables.h:97
CorrelatedGaussianObservables::getObs
Observable getObs(int i) const
A get method to access an element of the vector of observables that are defined in one correlated Gau...
Definition: CorrelatedGaussianObservables.h:88
CorrelatedGaussianObservables::Obs
std::vector< Observable > Obs
A vector of observables whose correlation will be calculated.
Definition: CorrelatedGaussianObservables.h:175