gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
SMSimpleSpec.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
5 //
16 
19 
20 #include <boost/preprocessor/tuple/to_seq.hpp>
21 #include <boost/preprocessor/seq/elem.hpp>
22 #include <boost/preprocessor/seq/for_each_product.hpp>
23 
25 // Relies on "tmp_map" being used as the variable name for the temporary maps
26 // inside the fill_map functions.
27 #define addtomap_EL(r, PRODUCT) \
28 { \
29  str key = BOOST_PP_SEQ_ELEM(0,PRODUCT); /* string map key */ \
30  tmp_map[key] = BOOST_PP_SEQ_ELEM(1,PRODUCT); /* function pointer */ \
31 }
32 
33 #define addtomap(__KEYS,FPTR) BOOST_PP_SEQ_FOR_EACH_PRODUCT(addtomap_EL, (BOOST_PP_TUPLE_TO_SEQ(__KEYS))((FPTR)) )
34 
35 using namespace SLHAea;
36 
37 namespace Gambit
38 {
39 
41 
43  SMea::SMea()
44  : SLHAeaModel()
45  {}
46 
48  SMea::SMea(const SLHAea::Coll& slhainput)
49  : SLHAeaModel(slhainput)
50  {}
51 
53  //SMea::SMea(const SMInputs& input)
54  //{
55  // /// Build an SLHAea object from the SMINPUTS struct
56  // SLHAeaModel(input)
57  //}
58 
60 
62  double SMea::get_MZ_pole() const { return getdata("SMINPUTS",4); }
63  double SMea::get_Mtop_pole() const { return getdata("SMINPUTS",6); }
64 
65  // Note, these are actually MSbar masses mb(mb) and mc(mc)
66  // However, since this wrapper is very simple, it isn't possible to return
67  // these at the same scale as the other running parameters. They can be
68  // be considered as approximately pole masses though, so I have allowed
69  // to be accessed here. Use as pole masses at own risk.
70  double SMea::get_MbMb() const { return getdata("SMINPUTS",5); }
71  double SMea::get_McMc() const { return getdata("SMINPUTS",24); }
72 
73  double SMea::get_Mtau_pole() const { return getdata("SMINPUTS",7); }
74  double SMea::get_Mmuon_pole() const { return getdata("SMINPUTS",13); }
75  double SMea::get_Melectron_pole() const { return getdata("SMINPUTS",11); }
76 
77  double SMea::get_Mnu1_pole() const { return getdata("SMINPUTS",12); }
78  double SMea::get_Mnu2_pole() const { return getdata("SMINPUTS",14); }
79  double SMea::get_Mnu3_pole() const { return getdata("SMINPUTS",8); }
80 
81  double SMea::get_MPhoton_pole() const { return 0.; }
82  double SMea::get_MGluon_pole() const { return 0.; }
83  double SMea::get_MPhoton() const { return 0.; }
84  double SMea::get_MGluon() const { return 0.; }
85 
86  // In SLHA the W mass is an output, though some spectrum generator authors
87  // allow it as a non-standard entry in SMINPUTS. Here we will stick to
88  // SLHA.
89  double SMea::get_MW_pole() const { return getdata("MASS",24); }
90  double SMea::get_MW_unc() const { return 0.0; }
91 
92  double SMea::get_sinthW2_pole() const { return (1.0 - Utils::sqr(get_MW_pole()) / Utils::sqr(get_MZ_pole())); }
93 
95  // Only available for light quarks
96  double SMea::get_md() const { return getdata("SMINPUTS",21); }
97  double SMea::get_mu() const { return getdata("SMINPUTS",22); }
98  double SMea::get_ms() const { return getdata("SMINPUTS",23); }
99 
100  double SMea::get_mD(int i) const
101  {
102  if (i==1) { return getdata("SMINPUTS",21); }
103  else if(i==2) { return getdata("SMINPUTS",23); }
104  else if(i==3) { return getdata("SMINPUTS",5); }
105  else { utils_error().raise(LOCAL_INFO,"Invalid index input to get_mU! Please check index range limits in wrapper SubSpectrum class!"); return -1; } // Should not return.
106  }
107 
108  double SMea::get_mU(int i) const
109  {
110  if (i==1) { return getdata("SMINPUTS",22); }
111  else if(i==2) { return getdata("SMINPUTS",24); }
112  else if(i==3) { return getdata("SMINPUTS",6); }
113  else { utils_error().raise(LOCAL_INFO,"Invalid index input to get_mD! Please check index range limits in wrapper SubSpectrum class!"); return -1; } // Should not return.
114  }
115 
116  double SMea::get_alpha() const { return 1.0/getdata("SMINPUTS",1); }
117  double SMea::get_alphaS() const { return getdata("SMINPUTS",3); }
118 
119  // Gauge couplings not provided since they cannot be provided at the same
120  // scale. If you want the SLHA definition gauge couplings, you can extract them
121  // from the SLHAea object yourself, or use the SMInputs object which comes
122  // along with this SubSpectrum inside the parent Spectrum object.
123 
125 
126 
128 
130 
133  {}
134 
136  SMSimpleSpec::SMSimpleSpec(const SLHAea::Coll& slhainput)
137  : SLHASimpleSpec(slhainput)
138  {}
139 
142  : SLHASimpleSpec(sminput.getSLHAea())
143  {}
144 
147  : SLHASimpleSpec(other)
148  {}
149 
151 
153  double SMSimpleSpec::GetScale() const { return 2; }
154 
156 
157  // Map fillers
158 
160  {
161  GetterMaps map_collection;
162 
163  typedef MTget::FInfo1 FInfo1;
164 
165  // Can't use c++11 initialiser lists, se have to initialise the index sets like this.
166  static const int i123v[] = {1,2,3};
167  static const std::set<int> i123(i123v, Utils::endA(i123v));
168 
169 
171  {
172  MTget::fmap0 tmp_map;
173 
174  tmp_map["gamma"] = &SMea::get_MPhoton;
175  tmp_map["g"] = &SMea::get_MGluon;
176 
177  //tmp_map["u_1"] = &SMea::get_mu; // u
178  //tmp_map["d_1"] = &SMea::get_md; // d
179  //tmp_map["d_2"] = &SMea::get_ms; // s
180 
181  // Nearest flavour 'aliases' for the SM mass eigenstates
182  tmp_map["u"] = &SMea::get_mu; // u
183  tmp_map["d"] = &SMea::get_md; // d
184  tmp_map["s"] = &SMea::get_ms; // s
185 
186  tmp_map["e-_3"]= &SMea::get_Mtau_pole; // tau
187  tmp_map["e-_2"]= &SMea::get_Mmuon_pole; // mu
188  tmp_map["e-_1"]= &SMea::get_Melectron_pole;
189 
190  map_collection[Par::mass1].map0 = tmp_map;
191  }
192 
193  {
194  MTget::fmap1 tmp_map;
195  tmp_map["d"] = FInfo1( &Model::get_mD, i123 );
196  tmp_map["u"] = FInfo1( &Model::get_mU, i123 );
197  //tmp_map["e-"] = FInfo1( &Model::get_me, i123456 );
198 
199  map_collection[Par::mass1].map1 = tmp_map;
200  }
201 
203  {
204  { //local scoping block
205  MTget::fmap0 tmp_map;
206 
207 
208  tmp_map["Z0"] = &SMea::get_MZ_pole;
209  tmp_map["W+"] = &SMea::get_MW_pole;
210  tmp_map["gamma"] = &SMea::get_MPhoton_pole;
211  tmp_map["g"] = &SMea::get_MGluon_pole;
212 
213  tmp_map["d_3"] = &SMea::get_MbMb; // b
214  tmp_map["u_2"] = &SMea::get_McMc; // c
215  tmp_map["u_3"] = &SMea::get_Mtop_pole; //t
216  tmp_map["e-_3"]= &SMea::get_Mtau_pole; // tau
217  tmp_map["e-_2"]= &SMea::get_Mmuon_pole; // mu
218  tmp_map["e-_1"]= &SMea::get_Melectron_pole;
219  tmp_map["nu_1"]= &SMea::get_Mnu1_pole;
220  tmp_map["nu_2"]= &SMea::get_Mnu2_pole;
221  tmp_map["nu_3"]= &SMea::get_Mnu3_pole;
222 
223  // Nearest flavour 'aliases' for the SM mass eigenstates
224  tmp_map["b"] = &SMea::get_MbMb; // b
225  tmp_map["c"] = &SMea::get_McMc; // c
226  tmp_map["t"] = &SMea::get_Mtop_pole; //t
227  tmp_map["tau-"]= &SMea::get_Mtau_pole; // tau
228  tmp_map["mu-"] = &SMea::get_Mmuon_pole; // mu
229  tmp_map["e-"] = &SMea::get_Melectron_pole;
230 
231 
232  map_collection[Par::Pole_Mass].map0 = tmp_map;
233  }
234 
235  { // fill W mass uncertainties
236  MTget::fmap0 tmp_map;
237  tmp_map["W+"] = &SMea::get_MW_unc;
238  map_collection[Par::Pole_Mass_1srd_high].map0 = tmp_map;
239  }
240 
241  {
242  MTget::fmap0 tmp_map;
243  tmp_map["W+"] = &SMea::get_MW_unc;
244  map_collection[Par::Pole_Mass_1srd_low].map0 = tmp_map;
245  }
246 
247 
248  { //local scoping block
249  MTget::fmap0 tmp_map;
250 
251  tmp_map["sinW2"] = &SMea::get_sinthW2_pole;
252 
253  map_collection[Par::Pole_Mixing].map0 = tmp_map;
254  }
255 
256  {
257  MTget::fmap0 tmp_map;
258 
259  tmp_map["alpha"] = &SMea::get_alpha;
260  tmp_map["alphaS"] = &SMea::get_alphaS;
261 
262  map_collection[Par::dimensionless].map0 = tmp_map;
263  }
264 
265  }
266 
267  return map_collection;
268  }
269 
270 } // end Gambit namespace
271 
272 
double get_Mmuon_pole() const
double get_sinthW2_pole() const
EXPORT_SYMBOLS error & utils_error()
Utility errors.
double get_McMc() const
double get_Mnu3_pole() const
static GetterMaps fill_getter_maps()
Map filler Used to initialise maps of function pointers.
double get_MW_unc() const
#define LOCAL_INFO
Definition: local_info.hpp:34
double get_MPhoton() const
double get_Mnu1_pole() const
SMSimpleSpec()
Member functions for SMSimpleSpec class.
double get_alphaS() const
double get_mu() const
virtual double GetScale() const
Hardcoded to return SLHA2 defined scale of light quark MSbar masses in SMINPUTS block (2 GeV) ...
EXPORT_SYMBOLS double sqr(double a)
returns square of double - saves tedious repetition
General small utility functions.
virtual SLHAstruct getSLHAea(int) const
Get spectrum information in SLHAea format (if possible)
Definition: subspectrum.cpp:56
double getdata(const std::string &block, int index) const
Helper functions to do error checking for SLHAea object contents.
SM specialisation of SLHAea object wrapper version of SubSpectrum class.
double get_MPhoton_pole() const
double get_mD(int) const
SMea()
Constructors.
double get_Mtop_pole() const
double get_MZ_pole() const
Getters for SM information.
double get_MGluon_pole() const
double get_MGluon() const
double get_MW_pole() const
double get_mU(int) const
double get_alpha() const
double get_md() const
Running masses.
T * endA(T(&arr)[N])
double get_Melectron_pole() const
double get_ms() const
TODO: see if we can use this one:
Definition: Analysis.hpp:33
Skeleton "model" class which interacts with an SLHAea object.
double get_Mnu2_pole() const
std::map< Par::Tags, MapCollection< MTget > > GetterMaps
Will need a map of map collections for both the getters and setters, containing the map collections f...
Definition: spec_head.hpp:248
double get_Mtau_pole() const
Container class for Standard Model input information (defined as in SLHA2)
Definition: sminputs.hpp:29
double get_MbMb() const