This is an example of how to compute observables from the input parameters defined in a model configuration file.
#include <iostream>
#include <HEPfit.h>
int main(
int argc,
char** argv)
{
try {
if(argc != 2){
std::cout << "\nusage: " << argv[0] << " ModelConf.conf\n" << std::endl;
return EXIT_SUCCESS;
}
std::string ModelConf = argv[1];
std::map<std::string, double> DPars;
std::map<std::string, std::string> DFlags;
for (int i = 0; i < 2; i++) {
DPars["Mz"] = 91.1875 + 0.0001 * i;
DPars["AlsMz"] = 0.1184 + 0.000001 * i;
std::cout << "\nParameters[" << i + 1 << "]:"<< std::endl;
for (std::map<std::string, double>::iterator it = DPars.begin(); it != DPars.end(); it++) {
std::cout << it->first << " = " << it->second << std::endl;
}
std::cout << "\nObservables[" << i + 1 << "]:" << std::endl;
for (std::map<std::string, double>::iterator it = DObs.begin(); it != DObs.end(); it++) {
std::cout << it->first << " = " << it->second << std::endl;
}
}
return EXIT_SUCCESS;
} catch (const std::runtime_error& e) {
std::cerr << e.what() << std::endl;
return EXIT_FAILURE;
}
}