A class for providing access to the computation of observables without a Monte Carlo run. More...
#include <ComputeObservables.h>
A class for providing access to the computation of observables without a Monte Carlo run.
This class can be used to create an object that takes a map of model parameters that need to be varied in the analysis and passes out a map of the observables that it is told to compute.
Definition at line 35 of file ComputeObservables.h.
Public Member Functions | |
void | addCustomObservableType (const std::string name, boost::function< Observable *() > funct) |
A method to add a user defined observable with a user defined likelihood. More... | |
void | AddObservable (std::string ObsName) |
A method to remove an observable from the list of observables. More... | |
std::map< std::string, double > | compute (std::map< std::string, double > DP) |
The method used to compute observables. More... | |
ComputeObservables (ModelFactory &ModelF, ThObsFactory &ThObsF, const std::string &ModelConf_i, const int rank_i=0) | |
Constructor. More... | |
ComputeObservables (ModelFactory &ModelF, ThObsFactory &ThObsF, const std::string &ModelName_i, std::map< std::string, double > DPars_i, std::map< std::string, std::string > DFlags_i, const int rank_i=0) | |
Constructor. More... | |
StandardModel * | getModel () |
A get method return the pointer to the model. More... | |
std::map< std::string, double > | getObservables () |
A method to get the map of observables. More... | |
std::map< std::string, double > | getParameters () |
A method to get the map of parameters. More... | |
void | RemoveObservable (std::string ObsName) |
A method to add an observable to the list of observables. More... | |
void | setFlags (std::map< std::string, std::string > DFlags_i) |
This method sets the necessary flag for the requested model. More... | |
virtual | ~ComputeObservables () |
The default destructor. More... | |
Private Attributes | |
std::vector< CorrelatedGaussianObservables > | CGO |
std::vector< CorrelatedGaussianParameters > | CGP |
std::map< std::string, std::string > | DFlags |
Map of the model flags to be passed to Model. More... | |
std::map< std::string, double > | DObs |
Map of the observables to be computed. More... | |
std::map< std::string, double > | DPars |
Map of the parameters to be passed to Model. More... | |
std::map< std::string, ThObservable * > | DThObs |
StandardModel * | Mod |
Pointer to an object of the class StandardModel. More... | |
std::string | ModelName |
Name of the Model to be used. More... | |
std::vector< ModelParameter > | ModPars |
InputParser | myInputParser |
An object of the InputParser class. More... | |
boost::ptr_vector< Observable > | Obs |
std::vector< Observable2D > | Obs2D |
std::vector< std::string > | paraNames |
The vector of allowed parameter names. More... | |
const int | rank |
< Rank of the MPI process. Set to 0 for serial run. More... | |
std::vector< std::string > | unknownParameters |
ComputeObservables::ComputeObservables | ( | ModelFactory & | ModelF, |
ThObsFactory & | ThObsF, | ||
const std::string & | ModelConf_i, | ||
const int | rank_i = 0 |
||
) |
Constructor.
This constructor passes the name of the SomeModel.conf file. It is to be used to compute observables using of a SomeModel.conf file to initialize the mandatory parameters.
[in] | ModelF | |
[in] | ThObsF | |
[in] | ModelConf_i | the name of the input configuration file for the model name, |
[in] | rank_i | the rank of the process in a MPI run (set to 0 for serial run) the model parameters and observables to be calculated |
Definition at line 14 of file ComputeObservables.cpp.
ComputeObservables::ComputeObservables | ( | ModelFactory & | ModelF, |
ThObsFactory & | ThObsF, | ||
const std::string & | ModelName_i, | ||
std::map< std::string, double > | DPars_i, | ||
std::map< std::string, std::string > | DFlags_i, | ||
const int | rank_i = 0 |
||
) |
Constructor.
This constructor passes the model name and model parameters. It is to be used to compute observables without the use of a SomeModel.conf file.
[in] | ModelF | |
[in] | ThObsF | |
[in] | ModelName_i | the name of the model being used |
[in] | DPars_i | the mandatory parameters of the model being used |
[in] | rank_i | the rank of the process in a MPI run (set to 0 for serial run) |
Definition at line 62 of file ComputeObservables.cpp.
|
virtual |
The default destructor.
Definition at line 102 of file ComputeObservables.cpp.
void ComputeObservables::addCustomObservableType | ( | const std::string | name, |
boost::function< Observable *() > | funct | ||
) |
A method to add a user defined observable with a user defined likelihood.
[in] | a | function of the type observable |
Definition at line 155 of file ComputeObservables.cpp.
void ComputeObservables::AddObservable | ( | std::string | ObsName | ) |
A method to remove an observable from the list of observables.
[in] | ObsName | the name of the observable to be removed |
Definition at line 149 of file ComputeObservables.cpp.
std::map< std::string, double > ComputeObservables::compute | ( | std::map< std::string, double > | DP | ) |
The method used to compute observables.
[in] | DP | the map of parameters being varied |
Definition at line 124 of file ComputeObservables.cpp.
|
inline |
A get method return the pointer to the model.
Definition at line 123 of file ComputeObservables.h.
|
inline |
A method to get the map of observables.
Definition at line 99 of file ComputeObservables.h.
|
inline |
A method to get the map of parameters.
Definition at line 108 of file ComputeObservables.h.
void ComputeObservables::RemoveObservable | ( | std::string | ObsName | ) |
A method to add an observable to the list of observables.
[in] | ObsName | the name of the observable to be added |
Definition at line 139 of file ComputeObservables.cpp.
void ComputeObservables::setFlags | ( | std::map< std::string, std::string > | DFlags_i | ) |
This method sets the necessary flag for the requested model.
[in] | DFlags_i | the flags for the model being used |
Definition at line 109 of file ComputeObservables.cpp.
|
private |
Definition at line 143 of file ComputeObservables.h.
|
private |
Definition at line 144 of file ComputeObservables.h.
|
private |
Map of the model flags to be passed to Model.
Definition at line 135 of file ComputeObservables.h.
|
private |
Map of the observables to be computed.
Definition at line 134 of file ComputeObservables.h.
|
private |
Map of the parameters to be passed to Model.
Definition at line 133 of file ComputeObservables.h.
|
private |
Definition at line 137 of file ComputeObservables.h.
|
private |
Pointer to an object of the class StandardModel.
Definition at line 131 of file ComputeObservables.h.
|
private |
Name of the Model to be used.
Definition at line 130 of file ComputeObservables.h.
|
private |
Definition at line 140 of file ComputeObservables.h.
|
private |
An object of the InputParser class.
Definition at line 132 of file ComputeObservables.h.
|
private |
Definition at line 141 of file ComputeObservables.h.
|
private |
Definition at line 142 of file ComputeObservables.h.
|
private |
The vector of allowed parameter names.
Definition at line 136 of file ComputeObservables.h.
|
private |
< Rank of the MPI process. Set to 0 for serial run.
Definition at line 138 of file ComputeObservables.h.
|
private |
Definition at line 139 of file ComputeObservables.h.