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
9const 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
21void 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
38bool 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 }
47}
std::map< std::string, double > DPars
Definition: Minimal.cpp:11
Model parameter CBd from the NP model NPDF2 @detail The ratio of the absolute value of the $B_d$ mixi...
Definition: DmBd.h:82
Model parameter CBs from the NP model NPDF2 @detail The ratio of the absolute value of the $B_s$ mixi...
Definition: DmBs.h:82
void addMissingModelParameter(const std::string &missingParameterName)
Definition: Model.h:250
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:280
std::string name
The name of the model.
Definition: Model.h:285
void raiseMissingModelParameterCount()
Definition: Model.h:260
static const int NNPDF2vars
Definition: NPDF2.h:21
static const std::string NPDF2vars[NNPDF2vars]
Definition: NPDF2.h:23
void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of NPDF2.
Definition: NPDF2.cpp:21
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
double CepsK
Definition: NPDF2.h:103
double phiBd
Definition: NPDF2.h:103
NPDF2()
NPDF2 constructor.
Definition: NPDF2.cpp:11
double CDMK
Definition: NPDF2.h:103
Model parameter PhiBs from the NP model NPDF2 @detail Half the relative phase of the $B_s$ mixing amp...
Definition: DmBs.h:96
A model class for the Standard Model.
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...
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of StandardModel.