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