gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
a Global And Modular Bsm Inference Tool
ini_functions.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
31 
36 #include "gambit/Backends/backend_singleton.hpp"
38 #include "gambit/Logs/logging.hpp"
39 
40 namespace Gambit
41 {
42 
45  {
46  try
47  {
49  }
50  catch (std::exception& e) { ini_catch(e); }
51  return 0;
52  }
53 
56  {
57  try
58  {
59  Backends::backendInfo().default_safe_versions[be] = def;
60  }
61  catch (std::exception& e) { ini_catch(e); }
62  return 0;
63  }
64 
66  int add_model(str model, str parent)
67  {
68  try
69  {
70  Models::ModelDB().declare_model(model, parent);
71  }
72  catch (std::exception& e) { ini_catch(e); }
73  return 0;
74  }
75 
77  int add_parameter(model_functor& primary_parameters, str param)
78  {
79  try
80  {
81  primary_parameters.addParameter(param);
82  }
83  catch (std::exception& e) { ini_catch(e); }
84  return 0;
85  }
86 
88  int set_model_name(model_functor& primary_parameters, str model_name)
89  {
90  try
91  {
92  primary_parameters.setModelName(model_name);
93  }
94  catch (std::exception& e) { ini_catch(e); }
95  return 0;
96  }
97 
99  int copy_parameters(model_functor& donor, model_functor& donee, bool add_friend, str model, str model_x)
100  {
101  try
102  {
103  donor.donateParameters(donee);
104  if (add_friend) Models::ModelDB().add_friend(model, model_x);
105  }
106  catch (std::exception& e) { ini_catch(e); }
107  return 0;
108  }
109 
112  {
113  int mytag;
114  try
115  {
116  mytag = Logging::getfreetag();
117  Logging::tag2str()[mytag] = module;
118  Logging::components().insert(mytag);
119  }
120  catch (std::exception& e) { ini_catch(e); }
121  return mytag;
122  }
123 
126  safe_ptr<Options>& opts, safe_ptr<std::set<sspair>>& dependees, safe_ptr<Options>& subcaps)
127  {
128  try
129  {
130  if (can_manage)
131  {
132  f.setCanBeLoopManager(true);
133  *done = f.loopIsDone();
134  }
135  opts = f.getOptions();
136  dependees = f.getDependees();
137  subcaps = f.getSubCaps();
138  }
139  catch (std::exception& e) { ini_catch(e); }
140  return 0;
141  }
142 
145  const str& loopmanager_capability, const str& loopmanager_type)
146  {
147  try
148  {
149  f.setLoopManagerCapType(loopmanager_capability, loopmanager_type);
150  iteration = f.iterationPtr();
151  }
152  catch (std::exception& e) { ini_catch(e); }
153  return 0;
154  }
155 
158  {
159  try
160  {
161  f.setAllowedModel(model);
162  }
163  catch (std::exception& e) { ini_catch(e); }
164  return 0;
165  }
166 
169  const str& req, const str& tags, bool is_variable, const str& req_type1,
170  const str& req_type2, void(*resolver)(functor*))
171  {
172  try
173  {
174  str signature = req_type1 + (is_variable ? "*" : req_type2);
175  f.setBackendReq(group, req, tags, signature, resolver);
176  }
177  catch (std::exception& e) { ini_catch(e); }
178  return 0;
179  }
180 
182  int register_dependency(module_functor_common& f, const str& dep, const str& dep_type,
183  void(*resolver)(functor*, module_functor_common*))
184  {
185  try
186  {
187  f.setDependency(dep, dep_type, resolver);
188  }
189  catch (std::exception& e) { ini_catch(e); }
190  return 0;
191  }
192 
194  int register_conditional_dependency(module_functor_common& f, const str& dep, const str& dep_type)
195  {
196  try
197  {
198  f.setConditionalDependency(dep, dep_type);
199  }
200  catch (std::exception& e) { ini_catch(e); }
201  return 0;
202  }
203 
206  const str& dep, void(*resolver)(functor*, module_functor_common*))
207  {
208  int i = register_conditional_dependency(f, dep, "ModelParameters");
209  return i + register_model_conditional_dependency(f, model, dep, resolver);
210  }
211 
214  const str& dep, void(*resolver)(functor*, module_functor_common*))
215  {
216  try
217  {
218  f.setModelConditionalDependency(model, dep, resolver);
219  }
220  catch (std::exception& e) { ini_catch(e); }
221  return 0;
222  }
223 
226  const str& versions, const str& dep, void(*resolver)(functor*, module_functor_common*))
227  {
228  try
229  {
230  f.setBackendConditionalDependency(req, be, versions, dep, resolver);
231  }
232  catch (std::exception& e) { ini_catch(e); }
233  return 0;
234  }
235 
237  int register_model_group(module_functor_common& f, const str& group_name, const str& group)
238  {
239  try
240  {
241  f.setModelGroup(group_name,group);
242  }
243  catch (std::exception& e) { ini_catch(e); }
244  return 0;
245  }
246 
249  {
250  try
251  {
252  f.setAllowedModelGroupCombo(combo);
253  }
254  catch (std::exception& e) { ini_catch(e); }
255  return 0;
256  }
257 
260  {
261  try
262  {
263  f.makeBackendMatchingRule(rule);
264  }
265  catch (std::exception& e) { ini_catch(e); }
266  return 0;
267  }
268 
270  int apply_backend_option_rule(module_functor_common& f, const str& be_and_ver, const str& tags)
271  {
272  try
273  {
274  f.makeBackendOptionRule(be_and_ver, tags);
275  }
276  catch (std::exception& e) { ini_catch(e); }
277  return 0;
278  }
279 
280 
281  namespace slhahelp
282  {
283 
285  std::map<str, p_int_string> init_gauge_label_to_index_type()
286  {
287  std::map<str, p_int_string> gauge_label_to_index_type;
288 
289  gauge_label_to_index_type["~e_L"] = std::make_pair(1,"~e-");
290  gauge_label_to_index_type["~mu_L"] = std::make_pair(2,"~e-");
291  gauge_label_to_index_type["~tau_L"] = std::make_pair(3,"~e-");
292  gauge_label_to_index_type["~e_R"] = std::make_pair(4,"~e-");
293  gauge_label_to_index_type["~mu_R"] = std::make_pair(5,"~e-");
294  gauge_label_to_index_type["~tau_R"] = std::make_pair(6,"~e-");
295 
296  gauge_label_to_index_type["~d_L"] = std::make_pair(1,"~d");
297  gauge_label_to_index_type["~s_L"] = std::make_pair(2,"~d");
298  gauge_label_to_index_type["~b_L"] = std::make_pair(3,"~d");
299  gauge_label_to_index_type["~d_R"] = std::make_pair(4,"~d");
300  gauge_label_to_index_type["~s_R"] = std::make_pair(5,"~d");
301  gauge_label_to_index_type["~b_R"] = std::make_pair(6,"~d");
302 
303  gauge_label_to_index_type["~u_L"] = std::make_pair(1,"~u");
304  gauge_label_to_index_type["~c_L"] = std::make_pair(2,"~u");
305  gauge_label_to_index_type["~t_L"] = std::make_pair(3,"~u");
306  gauge_label_to_index_type["~u_R"] = std::make_pair(4,"~u");
307  gauge_label_to_index_type["~c_R"] = std::make_pair(5,"~u");
308  gauge_label_to_index_type["~t_R"] = std::make_pair(6,"~u");
309 
310  gauge_label_to_index_type["~nu_e_L"] = std::make_pair(1,"~nu");
311  gauge_label_to_index_type["~nu_mu_L"] = std::make_pair(2,"~nu");
312  gauge_label_to_index_type["~nu_tau_L"] = std::make_pair(3,"~nu");
313 
315  }
316 
318  std::map<str, p_int_string> init_mass_label_to_index_type()
319  {
320  std::map<str, p_int_string> mass_label_to_index_type;
321  mass_label_to_index_type["~e-_1"] = std::make_pair(1,"~e-");
322  mass_label_to_index_type["~e-_2"] = std::make_pair(2,"~e-");
323  mass_label_to_index_type["~e-_3"] = std::make_pair(3,"~e-");
324  mass_label_to_index_type["~e-_4"] = std::make_pair(4,"~e-");
325  mass_label_to_index_type["~e-_5"] = std::make_pair(5,"~e-");
326  mass_label_to_index_type["~e-_6"] = std::make_pair(6,"~e-");
327 
328  mass_label_to_index_type["~d_1"] = std::make_pair(1,"~d");
329  mass_label_to_index_type["~d_2"] = std::make_pair(2,"~d");
330  mass_label_to_index_type["~d_3"] = std::make_pair(3,"~d");
331  mass_label_to_index_type["~d_4"] = std::make_pair(4,"~d");
332  mass_label_to_index_type["~d_5"] = std::make_pair(5,"~d");
333  mass_label_to_index_type["~d_6"] = std::make_pair(6,"~d");
334 
335  mass_label_to_index_type["~u_1"] = std::make_pair(1,"~u");
336  mass_label_to_index_type["~u_2"] = std::make_pair(2,"~u");
337  mass_label_to_index_type["~u_3"] = std::make_pair(3,"~u");
338  mass_label_to_index_type["~u_4"] = std::make_pair(4,"~u");
339  mass_label_to_index_type["~u_5"] = std::make_pair(5,"~u");
340  mass_label_to_index_type["~u_6"] = std::make_pair(6,"~u");
341 
342  mass_label_to_index_type["~nu_1"] = std::make_pair(1,"~nu");
343  mass_label_to_index_type["~nu_2"] = std::make_pair(2,"~nu");
344  mass_label_to_index_type["~nu_3"] = std::make_pair(3,"~nu");
345 
347  }
348 
350  std::map<str, pair_string_ints> init_familystate_label()
351  {
352  std::map<str, pair_string_ints> familystate_label;
353 
354  //pairs labeling family, mass
355  pair_ints const three_one(3,1);
356  pair_ints const three_two(3,2);
357  pair_ints const two_one(3,1);
358  pair_ints const two_two(3,2);
359  pair_ints const one_one(3,1);
360  pair_ints const one_two(3,2);
361 
362  //triplet labelling type, generation and mass order of family states
363  pair_string_ints const stop1("~u",three_one);
364  pair_string_ints const stop2("~u",three_two);
365  pair_string_ints const sbot1("~d",three_one);
366  pair_string_ints const sbot2("~d",three_two);
367  pair_string_ints const stau1("~e-",three_one);
368  pair_string_ints const stau2("~e-",three_two);
369  pair_string_ints const scharm1("~u",two_one);
370  pair_string_ints const scharm2("~u",two_two);
371  pair_string_ints const sstrange1("~d",two_one);
372  pair_string_ints const sstrange2("~d",two_two);
373  pair_string_ints const smuon1("~e-",two_one);
374  pair_string_ints const smuon2("~e-",two_two);
375  pair_string_ints const sup1("~u",one_one);
376  pair_string_ints const sup2("~u",one_two);
377  pair_string_ints const sdown1("~d",one_one);
378  pair_string_ints const sdown2("~d",one_two);
379  pair_string_ints const selectron1("~e-",one_one);
380  pair_string_ints const selectron2("~e-",one_two);
381 
382  // only have left handed sneutrinos in MSSM
383  pair_string_ints const snue1("~nu",three_one);
384  pair_string_ints const snumu1("~nu",two_one);
385  pair_string_ints const snutau1("~nu",one_one);
386 
387  familystate_label["~t_1"] = stop1;
388  familystate_label["~t_2"] = stop2;
389  familystate_label["~b_1"] = sbot1;
390  familystate_label["~b_2"] = sbot2;
391  familystate_label["~tau_1"] = stau1;
392  familystate_label["~tau_2"] = stau2;
393 
394  familystate_label["~c_1"] = scharm1;
395  familystate_label["~c_2"] = scharm2;
396  familystate_label["~s_1"] = sstrange1;
397  familystate_label["~s_2"] = sstrange2;
398  familystate_label["~muon_1"] = smuon1;
399  familystate_label["~muon_2"] = smuon2;
400 
401  // maybe we shouldn't do first gen it's confusing
402  familystate_label["~u_1"] = sup1;
403  familystate_label["~u_2"] = sup2;
404  familystate_label["~d_1"] = sdown1;
405  familystate_label["~d_2"] = sdown2;
406  familystate_label["~e-_1"] = selectron1;
407  familystate_label["~e-_2"] = selectron2;
408 
409  // these are even less needed since no l-r mixing without r state
410  familystate_label["~nu_1"] = snue1;
411  familystate_label["~nu_2"] = snumu1;
412  familystate_label["~nu_3"] = snutau1;
413 
414  return familystate_label;
415 
416  }
417 
420  std::map<p_int_string, std::vector<str> > init_type_family_to_gauge_states()
421  {
422  std::map<p_int_string, std::vector<str> > type_family_to_gauge_states;
423 
424  type_family_to_gauge_states[std::make_pair(3,"~u")] = initVector<str>("~t_L","~t_R");
425  type_family_to_gauge_states[std::make_pair(3,"~d")] = initVector<str>("~b_L","~b_R");
426  type_family_to_gauge_states[std::make_pair(3,"~e-")]= initVector<str>("~tau_L","~tau_R");
427  type_family_to_gauge_states[std::make_pair(2,"~u")] = initVector<str>("~c_L","~c_R");
428  type_family_to_gauge_states[std::make_pair(2,"~d")] = initVector<str>("~s_L","~s_R");
429  type_family_to_gauge_states[std::make_pair(2,"~e-")]= initVector<str>("~mu_L","~mu_R");
430  type_family_to_gauge_states[std::make_pair(1,"~u")] = initVector<str>("~u_L","~u_R");
431  type_family_to_gauge_states[std::make_pair(1,"~d")] = initVector<str>("~d_L","~d_R");
432  type_family_to_gauge_states[std::make_pair(1,"~e-")]= initVector<str>("~e_L","~e_R");
433  //no sneutrino gauges pairs as no right sneutrino
434 
436  }
437 
440  std::map<str, std::vector<str> > init_family_state_to_gauge_state()
441  {
442  std::map<str, std::vector<str> > family_state_to_gauge_state;
443 
444  family_state_to_gauge_state["~t_1"] = initVector<str>("~t_L","~t_R");
445  family_state_to_gauge_state["~t_2"] = initVector<str>("~t_L","~t_R");
446  family_state_to_gauge_state["~b_1"] = initVector<str>("~b_L","~b_R");
447  family_state_to_gauge_state["~b_2"] = initVector<str>("~b_L","~b_R");
448  family_state_to_gauge_state["~tau_1"] = initVector<str>("~tau_L","~tau_R");
449  family_state_to_gauge_state["~tau_2"] = initVector<str>("~tau_L","~tau_R");
450 
451  family_state_to_gauge_state["~c_1"] = initVector<str>("~c_L","~c_R");
452  family_state_to_gauge_state["~c_2"] = initVector<str>("~c_L","~c_R");
453  family_state_to_gauge_state["~s_1"] = initVector<str>("~s_L","~s_R");
454  family_state_to_gauge_state["~s_2"] = initVector<str>("~s_L","~s_R");
455  family_state_to_gauge_state["~muon_1"] = initVector<str>("~mu_L","~mu_R");
456  family_state_to_gauge_state["~muon_2"] = initVector<str>("~mu_L","~mu_R");
457 
458  family_state_to_gauge_state["~u_1"] = initVector<str>("~u_L","~u_R");
459  family_state_to_gauge_state["~u_2"] = initVector<str>("~u_L","~u_R");
460  family_state_to_gauge_state["~d_1"] = initVector<str>("~d_L","~d_R");
461  family_state_to_gauge_state["~d_2"] = initVector<str>("~d_L","~d_R");
462  family_state_to_gauge_state["~e-_1"] = initVector<str>("~e_L","~e_R");
463  family_state_to_gauge_state["~e-_2"] = initVector<str>("~e_L","~e_R");
464 
466  }
467 
470  std::map<str, std::vector<str> > init_gauge_es_to_family_states()
471  {
472  std::map<str, std::vector<str> > gauge_es_to_family_states;
473 
474  gauge_es_to_family_states["~t_L"] = initVector<str>("~t_1","~t_2");
475  gauge_es_to_family_states["~t_R"] = initVector<str>("~t_1","~t_2");
476  gauge_es_to_family_states["~b_L"] = initVector<str>("~b_1","~b_2");
477  gauge_es_to_family_states["~b_R"] = initVector<str>("~b_1","~b_2");
478  gauge_es_to_family_states["~tau_L"] = initVector<str>("~tau_1","~tau_2");
479  gauge_es_to_family_states["~tau_R"] = initVector<str>("~tau_1","~tau_2");
480  gauge_es_to_family_states["~c_L"] = initVector<str>("~c_1","~c_2");
481  gauge_es_to_family_states["~c_R"] = initVector<str>("~c_1","~c_2");
482  gauge_es_to_family_states["~s_L"] = initVector<str>("~s_1","~s_2");
483  gauge_es_to_family_states["~s_R"] = initVector<str>("~s_1","~s_2");
484  gauge_es_to_family_states["~mu_L"] = initVector<str>("~mu_1","~mu_2");
485  gauge_es_to_family_states["~mu_R"] = initVector<str>("~mu_1","~mu_2");
486 
487  gauge_es_to_family_states["~u_L"] = initVector<str>("~u_1","~u_2");
488  gauge_es_to_family_states["~u_R"] = initVector<str>("~u_1","~u_2");
489  gauge_es_to_family_states["~d_L"] = initVector<str>("~d_1","~d_2");
490  gauge_es_to_family_states["~d_R"] = initVector<str>("~d_1","~d_2");
491  gauge_es_to_family_states["~e_L"] = initVector<str>("~e-_1","~e-_2");
492  gauge_es_to_family_states["~e_R"] = initVector<str>("~e-_1","~e-_2");
493 
495  }
496 
499  std::map<str,std::vector<str> > init_type_to_vec_of_mass_es()
500  {
501  std::map<str,std::vector<str> > type_to_vec_of_mass_es;
502 
503  type_to_vec_of_mass_es["~u"] = initVector<str>("~u_1", "~u_2", "~u_3", "~u_4", "~u_5", "~u_6");
504  type_to_vec_of_mass_es["~d"] = initVector<str>("~d_1", "~d_2", "~d_3", "~d_4", "~d_5", "~d_6");
505  type_to_vec_of_mass_es["~e-"] = initVector<str>("~e-_1", "~e-_2", "~e-_3", "~e-_4", "~e-_5", "~e-_6");
506  type_to_vec_of_mass_es["~nu"] = initVector<str>("~nu_1", "~nu_2", "~nu_3");
507 
508  return type_to_vec_of_mass_es;
509  }
510 
513  std::map<str,std::vector<str> > init_type_to_vec_of_gauge_es()
514  {
515  std::map<str,std::vector<str> > type_to_vec_of_gauge_es;
516 
517  type_to_vec_of_gauge_es["~u"] = initVector<str>("~u_L", "~c_L", "~t_L", "~u_R", "~c_R", "~t_R");
518  type_to_vec_of_gauge_es["~d"] = initVector<str>("~d_L", "~s_L", "~b_L", "~d_R", "~s_R", "~b_R");
519  type_to_vec_of_gauge_es["~e-"] = initVector<str>("~e_L", "~mu_L", "~tau_L", "~e_R", "~mu_R", "~tau_R");
520  type_to_vec_of_gauge_es["~nu"] = initVector<str>("~nu_e_L", "~nu_mu_L", "~nu_tau_L");
521 
523  }
524 
525  }
526 
527 }
int set_model_name(model_functor &, str)
Set the model name in a primary model functor.
int register_conditional_dependency(module_functor_common &, const str &, const str &)
Register a conditional dependency of a module function.
int register_model_singly(module_functor_common &, const str &)
Register that a module function is compatible with a single model.
std::map< str, std::vector< str > > init_family_state_to_gauge_state()
maps directly from family string to left_right gauge_pairs helps us reuse other routines that take st...
std::map< int, std::string > & tag2str()
Definition: logging.cpp:130
int getfreetag()
Definition: logging.cpp:138
void setDependency(str, str, void(*)(functor *, module_functor_common *), str purpose="")
Add and activate unconditional dependencies.
Definition: functors.cpp:1034
safe_ptr< Options > getSubCaps()
Return a safe pointer to the subcaps that this functor realises it is supposed to facilitate downstre...
Definition: functors.cpp:407
ModelFunctorClaw & ModelDB()
Claw accessor function.
int register_function_nesting(module_functor_common &, omp_safe_ptr< long long > &, const str &, const str &)
Register the fact that a module function needs to run nested.
void setAllowedModel(str model)
Add a model to the internal list of models for which this functor is allowed to be used...
Definition: functors.cpp:450
void setAllowedModelGroupCombo(str groups)
Add a combination of model groups to the internal list of combinations for which this functor is allo...
Definition: functors.cpp:511
int register_model_combination(module_functor_common &, const str &)
Register a combination of models as allowed with a functor.
const std::map< str, pair_string_ints > familystate_label
A safe pointer that throws an informative error if you try to dereference it when nullified...
Definition: util_types.hpp:167
void setBackendReq(str, str, str, str, void(*)(functor *))
Add an unconditional backend requirement The info gets updated later if this turns out to be contitio...
Definition: functors.cpp:1132
void addParameter(str parname)
Function for adding a new parameter to the map inside the ModelParameters object. ...
Definition: functors.cpp:1764
void makeBackendMatchingRule(str tag)
Add one or more rules for forcing backends reqs with the same tags to always be resolved from the sam...
Definition: functors.cpp:1276
std::pair< str, pair_ints > pair_string_ints
Micro function useful from all sorts of other initialisation codes.
Function wrapper (functor) base class.
Definition: functors.hpp:87
void makeBackendOptionRule(str, str)
Add a rule for dictating which backends can be used to fulfill which backend requirements.
Definition: functors.cpp:1211
int register_dependency(module_functor_common &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a dependency of a module function.
safe_ptr< Options > getOptions()
Return a safe pointer to the options that this functor is supposed to run with (e.g. from the ini file).
Definition: functors.cpp:375
void setConditionalDependency(str, str)
Add conditional dependency-type pairs in advance of later conditions.
Definition: functors.cpp:1043
int register_function(module_functor_common &, bool, safe_ptr< bool > *, safe_ptr< Options > &, safe_ptr< std::set< sspair >> &, safe_ptr< Options > &)
Register a function with a module.
std::set< int > & components()
Definition: logging.cpp:81
int add_parameter(model_functor &, str)
Add a new parameter to a primary model functor.
Functor derived class for module functions.
Definition: functors.hpp:399
std::map< p_int_string, std::vector< str > > init_type_family_to_gauge_states()
map to obtain left_right gauge_pairs from state info helps us reuse other routiones with string argum...
A safe pointer designed to point at an array, and return the entry in that array corresponding to the...
Definition: util_types.hpp:222
virtual void setLoopManagerCapType(str cap, str t)
Setter for specifying the capability required of a manager functor, if it is to run this functor nest...
Definition: functors.cpp:903
Functions for triggering initialisation code.
const std::map< p_int_string, std::vector< str > > type_family_to_gauge_states
std::map< str, p_int_string > init_mass_label_to_index_type()
map from mass eigenstate strings to string, index pairs
const std::map< str, p_int_string > gauge_label_to_index_type
Known maps filled at initialisation.
Functor class definitions.
int apply_backend_matching_rule(module_functor_common &, const str &)
Apply a backend-matching rule.
void setModelConditionalDependency(str, str, void(*)(functor *, module_functor_common *))
Add a model conditional dependency for multiple models.
Definition: functors.cpp:1106
int register_module_with_log(str)
Create a log tag for a new module.
void donateParameters(model_functor &receiver)
Function for handing over parameter identities to another model_functor.
Definition: functors.cpp:1776
void add_friend(const str &model, const str &newfriend)
Add a friend, and all its friends and ancestors, to a model&#39;s list of friends.
Definition: models.cpp:189
int apply_backend_option_rule(module_functor_common &, const str &, const str &)
Apply a backend option rule.
int register_backend_conditional_dependency(module_functor_common &, const str &, const str &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a backend-conditional dependency of a module function.
GAMBIT backend info object accessor function.
std::pair< int, int > pair_ints
const std::map< str, p_int_string > mass_label_to_index_type
Functors specific to ModelParameters objects.
Definition: functors.hpp:974
int add_model(str, str)
Runtime addition of model to GAMBIT model database.
int pass_default_to_backendinfo(str, str)
Helper function for passing default backend information at initialisation.
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
const std::map< str, std::vector< str > > type_to_vec_of_mass_es
std::map< str, std::vector< str > > init_type_to_vec_of_mass_es()
map from string representing type (ie up-squarks, down-squarks or charged sleptons) to appropriate se...
safe_ptr< std::set< sspair > > getDependees()
Return a safe pointer to the vector of all capability,type pairs of functors arranged downstream of t...
Definition: functors.cpp:413
const std::map< str, std::vector< str > > gauge_es_to_family_states
void setBackendConditionalDependency(str, str, str, str, void(*)(functor *, module_functor_common *))
Add a backend conditional dependency for multiple backend versions.
Definition: functors.cpp:1064
int copy_parameters(model_functor &, model_functor &, bool, str="", str="")
Tell a model functor to take its parameter definition from another model functor. ...
int register_model_conditional_dependency(module_functor_common &, const str &, const str &, void(*)(functor *, module_functor_common *))
Register a model-conditional dependency of a module function.
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
const std::map< str, std::vector< str > > type_to_vec_of_gauge_es
std::map< str, std::vector< str > > init_type_to_vec_of_gauge_es()
map from string representing type (ie up-squarks, down-squarks or charged sleptons) to appropriate se...
void setModelGroup(str group, str contents)
Add a model group definition to the internal list of model groups.
Definition: functors.cpp:501
Header for logging classes.
const std::map< str, std::vector< str > > family_state_to_gauge_state
void setModelName(str model_name)
Function for setting the model name for a ModelParameters object. Mainly for better error messages...
Definition: functors.cpp:1770
virtual void setCanBeLoopManager(bool canManage)
Setter for specifying whether this is permitted to be a manager functor, which runs other functors ne...
Definition: functors.cpp:898
virtual omp_safe_ptr< long long > iterationPtr()
Return a safe pointer to the iteration number in the loop in which this functor runs.
Definition: functors.cpp:891
std::map< str, pair_string_ints > init_familystate_label()
map to extract info from family state
int register_model_parameter_dependency(module_functor_common &, const str &, const str &, void(*resolver)(functor *, module_functor_common *))
Register a model parameters dependency of a module function.
virtual safe_ptr< bool > loopIsDone()
Return a safe pointer to the flag indicating that a loop managed by this functor should break now...
Definition: functors.cpp:869
void add(str, str)
Define a new equivalency relation {.
std::map< str, p_int_string > init_gauge_label_to_index_type()
map from gauge eigenstate strings to string, index pairs
int register_backend_requirement(module_functor_common &, const str &, const str &, const str &, bool, const str &, const str &, void(*)(functor *))
Register a backend requirement for a module function.
void declare_model(const str &, const str &)
Add a new model to the model database.
Definition: models.cpp:151
type_equivalency & typeEquivalencies()
Backend info accessor function.
int register_model_group(module_functor_common &, const str &, const str &)
Register a model group with a functor.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
GAMBIT model claw object accessor function.
int add_equivrelation(str, str)
Helper function for adding a type equivalency at initialisation.
std::map< str, std::vector< str > > init_gauge_es_to_family_states()
maps directly from gauge_es string to familystates helps us reuse other routines that take string arg...