a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
ComputeObservables.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 COMPUTEOBSERVABLES_H
9 #define COMPUTEOBSERVABLES_H
10 
11 #include "InputParser.h"
12 #include "StandardModel.h"
13 #include "ModelParameter.h"
14 #include "ModelFactory.h"
15 #include "ThObsFactory.h"
16 
36 public:
37 
50  const std::string& ModelConf_i, const int rank_i = 0);
51 
63  const std::string& ModelName_i, std::map<std::string, double> DPars_i,
64  std::map<std::string, std::string> DFlags_i, const int rank_i = 0);
65 
69  virtual ~ComputeObservables();
70 
75  void setFlags(std::map<std::string, std::string> DFlags_i);
76 
81  std::map<std::string, double> compute(std::map<std::string, double> DP);
82 
87  void RemoveObservable(std::string ObsName);
88 
93  void AddObservable(std::string ObsName);
94 
99  std::map<std::string, double> getObservables()
100  {
101  return (DObs);
102  };
103 
108  std::map<std::string, double> getParameters()
109  {
110  return (DPars);
111  };
112 
117  void addCustomObservableType(const std::string name, boost::function<Observable*() > funct);
118 
124  {
125  return Mod;
126  }
127 
128 private:
129 
130  std::string ModelName;
133  std::map<std::string, double> DPars;
134  std::map<std::string, double> DObs;
135  std::map<std::string, std::string> DFlags;
136  std::vector<std::string> paraNames;
137  std::map<std::string, ThObservable*> DThObs;
138  const int rank;
139  std::vector<std::string> unknownParameters;
140  std::vector<ModelParameter> ModPars;
141  boost::ptr_vector<Observable> Obs;
142  std::vector<Observable2D> Obs2D;
143  std::vector<CorrelatedGaussianObservables> CGO;
144  std::vector<CorrelatedGaussianParameters> CGP;
145 };
146 
151 #endif /* COMPUTEOBSERVABLES_H */
152 
153 
154 
ComputeObservables::~ComputeObservables
virtual ~ComputeObservables()
The default destructor.
Definition: ComputeObservables.cpp:100
ComputeObservables::ComputeObservables
ComputeObservables(ModelFactory &ModelF, ThObsFactory &ThObsF, const std::string &ModelConf_i, const int rank_i=0)
Constructor.
Definition: ComputeObservables.cpp:14
ModelFactory
A class for.
Definition: ModelFactory.h:25
InputParser.h
ComputeObservables::Obs
boost::ptr_vector< Observable > Obs
Definition: ComputeObservables.h:141
ComputeObservables::DFlags
std::map< std::string, std::string > DFlags
Map of the model flags to be passed to Model.
Definition: ComputeObservables.h:135
StandardModel.h
InputParser
A class for reading input parameters and output directives.
Definition: InputParser.h:48
ModelParameter.h
ComputeObservables::ModelName
std::string ModelName
Name of the Model to be used.
Definition: ComputeObservables.h:130
ComputeObservables::getObservables
std::map< std::string, double > getObservables()
A method to get the map of observables.
Definition: ComputeObservables.h:99
ComputeObservables::DObs
std::map< std::string, double > DObs
Map of the observables to be computed.
Definition: ComputeObservables.h:134
StandardModel
A model class for the Standard Model.
Definition: StandardModel.h:477
ModelFactory.h
ComputeObservables::DPars
std::map< std::string, double > DPars
Map of the parameters to be passed to Model.
Definition: ComputeObservables.h:133
ComputeObservables::CGO
std::vector< CorrelatedGaussianObservables > CGO
Definition: ComputeObservables.h:143
ThObsFactory.h
ThObsFactory
A class for.
Definition: ThObsFactory.h:26
ComputeObservables::setFlags
void setFlags(std::map< std::string, std::string > DFlags_i)
This method sets the necessary flag for the requested model.
Definition: ComputeObservables.cpp:107
ComputeObservables::Mod
StandardModel * Mod
Pointer to an object of the class StandardModel.
Definition: ComputeObservables.h:131
ComputeObservables::RemoveObservable
void RemoveObservable(std::string ObsName)
A method to add an observable to the list of observables.
Definition: ComputeObservables.cpp:137
Observable
A class for observables.
Definition: Observable.h:28
ComputeObservables::rank
const int rank
< Rank of the MPI process. Set to 0 for serial run.
Definition: ComputeObservables.h:138
ComputeObservables
A class for providing access to the computation of observables without a Monte Carlo run.
Definition: ComputeObservables.h:35
ComputeObservables::Obs2D
std::vector< Observable2D > Obs2D
Definition: ComputeObservables.h:142
ComputeObservables::CGP
std::vector< CorrelatedGaussianParameters > CGP
Definition: ComputeObservables.h:144
ComputeObservables::DThObs
std::map< std::string, ThObservable * > DThObs
Definition: ComputeObservables.h:137
ComputeObservables::compute
std::map< std::string, double > compute(std::map< std::string, double > DP)
The method used to compute observables.
Definition: ComputeObservables.cpp:122
ComputeObservables::ModPars
std::vector< ModelParameter > ModPars
Definition: ComputeObservables.h:140
ComputeObservables::unknownParameters
std::vector< std::string > unknownParameters
Definition: ComputeObservables.h:139
ComputeObservables::addCustomObservableType
void addCustomObservableType(const std::string name, boost::function< Observable *() > funct)
A method to add a user defined observable with a user defined likelihood.
Definition: ComputeObservables.cpp:153
ComputeObservables::myInputParser
InputParser myInputParser
An object of the InputParser class.
Definition: ComputeObservables.h:132
ComputeObservables::getModel
StandardModel * getModel()
A get method return the pointer to the model.
Definition: ComputeObservables.h:123
ComputeObservables::AddObservable
void AddObservable(std::string ObsName)
A method to remove an observable from the list of observables.
Definition: ComputeObservables.cpp:147
ComputeObservables::getParameters
std::map< std::string, double > getParameters()
A method to get the map of parameters.
Definition: ComputeObservables.h:108
ComputeObservables::paraNames
std::vector< std::string > paraNames
The vector of allowed parameter names.
Definition: ComputeObservables.h:136