a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
RealWeakEFTLFV.cpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 HEPfit Collaboration
3 *
4 *
5 * For the licensing terms see doc/COPYING.
6 */
7
8#include "RealWeakEFTLFV.h"
9
10const std::string RealWeakEFTLFV::RealWeakEFTLFVvars[NRealWeakEFTLFVvars] = {"C7", "C7p", "C8", "C8p",
11 "C9_11", "C9p_11", "C10_11", "C10p_11", "CS_11", "CSp_11", "CP_11", "CPp_11",
12 "C9_22", "C9p_22", "C10_22", "C10p_22", "CS_22", "CSp_22", "CP_22", "CPp_22",
13 "CLnunu", "CRnunu",
14 "CLnunu_11", "CRnunu_11", "CLnunu_22", "CRnunu_22", "CLnunu_33", "CRnunu_33",
15 "WCscale"};
16
18
19 SMM.setObj((StandardModelMatching&) ReWEFTM.getObj());
20 ModelParamMap.insert(std::make_pair("C7", std::cref(C7)));
21 ModelParamMap.insert(std::make_pair("C7p", std::cref(C7p)));
22 ModelParamMap.insert(std::make_pair("C8", std::cref(C8)));
23 ModelParamMap.insert(std::make_pair("C8p", std::cref(C8p)));
24
25 ModelParamMap.insert(std::make_pair("C9_11", std::cref(C9_11)));
26 ModelParamMap.insert(std::make_pair("C9p_11", std::cref(C9p_11)));
27 ModelParamMap.insert(std::make_pair("C10_11", std::cref(C10_11)));
28 ModelParamMap.insert(std::make_pair("C10p_11", std::cref(C10p_11)));
29 ModelParamMap.insert(std::make_pair("CS_11", std::cref(CS_11)));
30 ModelParamMap.insert(std::make_pair("CSp_11", std::cref(CSp_11)));
31 ModelParamMap.insert(std::make_pair("CP_11", std::cref(CP_11)));
32 ModelParamMap.insert(std::make_pair("CPp_11", std::cref(CPp_11)));
33
34 ModelParamMap.insert(std::make_pair("C9_22", std::cref(C9_22)));
35 ModelParamMap.insert(std::make_pair("C9p_22", std::cref(C9p_22)));
36 ModelParamMap.insert(std::make_pair("C10_22", std::cref(C10_22)));
37 ModelParamMap.insert(std::make_pair("C10p_22", std::cref(C10p_22)));
38 ModelParamMap.insert(std::make_pair("CS_22", std::cref(CS_22)));
39 ModelParamMap.insert(std::make_pair("CSp_22", std::cref(CSp_22)));
40 ModelParamMap.insert(std::make_pair("CP_22", std::cref(CP_22)));
41 ModelParamMap.insert(std::make_pair("CPp_22", std::cref(CPp_22)));
42
43 ModelParamMap.insert(std::make_pair("CLnunu", std::cref(CLnunu)));
44 ModelParamMap.insert(std::make_pair("CRnunu", std::cref(CRnunu)));
45
46 ModelParamMap.insert(std::make_pair("CLnunu_11", std::cref(CLnunu_11)));
47 ModelParamMap.insert(std::make_pair("CRnunu_11", std::cref(CRnunu_11)));
48 ModelParamMap.insert(std::make_pair("CLnunu_22", std::cref(CLnunu_22)));
49 ModelParamMap.insert(std::make_pair("CRnunu_22", std::cref(CRnunu_22)));
50 ModelParamMap.insert(std::make_pair("CLnunu_33", std::cref(CLnunu_33)));
51 ModelParamMap.insert(std::make_pair("CRnunu_33", std::cref(CRnunu_33)));
52
53 ModelParamMap.insert(std::make_pair("WCscale", std::cref(WCscale)));
54}
55
57 if (IsModelInitialized()) {
58 }
59}
60
62// Initialization
63
65{
67 return(true);
68}
69
70bool RealWeakEFTLFV::Init(const std::map<std::string, double>& DPars) {
72}
73
75{
76 if(!StandardModel::PreUpdate()) return (false);
77
78 return (true);
79}
80
81bool RealWeakEFTLFV::Update(const std::map<std::string, double>& DPars) {
82
83 if(!PreUpdate()) return (false);
84
85 UpdateError = false;
86
87 for (std::map<std::string, double>::const_iterator it = DPars.begin(); it != DPars.end(); it++)
88 setParameter(it->first, it->second);
89
90 if (UpdateError) return (false);
91
92 if(!PostUpdate()) return (false);
93
94 return (true);
95}
96
98{
99 if(!StandardModel::PostUpdate()) return (false);
100
101 /* Necessary for updating StandardModel parameters in StandardModelMatching,
102 * and FlavourWC and FlavourWC-derived parameters in FlavourWCMatching */
103 ReWEFTM.getObj().updateRealWeakEFTLFVParameters();
104
105 return (true);
106}
107
108void RealWeakEFTLFV::setParameter(const std::string name, const double& value){
109 if(name.compare("C7") == 0)
110 C7 = value;
111 else if(name.compare("C7p") == 0)
112 C7p = value;
113 else if(name.compare("C8") == 0)
114 C8 = value;
115 else if(name.compare("C8p") == 0)
116 C8p = value;
117 else if(name.compare("C9_11") == 0)
118 C9_11 = value;
119 else if(name.compare("C9p_11") == 0)
120 C9p_11 = value;
121 else if(name.compare("C10_11") == 0)
122 C10_11 = value;
123 else if(name.compare("C10p_11") == 0)
124 C10p_11 = value;
125 else if(name.compare("CS_11") == 0)
126 CS_11 = value;
127 else if(name.compare("CSp_11") == 0)
128 CSp_11 = value;
129 else if(name.compare("CP_11") == 0)
130 CP_11 = value;
131 else if(name.compare("CPp_11") == 0)
132 CPp_11 = value;
133 else if(name.compare("C9_22") == 0)
134 C9_22 = value;
135 else if(name.compare("C9p_22") == 0)
136 C9p_22 = value;
137 else if(name.compare("C10_22") == 0)
138 C10_22 = value;
139 else if(name.compare("C10p_22") == 0)
140 C10p_22 = value;
141 else if(name.compare("CS_22") == 0)
142 CS_22 = value;
143 else if(name.compare("CSp_22") == 0)
144 CSp_22 = value;
145 else if(name.compare("CP_22") == 0)
146 CP_22 = value;
147 else if(name.compare("CPp_22") == 0)
148 CPp_22 = value;
149 else if(name.compare("CLnunu") == 0)
150 CLnunu = value;
151 else if(name.compare("CRnunu") == 0)
152 CRnunu = value;
153 else if(name.compare("CLnunu_11") == 0)
154 CLnunu_11 = value;
155 else if(name.compare("CRnunu_11") == 0)
156 CRnunu_11 = value;
157 else if(name.compare("CLnunu_22") == 0)
158 CLnunu_22 = value;
159 else if(name.compare("CRnunu_22") == 0)
160 CRnunu_22 = value;
161 else if(name.compare("CLnunu_33") == 0)
162 CLnunu_33 = value;
163 else if(name.compare("CRnunu_33") == 0)
164 CRnunu_33 = value;
165 else if(name.compare("WCscale") == 0)
166 WCscale = value;
167 else
169}
170
171bool RealWeakEFTLFV::CheckParameters(const std::map<std::string, double>& DPars) {
172 for (int i = 0; i < NRealWeakEFTLFVvars; i++) {
173 if (DPars.find(RealWeakEFTLFVvars[i]) == DPars.end()) {
174 std::cout << "ERROR: missing mandatory RealWeakEFTLFV parameter " << RealWeakEFTLFVvars[i] << std::endl;
177 }
178 }
180}
181
183// Flags
184
185bool RealWeakEFTLFV::setFlag(const std::string name, const bool value)
186{
187 return StandardModel::setFlag(name,value);
188}
189
std::map< std::string, double > DPars
Definition: Minimal.cpp:11
void addMissingModelParameter(const std::string &missingParameterName)
Definition: Model.h:250
std::map< std::string, std::reference_wrapper< const double > > ModelParamMap
Definition: Model.h:280
void setModelInitialized(bool ModelInitialized)
A set method to fix the failure or success of the initialization of the model.
Definition: Model.h:145
bool IsModelInitialized() const
A method to check if the model is initialized.
Definition: Model.h:136
std::string name
The name of the model.
Definition: Model.h:285
bool UpdateError
A boolean set to false if update is successful.
Definition: Model.h:272
void raiseMissingModelParameterCount()
Definition: Model.h:260
RealWeakEFTLFV()
RealWeakEFTLFV constructor.
virtual bool Update(const std::map< std::string, double > &DPars)
The update method for RealWeakEFTLFV.
virtual bool InitializeModel()
The post-update method for RealWeakEFTLFV.
virtual bool Init(const std::map< std::string, double > &DPars)
Initializes the RealWeakEFTLFV parameters found in the argument.
virtual bool setFlag(const std::string name, const bool value)
A method to set a flag of RealWeakEFTLFV.
virtual bool PostUpdate()
The post-update method for RealWeakEFTLFV.
static const std::string RealWeakEFTLFVvars[NRealWeakEFTLFVvars]
virtual bool CheckParameters(const std::map< std::string, double > &DPars)
A method to check if all the mandatory parameters for RealWeakEFTLFV have been provided in model init...
~RealWeakEFTLFV()
RealWeakEFTLFV destructor.
virtual bool PreUpdate()
The pre-update method for RealWeakEFTLFV.
static const int NRealWeakEFTLFVvars
A model class for the Standard Model.
virtual bool PreUpdate()
The pre-update method for StandardModel.
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 Init(const std::map< std::string, double > &DPars)
A method to initialize the model parameters.
Matching< StandardModelMatching, StandardModel > SMM
An object of type Matching.
virtual bool setFlag(const std::string name, const bool value)
A method to set a flag of StandardModel.
virtual bool PostUpdate()
The post-update method for StandardModel.
virtual void setParameter(const std::string name, const double &value)
A method to set the value of a parameter of StandardModel.
virtual bool InitializeModel()
A method to initialize the model.
A class for the matching in the Standard Model.