gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
QedQcdWrapper.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
21 
22 
28 
29 #include <boost/preprocessor/tuple/to_seq.hpp>
30 #include <boost/preprocessor/seq/elem.hpp>
31 #include <boost/preprocessor/seq/for_each_product.hpp>
32 
33 #include "lowe.h"
34 
36 // Relies on "tmp_map" being used as the variable name for the temporary maps
37 // inside the fill_map functions.
38 #define addtomap_EL(r, PRODUCT) \
39 { \
40  str key = BOOST_PP_SEQ_ELEM(0,PRODUCT); /* string map key */ \
41  tmp_map[key] = BOOST_PP_SEQ_ELEM(1,PRODUCT); /* function pointer */ \
42 }
43 
44 #define addtomap(__KEYS,FPTR) BOOST_PP_SEQ_FOR_EACH_PRODUCT(addtomap_EL, (BOOST_PP_TUPLE_TO_SEQ(__KEYS))((FPTR)) )
45 
46 
47 namespace Gambit
48 {
49 
50  namespace SpecBit
51  {
52 
54 
56  QedQcdWrapper::QedQcdWrapper()
57  : qedqcd()
58  , sminputs()
59  {}
60 
61  QedQcdWrapper::QedQcdWrapper(const softsusy::QedQcd& model, const SMInputs& input)
62  : qedqcd(model)
63  , sminputs(input) /***/
64  , hardup(get(Par::Pole_Mass,"u_3")) // QedQcd object will throw an error if we try to run above this, so set this as the limit /***/
65  , softup(get(Par::Pole_Mass,"u_3")) // Set top quark pole mass as soft upper limit of /***/
66  , softlow(2) // (GeV) QedQcd object sets beta functions to zero below here anyway
67  , hardlow(2) // (GeV) QedQcd object sets beta functions to zero below here anyway
68  {}
69 
71 
74 
79 
82  {
83  // Here we assume that all SMINPUTS defined in SLHA2 are provided by the
84  // SMINPUTS object, so we don't bother repeating them here. We also assume
85  // that the HE spectrum is going to provide the gauge couplings, so we don't
86  // bother with those either. We ignore the first parameter, as it doesn't matter
87  // if we're helping make an SLHA1 or SLHA2 file.
88 
89  // Add the b pole mass
90  SLHAea_add_from_subspec(slha, LOCAL_INFO, *this, Par::Pole_Mass,"d_3","MASS",5,"# mb (pole)");
91  }
92 
94  void QedQcdWrapper::RunToScaleOverride(double end_scale)
95  {
96  const double tol = 1.0e-5; // Value used internally in QedQcd methods
97  double begin_scale = GetScale();
98  qedqcd.run(begin_scale, end_scale, tol); // Run masses and couplings
99  }
100 
102  double QedQcdWrapper::GetScale() const { return qedqcd.get_scale(); }
103 
105  void QedQcdWrapper::SetScale(double scale) { qedqcd.set_scale(scale); }
106 
108 
110  double get_mUp (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mUp); }
111  double get_mCharm (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mCharm); }
112  double get_mTop (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mTop); }
113  double get_mDown (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mDown); }
114  double get_mStrange (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mStrange); }
115  double get_mBottom (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mBottom); }
116  double get_mElectron(const softsusy::QedQcd& model) { return model.displayMass(softsusy::mElectron); }
117  double get_mMuon (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mMuon); }
118  double get_mTau (const softsusy::QedQcd& model) { return model.displayMass(softsusy::mTau); }
119  // Might as well add photon and gluon for good measure, someone might need them for a loop or something.
120  double get_mPhoton (const softsusy::QedQcd&) { return 0.; }
121  double get_mGluon (const softsusy::QedQcd&) { return 0.; }
122 
124  // Note: often people want 1/alpha, but here we return alpha itself
125  // Might want to change these to g1,g3, to be consistent with MSSMSpec
126  double get_alpha (const softsusy::QedQcd& model) { return model.displayAlpha(softsusy::ALPHA); }
127  double get_alphaS (const softsusy::QedQcd& model) { return model.displayAlpha(softsusy::ALPHAS); }
128 
136  // alpha1 is in the GUT normalisation. sinth = sin^2 thetaW(Q) in MSbar
137  // scheme
138  // }
139  // Note that it computes that couplings at scale "m2". I think other quantities
140  // are taken as calculated more accurately at some initial scale, and then this
141  // simple 1-loop computation is used just to get these couplings at a nearby
142  // scale m2.
143 
144  double get_a1 (const softsusy::QedQcd&)
145  {
146  // We need sin^2 thetaW(Q) for this; i.e. I think it is supposed to be
147  // supplied at whatever scale the rest of the parameters are currently
148  // defined at. Not sure how to handle this.
149  //QedQcd::getGaugeMu(const double m2, const double sinth)
150  return 0.;
151  }
152 
154  // Note: model object not needed for these, but required by function signature
155  double get_Pole_mElectron(const SMInputs& inputs) { return inputs.mE; }
156  double get_Pole_mMuon (const SMInputs& inputs) { return inputs.mMu; }
157  double get_Pole_mNu1 (const SMInputs& inputs) { return inputs.mNu1; }
158  double get_Pole_mNu2 (const SMInputs& inputs) { return inputs.mNu2; }
159  double get_Pole_mNu3 (const SMInputs& inputs) { return inputs.mNu3; }
160  // for good measure.
161  double get_Pole_mPhoton (const SMInputs&) { return 0.; }
162  double get_Pole_mGluon (const SMInputs&) { return 0.; }
163 
164  double get_sinthW2_pole(const softsusy::QedQcd &qedqcd)
165  {
166  return (1 - Utils::sqr(qedqcd.displayPoleMW()) / Utils::sqr(qedqcd.displayPoleMZ()));
167  }
168 
169  // Filler function for getter function pointer maps
170  QedQcdWrapper::GetterMaps QedQcdWrapper::fill_getter_maps()
171  {
172  GetterMaps map_collection;
173 
175  //
176  // Functions utilising the "extraM" function signature
177  // (Zero index, model object as argument)
178  { // scope so we can reuse the name 'tmp_map' several times, so that our macro works.
179  // could make a better macro, or an actual function, but I'm in a hurry
180  MTget::fmap0_extraM tmp_map;
181 
182  tmp_map["u_1"] = &get_mUp; // u
183  tmp_map["u_2"] = &get_mCharm; // c
184  tmp_map["u_3"] = &get_mTop; // t
185  tmp_map["d_1"] = &get_mDown; // d
186  tmp_map["d_2"] = &get_mStrange; // s
187  tmp_map["d_3"] = &get_mBottom; // b
188  tmp_map["e-_1"] = &get_mElectron; // e-
189  tmp_map["e-_2"] = &get_mMuon; // mu-
190  tmp_map["e-_3"]= &get_mTau; // tau-
191 
192  tmp_map["gamma"] = &get_mPhoton;
193  tmp_map["g"] = &get_mGluon;
194 
195  map_collection[Par::mass1].map0_extraM = tmp_map;
196  }
198 
200  {
201  // Functions utilising the "extraM" function signature
202  // (Zero index, model object as argument)
203 
204  MTget::fmap0_extraM tmp_map;
205 
206  tmp_map["alpha"] = &get_alpha;
207  tmp_map["alphaS"] = &get_alphaS;
208 
209  map_collection[Par::dimensionless].map0_extraM = tmp_map;
210  }
212 
214  //
215  // Functions utilising the plain-vanilla function signature ("fmap")
216  // (Zero-argument member functions of model object)
217  {
218  // String names correspond to those defined in particle_database.cpp. If
219  // there is a mismatch, please change the ones here!
220  MTget::fmap0 tmp_map;
221 
222  tmp_map["Z0"] = &softsusy::QedQcd::displayPoleMZ;
223  tmp_map["W+"] = &softsusy::QedQcd::displayPoleMW;
224  tmp_map["u_3"] = &softsusy::QedQcd::displayPoleMt; // t
225  // "Pole" for b quark is quoted in SoftSUSY (lowe.h) documentation, so I guess this is an approximation; need to check details.
226  tmp_map["d_3"] = &softsusy::QedQcd::displayPoleMb; // b
227  tmp_map["e-_3"]= &softsusy::QedQcd::displayPoleMtau; // tau
228 
229  // Nearest flavour 'aliases' for the SM mass eigenstates
230  tmp_map["t"] = &softsusy::QedQcd::displayPoleMt;
231  tmp_map["b"] = &softsusy::QedQcd::displayPoleMb;
232  tmp_map["tau-"]= &softsusy::QedQcd::displayPoleMtau;
233 
234  map_collection[Par::Pole_Mass].map0 = tmp_map;
235  }
236 
243  {
244  MTget::fmap0_extraI tmp_map;
245 
246  tmp_map["e-_1"] = &get_Pole_mElectron; // e-
247  tmp_map["e-_2"] = &get_Pole_mMuon; // mu-
248  tmp_map["nu_1"] = &get_Pole_mNu1;
249  tmp_map["nu_2"] = &get_Pole_mNu2;
250  tmp_map["nu_3"] = &get_Pole_mNu3;
251 
252  // Nearest flavour 'aliases' for the SM mass eigenstates
253  tmp_map["e-"] = &get_Pole_mElectron; // e-
254  tmp_map["mu-"] = &get_Pole_mMuon; // mu-
255 
256  tmp_map["gamma"] = &get_Pole_mPhoton;
257  tmp_map["g"] = &get_Pole_mGluon;
258 
259  map_collection[Par::Pole_Mass].map0_extraI = tmp_map;
260  }
261 
262  // Functions utilising the "extraM" function signature
263  // (Zero index, model object as argument)
264  {
265 
266  MTget::fmap0_extraM tmp_map;
267 
268  tmp_map["sinW2"] = &get_sinthW2_pole;
269 
270  map_collection[Par::Pole_Mixing].map0_extraM = tmp_map;
271  }
272 
274 
275 
276  return map_collection;
277  }
278 
279 
281  void set_Pole_mElectron(SMInputs& inputs, double set_value) { inputs.mE = set_value; }
282 
283  // Filler function for setter function pointer maps
284  QedQcdWrapper::SetterMaps QedQcdWrapper::fill_setter_maps()
285  {
286  SetterMaps map_collection;
287 
289  //
290  // Functions utilising the plain-vanilla function signature ("fmap")
291  // (Zero-argument member functions of model object)
292  {
293  MTset::fmap0 tmp_map;
294 
295  // Do something like this, though the demo function here is a getter
296  // not a setter so you can't use that one of course :). If the
297  // function signature doesn't match what you need I can change it,
298  // otherwise need to use one of the "extra" map fillers, see e.g.
299  // below (there is also one that takes the model object as an
300  // input, as in the getter case)
301  tmp_map["Z0"] = &softsusy::QedQcd::setPoleMZ;
302  tmp_map["W+"] = &softsusy::QedQcd::setPoleMW;
303  map_collection[Par::Pole_Mass].map0 = tmp_map;
304  }
305 
308  {
309  MTset::fmap0_extraI tmp_map;
310 
311  tmp_map["e-_1"] = &set_Pole_mElectron;
312 
313  map_collection[Par::Pole_Mass].map0_extraI = tmp_map;
314  }
316  return map_collection;
317  }
318 
319  } // end SpecBit namespace
320 } // end Gambit namespace
321 
double get_mBottom(const softsusy::QedQcd &model)
virtual void SetScale(double scale)
Manually define the current renormalisation scale (do this at own risk!)
This class is used to deliver both information defined in the Standard Model (or potentially just QED...
double get_Pole_mElectron(const SMInputs &inputs)
Plain C-function wrappers for extra pole mass getters (manually specified masses) ...
double get_Pole_mPhoton(const SMInputs &)
double get_a1(const softsusy::QedQcd &)
All 3 SM gauge couplings.
double get_mStrange(const softsusy::QedQcd &model)
double get_alphaS(const softsusy::QedQcd &model)
#define LOCAL_INFO
Definition: local_info.hpp:34
double hardup
Limits for running.
Parameters used to define the Standard Model, in SLHA2 format.
virtual double GetScale() const
RunningPars interface overrides.
double get_alpha(const softsusy::QedQcd &model)
Plain C-function wrappers for QedQcd running coupling getters.
double get_Pole_mNu2(const SMInputs &inputs)
double get_sinthW2_pole(const softsusy::QedQcd &qedqcd)
EXPORT_SYMBOLS double sqr(double a)
returns square of double - saves tedious repetition
General small utility functions.
double get_Pole_mGluon(const SMInputs &)
SLHAea::Coll SLHAstruct
Less confusing name for SLHAea container class.
static SetterMaps fill_setter_maps()
Nicer alias for SLHAea container class, and some convenient helper functions that add or retrieve the...
double get_mPhoton(const softsusy::QedQcd &)
virtual void add_to_SLHAea(int, SLHAstruct &slha) const
Add QEDQCD information to an SLHAea object.
double get_mDown(const softsusy::QedQcd &model)
void set_Pole_mElectron(SMInputs &inputs, double set_value)
Plain C-function wrappers for extra pole mass setters (manually specified masses) ...
double get_mCharm(const softsusy::QedQcd &model)
static GetterMaps fill_getter_maps()
Map fillers.
virtual ~QedQcdWrapper()
Destructor.
virtual int get_numbers_stable_particles() const
Currently unused virtual functions.
double get_mGluon(const softsusy::QedQcd &)
This class is used to wrap the QedQcd object used by SoftSUSY and FlexibleSUSY in a Gambit SubSpectru...
double get_mTau(const softsusy::QedQcd &model)
double get_Pole_mNu1(const SMInputs &inputs)
double get_mElectron(const softsusy::QedQcd &model)
double get_Pole_mNu3(const SMInputs &inputs)
virtual void RunToScaleOverride(double)
Run masses and couplings to end_scale.
double get_Pole_mMuon(const SMInputs &inputs)
void SLHAea_add_from_subspec(SLHAstruct &slha, const str local_info, const SubSpectrum &subspec, const Par::Tags partype, const std::pair< int, int > &pdg_pair, const str &block, const str &comment, const bool error_if_missing=true, const double rescale=1.0)
Add an entry from a subspectrum getter to an SLHAea object; SLHA index given by pdg code...
QedQcdWrapper()
QedQcdWrapper member functions.
double get_mMuon(const softsusy::QedQcd &model)
TODO: see if we can use this one:
Definition: Analysis.hpp:33
double get_mTop(const softsusy::QedQcd &model)
double get_mUp(const softsusy::QedQcd &model)
Plain C-function wrappers for QedQcd running mass getters.
Container class for Standard Model input information (defined as in SLHA2)
Definition: sminputs.hpp:29