ComputeObservables.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 HEPfit Collaboration
3  * All rights reserved.
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  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 
113  void addCustomObservableType(const std::string name, boost::function<Observable*() > funct);
114 
115 private:
116 
117  std::string ModelName;
120  std::map<std::string, double> DPars;
121  std::map<std::string, double> DObs;
122  std::map<std::string, std::string> DFlags;
123  std::vector<std::string> paraNames;
124  std::map<std::string, ThObservable*> DThObs;
125  const int rank;
126 
127 };
128 
133 #endif /* COMPUTEOBSERVABLES_H */
134 
135 
136 
std::map< std::string, std::string > DFlags
Map of the model flags to be passed to Model.
InputParser myInputParser
An object of the InputParser class.
ComputeObservables(ModelFactory &ModelF, ThObsFactory &ThObsF, const std::string &ModelConf_i, const int rank_i=0)
Constructor.
std::string ModelName
Name of the Model to be used.
A class for providing access to the computation of observables without a Monte Carlo run...
A class for.
Definition: ModelFactory.h:25
void AddObservable(std::string ObsName)
A method to remove an observable from the list of observables.
std::map< std::string, double > getParameters()
A method to get the map of parameters.
A class for.
Definition: ThObsFactory.h:26
std::map< std::string, double > getObservables()
A method to get the map of observables.
A model class for the Standard Model.
std::map< std::string, double > DObs
Map of the observables to be computed.
std::map< std::string, double > DPars
Map of the parameters to be passed to Model.
A class for observables.
Definition: Observable.h:28
A class for reading input parameters and output directives.
Definition: InputParser.h:49
void setFlags(std::map< std::string, std::string > DFlags_i)
This method sets the necessary flag for the requested model.
std::map< std::string, ThObservable * > DThObs
void RemoveObservable(std::string ObsName)
A method to add an observable to the list of observables.
StandardModel * Mod
Pointer to an object of the class StandardModel.
void addCustomObservableType(const std::string name, boost::function< Observable *() > funct)
std::map< std::string, double > compute(std::map< std::string, double > DP)
The method used to compute observables.
std::vector< std::string > paraNames
The vector of allowed parameter names.
const int rank
< Rank of the MPI process. Set to 0 for serial run.
virtual ~ComputeObservables()
The default destructor.