NPZbbbarLinearized.cpp
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 #include "NPZbbbarLinearized.h"
9 #include <stdexcept>
10 
11 
12 const std::string NPZbbbarLinearized::ZbbbarVAVars[NZbbbarVars]
13  = {"deltaGVb", "deltaGAb"};
14 
15 const std::string NPZbbbarLinearized::ZbbbarLRVars[NZbbbarVars]
16  = {"deltaGLb", "deltaGRb"};
17 
18 NPZbbbarLinearized::NPZbbbarLinearized(const bool FlagNPZbbbarLR_in)
19 : NPbase(), FlagNPZbbbarLR(FlagNPZbbbarLR_in)
20 {
21  ModelParamMap.insert(std::pair<std::string, boost::reference_wrapper<const double> >("deltaGVb", boost::cref(myDeltaGVb)));
22  ModelParamMap.insert(std::pair<std::string, boost::reference_wrapper<const double> >("deltaGAb", boost::cref(myDeltaGAb)));
23  ModelParamMap.insert(std::pair<std::string, boost::reference_wrapper<const double> >("deltaGLb", boost::cref(myDeltaGLb)));
24  ModelParamMap.insert(std::pair<std::string, boost::reference_wrapper<const double> >("deltaGRb", boost::cref(myDeltaGRb)));
25 }
26 
28 {
29  if (!NPbase::PostUpdate()) return (false);
30 
31  if (FlagNPZbbbarLR) {
34  } else {
35  myDeltaGLb = (myDeltaGVb + myDeltaGAb) / 2.0;
36  myDeltaGRb = (myDeltaGVb - myDeltaGAb) / 2.0;
37  }
38 
39  return (true);
40 }
41 
42 void NPZbbbarLinearized::setParameter(const std::string name, const double& value)
43 {
44  if (FlagNPZbbbarLR) {
45  if (name.compare("deltaGLb") == 0)
46  myDeltaGLb = value;
47  else if (name.compare("deltaGRb") == 0)
48  myDeltaGRb = value;
49  else
50  NPbase::setParameter(name, value);
51  } else {
52  if (name.compare("deltaGVb") == 0)
53  myDeltaGVb = value;
54  else if (name.compare("deltaGAb") == 0)
55  myDeltaGAb = value;
56  else
57  NPbase::setParameter(name, value);
58  }
59 }
60 
61 bool NPZbbbarLinearized::CheckParameters(const std::map<std::string, double>& DPars)
62 {
63  for (int i = 0; i < NZbbbarVars; i++) {
64  if (FlagNPZbbbarLR) {
65  if (DPars.find(ZbbbarLRVars[i]) == DPars.end()) {
66  std::cout << "ERROR: Missing mandatory NPZbbbarLinearizedLR parameter "
67  << ZbbbarLRVars[i] << std::endl;
68  return false;
69  }
70  } else {
71  if (DPars.find(ZbbbarVAVars[i]) == DPars.end()) {
72  std::cout << "ERROR: Missing mandatory NPZbbbarLinearized parameter "
73  << ZbbbarVAVars[i] << std::endl;
74  return false;
75  }
76  }
77  }
78  return (NPbase::CheckParameters(DPars));
79 }
80 
82 
84 {
85  if (f.is("BOTTOM"))
86  return myDeltaGVb;
87  else
88  return 0.0;
89 }
90 
92 {
93  if (f.is("BOTTOM"))
94  return myDeltaGAb;
95  else
96  return 0.0;
97 }
98 
static const int NZbbbarVars
The number of the model parameters in NPZbbbarLinearized.
static const std::string ZbbbarLRVars[NZbbbarVars]
A string array containing the labels of the model parameters in NPZbbbarLinearized, used for NPZbbbarLinearizedLR=TRUE.
The auxiliary base model class for other model classes.
Definition: NPbase.h:66
A class for particles.
Definition: Particle.h:26
double myDeltaGRb
New physics contribution to .
virtual bool PostUpdate()
The post-update method for NPZbbbarLinearized.
const bool FlagNPZbbbarLR
An internal boolean flag. This flag is initialized in the constructor.
NPZbbbarLinearized(const bool FlagNPZbbbarLR_in=false)
Constructor.
bool is(std::string name_i) const
Definition: Particle.cpp:23
double myDeltaGVb
New physics contribution to .
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of StandardModel.
virtual double deltaGV_f(const Particle f) const
New physics contribution to the neutral-current vector coupling .
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 bool PostUpdate()
The post-update method for NPbase.
Definition: NPbase.cpp:15
double myDeltaGLb
New physics contribution to .
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of the model.
virtual double deltaGA_f(const Particle f) const
New physics contribution to the neutral-current axial-vector coupling .
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for the model have been provided in model initializ...
static const std::string ZbbbarVAVars[NZbbbarVars]
A string array containing the labels of the model parameters in NPZbbbarLinearized, used for NPZbbbarLinearizedLR=FALSE.
double myDeltaGAb
New physics contribution to .
std::map< std::string, boost::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:200