gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
ScalarSingletDM_Z2Spec.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
29 
30 #ifndef ScalarSingletDM_Z2SPEC_H
31 #define ScalarSingletDM_Z2SPEC_H
32 
33 #include <memory>
34 
35 #include "gambit/cmake/cmake_variables.hpp"
39 #include "gambit/SpecBit/ScalarSingletDM_Z2Spec_head.hpp" // "Header" declarations for ScalarSingletDM_Z2Spec class
40 
41 // Flexible SUSY stuff (should not be needed by the rest of gambit)
42 #include "flexiblesusy/config/config.h"
43 
44 
45 namespace Gambit
46 {
47 
48  namespace SpecBit
49  {
50  template <class MI>
51  const int ScalarSingletDM_Z2Spec<MI>::_index_offset = MI::index_offset;
52 
53  template <class MI>
55  : backend_name(be_name)
56  , backend_version(be_version)
57  , model_interface(mi)
58  {}
59 
60 
61  template <class MI>
63  {}
64 
65  template <class MI>
67  {}
68 
69 
70 
71  template <class MI>
73  {
74  model_interface.model.run_to(scale);
75  }
76  template <class MI>
78  {
79  return model_interface.model.get_scale();
80  }
81  template <class MI>
83  {
84  model_interface.model.set_scale(scale);
85  }
86 
87  template <class MI>
88  std::string ScalarSingletDM_Z2Spec<MI>::AccessError(std::string state) const
89  {
90  std::string errormsg;
91  errormsg = "Error accessing "+ state + " element is out of bounds";
92  return errormsg;
93  }
94 
95 
96 
97 //
98  template <class Model>
99  double get_sinthW2_MSbar(const Model& model)
100  {
101  double sthW2 = Utils::sqr(model.get_g1()) * 0.6 /
102  (0.6 * Utils::sqr(model.get_g1()) +
103  Utils::sqr(model.get_g2()));
104  return sthW2;
105  }
106 
107 
108  template <class MI>
110  {
111  typename ScalarSingletDM_Z2Spec<MI>::GetterMaps map_collection;
112  typedef typename MI::Model Model;
113 
114  typedef typename MTget::FInfo1 FInfo1;
115  typedef typename MTget::FInfo2 FInfo2;
116 
117  // Can't use c++11 initialise lists, se have to initialise the index sets like this.
118  static const int i01v[] = {0,1};
119  static const std::set<int> i01(i01v, Utils::endA(i01v));
120 
121  static const int i012v[] = {0,1,2};
122  static const std::set<int> i012(i012v, Utils::endA(i012v));
123 
124  static const int i0123v[] = {0,1,2,3};
125  static const std::set<int> i0123(i0123v, Utils::endA(i0123v));
126 
127  static const int i012345v[] = {0,1,2,3,4,5};
128  static const std::set<int> i012345(i012345v, Utils::endA(i012345v));
129 
130 
131  {
132  typename MTget::fmap0 tmp_map;
133  tmp_map["mS2"] = &Model::get_muS;
134  tmp_map["mu2"] = &Model::get_muH;
135  map_collection[Par::mass2].map0 = tmp_map;
136  }
137 
138 
139 
140  //dimensionless - mass dimension 0 parameters
141 
142  {
143  typename MTget::fmap0 tmp_map;
144  tmp_map["g1"]= &Model::get_g1;
145  tmp_map["g2"]= &Model::get_g2;
146  tmp_map["g3"]= &Model::get_g3;
147  tmp_map["lambda_h"]= &Model::get_LamH;
148  tmp_map["lambda_hS"]= &Model::get_LamSH;
149  tmp_map["lambda_S"]= &Model::get_LamS;
150 
151  map_collection[Par::dimensionless].map0 = tmp_map;
152  }
153 
154 
155  {
156  typename MTget::fmap0_extraM tmp_map;
157  tmp_map["sinW2"] = &get_sinthW2_MSbar<Model>;
158  map_collection[Par::dimensionless].map0_extraM = tmp_map;
159  }
160 
161 
162 
163  {
164  typename MTget::fmap0 tmp_map;
165  tmp_map["vev"] = &Model::get_v;
166  tmp_map["lambda_hS"]= &Model::get_LamSH; // ??? not sure why it wants it here
167  map_collection[Par::mass1].map0 = tmp_map;
168  }
169 
170  // Functions utilising the "extraM" function signature
171  // (Zero index, model object as argument)
172 
173 
174  // Functions utilising the two-index "plain-vanilla" function signature
175  // (Two-index member functions of model object)
176  {
177  typename MTget::fmap2 tmp_map;
178 
179  tmp_map["Yd"]= FInfo2( &Model::get_Yd, i012, i012);
180  tmp_map["Yu"]= FInfo2( &Model::get_Yu, i012, i012);
181  tmp_map["Ye"]= FInfo2( &Model::get_Ye, i012, i012);
182 
183  map_collection[Par::dimensionless].map2 = tmp_map;
184  }
185 
186  // Functions utilising the one-index "plain-vanilla" function signature
187  // (One-index member functions of model object)
188  {
189  typename MTget::fmap1 tmp_map;
190 
191  //tmp_map["S"] = FInfo1( &Model::get_Mss, i012345 );
192  //tmp_map["h0"] = FInfo1( &Model::get_Mhh, i01 );
193 
194  //Here we may access the goldstone boson
195  //and higgs. maybe too dangerous to keep?
196  tmp_map["d"] = FInfo1( &Model::get_MFd, i012 );
197  tmp_map["u"] = FInfo1( &Model::get_MFu, i012 );
198  tmp_map["e-"] = FInfo1( &Model::get_MFe, i012 );
199  tmp_map["e"] = FInfo1( &Model::get_MFe, i012 );
200  tmp_map["dbar"] = FInfo1( &Model::get_MFd, i012 );
201  tmp_map["ubar"] = FInfo1( &Model::get_MFu, i012 );
202  tmp_map["e+"] = FInfo1( &Model::get_MFe, i012 );
203 
204  map_collection[Par::mass_eigenstate].map1 = tmp_map;
205  }
206 
207 
208  {
209  typename MTget::fmap0 tmp_map;
210 
211  // ***REMOVED THESE! Leave them to the QedQcdWrapper.***
212  // reinstating the Z and W getters as otherwise there is no
213  // point in having the setters!
214  tmp_map["Z0"] = &Model::get_MVZ_pole_slha;
216  tmp_map["g"] = &Model::get_MVG_pole_slha;
217 
218 
219  map_collection[Par::Pole_Mass].map0 = tmp_map;
220  }
221 
222  {
223  typename MTget::fmap0 tmp_map;
224 
225  tmp_map["S"] = &Model::get_Mss_pole_slha;
226  tmp_map["h0_1"] = &Model::get_Mhh_pole_slha; //added to match SM Higgs container naming
227  tmp_map["A0"] = &Model::get_MAh_pole_slha;
228 
229 
230 
231  map_collection[Par::Pole_Mass].map0 = tmp_map;
232  }
233 
234 
235 
236 
237 
238  return map_collection;
239  }
240 
241  // Filler function for setter function pointer maps extractable from "runningpars" container
242  template <class MI>
244  {
245  typename ScalarSingletDM_Z2Spec<MI>::SetterMaps map_collection;
246  typedef typename MI::Model Model;
247 
248  typedef typename MTset::FInfo2 FInfo2;
249 
250  // Can't use c++11 initialise lists, se have to initialise the index sets like this.
251  static const int i01v[] = {0,1};
252  static const std::set<int> i01(i01v, Utils::endA(i01v));
253 
254  static const int i012v[] = {0,1,2};
255  static const std::set<int> i012(i012v, Utils::endA(i012v));
256 
257  static const int i0123v[] = {0,1,2,3};
258  static const std::set<int> i0123(i0123v, Utils::endA(i0123v));
259 
260  static const int i012345v[] = {0,1,2,3,4,5};
261  static const std::set<int> i012345(i012345v, Utils::endA(i012345v));
262 
264  //
265  // Functions utilising the "plain-vanilla" function signature
266  // (Zero index member functions of model object)
267  {
268  typename MTset::fmap0 tmp_map;
269 
270  tmp_map["mS2"] = &Model::set_muS;
271  tmp_map["mu2"] = &Model::set_muH;
272 
273  map_collection[Par::mass2].map0 = tmp_map;
274  }
275 
276  //
277  // Functions utilising the "plain-vanilla" function signature
278  // (Zero index member functions of model object)
279  {
280  typename MTset::fmap0 tmp_map;
281  tmp_map["vev"] = &Model::set_v;
282 
283  map_collection[Par::mass1].map0 = tmp_map;
284  }
285 
286  //
287  // Functions utilising the "plain-vanilla" function signature
288  // (Zero index member functions of model object)
289  {
290  typename MTset::fmap0 tmp_map;
291  tmp_map["g1"]= &Model::set_g1;
292  tmp_map["g2"]= &Model::set_g2;
293  tmp_map["g3"]= &Model::set_g3;
294  tmp_map["lambda_h"]= &Model::set_LamH;
295  tmp_map["lambda_hS"]= &Model::set_LamSH;
296  tmp_map["lambda_S"]= &Model::set_LamS;
297 
298  map_collection[Par::dimensionless].map0 = tmp_map;
299  }
300 
301  // Functions utilising the two-index "plain-vanilla" function signature
302  // (Two-index member functions of model object)
303  {
304  typename MTset::fmap2 tmp_map;
305 
306  tmp_map["Yd"]= FInfo2( &Model::set_Yd, i012, i012);
307  tmp_map["Yu"]= FInfo2( &Model::set_Yu, i012, i012);
308  tmp_map["Ye"]= FInfo2( &Model::set_Ye, i012, i012);
309 
310  map_collection[Par::dimensionless].map2 = tmp_map;
311  }
312 
313 
314  return map_collection;
315  }
316 
318 
319  } // end SpecBit namespace
320 } // end Gambit namespace
321 
322 #endif
virtual void SetScale(double scale)
Manually set the renormalisation scale of parameters somewhat dangerous to allow this but may be need...
Model & model()
Get model object on which to call function pointers.
Definition: spec_head.hpp:234
"Header" declarations for ScalarSingletDM_Z2Spec class (definitions in another header file due to thi...
virtual void RunToScaleOverride(double scale)
Run spectrum to new scale.
static GetterMaps fill_getter_maps()
Map filler overrides.
EXPORT_SYMBOLS double sqr(double a)
returns square of double - saves tedious repetition
General small utility functions.
virtual double GetScale() const
Returns the renormalisation scale of parameters.
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
Abstract class for accessing general spectrum information.
virtual std::string AccessError(std::string state) const
SLHAea helper functions using spectrum objects.
double get_sinthW2_MSbar(const Model &model)
Definition: MDMSpec.hpp:87
T * endA(T(&arr)[N])
TODO: see if we can use this one:
Definition: Analysis.hpp:33