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
36public:
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
128private:
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
A class for providing access to the computation of observables without a Monte Carlo run.
std::map< std::string, double > getObservables()
A method to get the map of observables.
std::map< std::string, double > getParameters()
A method to get the map of parameters.
const int rank
< Rank of the MPI process. Set to 0 for serial run.
InputParser myInputParser
An object of the InputParser class.
std::vector< std::string > unknownParameters
StandardModel * Mod
Pointer to an object of the class StandardModel.
void setFlags(std::map< std::string, std::string > DFlags_i)
This method sets the necessary flag for the requested model.
std::string ModelName
Name of the Model to be used.
std::map< std::string, double > DObs
Map of the observables to be computed.
std::map< std::string, double > compute(std::map< std::string, double > DP)
The method used to compute observables.
std::vector< CorrelatedGaussianParameters > CGP
std::vector< ModelParameter > ModPars
std::vector< Observable2D > Obs2D
std::map< std::string, ThObservable * > DThObs
virtual ~ComputeObservables()
The default destructor.
std::vector< std::string > paraNames
The vector of allowed parameter names.
std::map< std::string, std::string > DFlags
Map of the model flags to be passed to Model.
ComputeObservables(ModelFactory &ModelF, ThObsFactory &ThObsF, const std::string &ModelConf_i, const int rank_i=0)
Constructor.
StandardModel * getModel()
A get method return the pointer to the model.
boost::ptr_vector< Observable > Obs
void addCustomObservableType(const std::string name, boost::function< Observable *() > funct)
A method to add a user defined observable with a user defined likelihood.
void AddObservable(std::string ObsName)
A method to remove an observable from the list of observables.
std::map< std::string, double > DPars
Map of the parameters to be passed to Model.
void RemoveObservable(std::string ObsName)
A method to add an observable to the list of observables.
std::vector< CorrelatedGaussianObservables > CGO
A class for reading input parameters and output directives.
Definition: InputParser.h:48
A class for.
Definition: ModelFactory.h:25
A class for observables.
Definition: Observable.h:28
A model class for the Standard Model.
A class for.
Definition: ThObsFactory.h:26