a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
NPDF2.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 HEPfit Collaboration
3  *
4  * For the licensing terms see doc/COPYING.
5  */
6 
7 #include "NPDF2.h"
8 
9 const std::string NPDF2::NPDF2vars[NNPDF2vars] = {"CepsK","CDMK","CBd","PhiBd","CBs","PhiBs"};
10 
12 
13  ModelParamMap.insert(std::make_pair("CepsK", std::cref(CepsK)));
14  ModelParamMap.insert(std::make_pair("CDMK", std::cref(CDMK)));
15  ModelParamMap.insert(std::make_pair("CBd", std::cref(CBd)));
16  ModelParamMap.insert(std::make_pair("PhiBd", std::cref(phiBd)));
17  ModelParamMap.insert(std::make_pair("CBs", std::cref(CBs)));
18  ModelParamMap.insert(std::make_pair("PhiBs", std::cref(PhiBs)));
19 }
20 
21 void NPDF2::setParameter(const std::string name, const double& value){
22  if(name.compare("CepsK") == 0)
23  CepsK = value;
24  else if(name.compare("CDMK") == 0)
25  CDMK = value;
26  else if(name.compare("CBd") == 0)
27  CBd = value;
28  else if(name.compare("PhiBd") == 0)
29  phiBd = value;
30  else if(name.compare("CBs") == 0)
31  CBs = value;
32  else if(name.compare("PhiBs") == 0)
33  PhiBs = value;
34  else
36 }
37 
38 bool NPDF2::CheckParameters(const std::map<std::string, double>& DPars) {
39  for (int i = 0; i < NNPDF2vars; i++) {
40  if (DPars.find(NPDF2vars[i]) == DPars.end()) {
41  std::cout << "ERROR: missing mandatory NPDF2 parameter " << NPDF2vars[i] << std::endl;
44  }
45  }
46  return(StandardModel::CheckParameters(DPars));
47 }
NPDF2::NPDF2
NPDF2()
NPDF2 constructor.
Definition: NPDF2.cpp:11
StandardModel::setParameter
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of StandardModel.
Definition: StandardModel.cpp:231
NPDF2::CBd
double CBd
Definition: NPDF2.h:103
NPDF2::NNPDF2vars
static const int NNPDF2vars
Definition: NPDF2.h:21
NPDF2::phiBd
double phiBd
Definition: NPDF2.h:103
NPDF2::CDMK
double CDMK
Definition: NPDF2.h:103
Model::addMissingModelParameter
void addMissingModelParameter(const std::string &missingParameterName)
Definition: Model.h:232
StandardModel::CheckParameters
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for StandardModel have been provided in model initi...
Definition: StandardModel.cpp:313
StandardModel
A model class for the Standard Model.
Definition: StandardModel.h:474
NPDF2::setParameter
void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of NPDF2.
Definition: NPDF2.cpp:21
Model::ModelParamMap
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:262
NPDF2::CheckParameters
bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for NPDF2 have been provided in model initializatio...
Definition: NPDF2.cpp:38
NPDF2::CBs
double CBs
Definition: NPDF2.h:103
NPDF2::CepsK
double CepsK
Definition: NPDF2.h:103
Model::raiseMissingModelParameterCount
void raiseMissingModelParameterCount()
Definition: Model.h:242
NPDF2.h
Model::name
std::string name
The name of the model.
Definition: Model.h:267
NPDF2::PhiBs
double PhiBs
Modifications to the Standard Model couplings.
Definition: NPDF2.h:103
NPDF2::NPDF2vars
static const std::string NPDF2vars[NNPDF2vars]
Definition: NPDF2.h:23