gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
subspectrum.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
25 
26 #include <fstream>
27 #include <string>
28 
32 
33 //#define CHECK_WHERE_FOUND
34 
35 namespace Gambit
36 {
38 
40  void SubSpectrum::writeSLHAfile(int slha_version, const str& filename) const
41  {
42  std::ofstream ofs(filename);
43  if (ofs)
44  {
45  ofs << getSLHAea(slha_version);
46  }
47  else
48  {
49  utils_error().raise(LOCAL_INFO,"Could not open file '"+filename+
50  "' for writing. Please check that the path exists!");
51  }
52  ofs.close();
53  }
54 
56  SLHAstruct SubSpectrum::getSLHAea(int slha_version) const
57  {
58  SLHAstruct slha;
59  this->add_to_SLHAea(slha_version, slha);
60  slhahelp::add_MODSEL_disclaimer(slha, "spectrum");
61  return slha;
62  }
63 
65  std::map<Par::Tags,OverrideMaps> SubSpectrum::create_override_maps()
66  {
67  std::map<Par::Tags,OverrideMaps> tmp;
68  std::vector<Par::Tags> all = Par::get_all();
69  for(std::vector<Par::Tags>::iterator it = all.begin(); it!=all.end(); ++it)
70  {
71  tmp[*it];
72  }
73  return tmp;
74  }
75 
77 
78  /* Input PDG code plus context integer as separate arguments */
79  bool SubSpectrum::has(const Par::Tags partype,
80  const int pdg_code, const int context,
81  SpecOverrideOptions check_overrides,
82  SafeBool check_antiparticle) const
83  {
84  return has( partype, std::make_pair(pdg_code,context), check_overrides, check_antiparticle );
85  }
86 
87  /* Input PDG code plus context integer as separate arguments */
88  double SubSpectrum::get(const Par::Tags partype,
89  const int pdg_code, const int context,
90  SpecOverrideOptions check_overrides,
91  SafeBool check_antiparticle) const
92  {
93  return get( partype, std::make_pair(pdg_code,context), check_overrides, check_antiparticle );
94  }
95 
96  /* Input PDG code plus context integer as pair */
97  bool SubSpectrum::has(const Par::Tags partype,
98  const std::pair<int,int> pdgpr,
99  SpecOverrideOptions check_overrides,
100  SafeBool check_antiparticle) const
101  {
102  return has( partype, Models::ParticleDB().long_name(pdgpr), check_overrides, check_antiparticle );
103  }
104 
105  /* Input PDG code plus context integer as pair */
106  double SubSpectrum::get(const Par::Tags partype,
107  const std::pair<int,int> pdgpr,
108  SpecOverrideOptions check_overrides,
109  SafeBool check_antiparticle) const
110  {
111  return get( partype, Models::ParticleDB().long_name(pdgpr), check_overrides, check_antiparticle );
112  }
113 
114  /* Input short name plus index as pair */
115  bool SubSpectrum::has(const Par::Tags partype,
116  const std::pair<str,int> shortpr,
117  SpecOverrideOptions check_overrides,
118  SafeBool check_antiparticle) const
119  {
120  return has( partype, shortpr.first, shortpr.second, check_overrides, check_antiparticle);
121  }
122 
123  /* Input short name plus index as pair */
124  double SubSpectrum::get(const Par::Tags partype,
125  const std::pair<str,int> shortpr,
126  SpecOverrideOptions check_overrides,
127  SafeBool check_antiparticle) const
128  {
129  return get( partype, shortpr.first, shortpr.second, check_overrides, check_antiparticle);
130  }
131 
133 
135 
136  double SubSpectrum::safeget(const Par::Tags partype,
137  const str& mass,
138  const SpecOverrideOptions check_overrides,
139  const SafeBool check_antiparticle) const
140  {
141  double result = get( partype, mass, check_overrides, check_antiparticle);
142  if (Utils::isnan(result))
143  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
144  return result;
145  }
146 
147  double SubSpectrum::safeget(const Par::Tags partype,
148  const str& mass, const int i,
149  const SpecOverrideOptions check_overrides,
150  const SafeBool check_antiparticle) const
151  {
152  double result = get( partype, mass, i, check_overrides, check_antiparticle);
153  if (Utils::isnan(result))
154  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
155  return result;
156  }
157 
158  double SubSpectrum::safeget(const Par::Tags partype,
159  const str& mass, const int i, const int j,
160  const SpecOverrideOptions check_overrides) const
161  {
162  double result = get( partype, mass, i, j, check_overrides);
163  if (Utils::isnan(result))
164  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
165  return result;
166  }
167 
168  double SubSpectrum::safeget(const Par::Tags partype,
169  const int pdg_code, const int context,
170  const SpecOverrideOptions check_overrides,
171  const SafeBool check_antiparticle) const
172  {
173  double result = get( partype, pdg_code, context, check_overrides, check_antiparticle);
174  if (Utils::isnan(result))
175  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
176  return result;
177  }
178 
179  double SubSpectrum::safeget(const Par::Tags partype,
180  const std::pair<int,int> pdgpr,
181  const SpecOverrideOptions check_overrides,
182  const SafeBool check_antiparticle) const
183  {
184  double result = get( partype, pdgpr, check_overrides, check_antiparticle);
185  if (Utils::isnan(result))
186  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
187  return result;
188  }
189 
190  double SubSpectrum::safeget(const Par::Tags partype,
191  const std::pair<str,int> shortpr,
192  const SpecOverrideOptions check_overrides,
193  const SafeBool check_antiparticle) const
194  {
195  double result = get( partype, shortpr, check_overrides, check_antiparticle);
196  if (Utils::isnan(result))
197  utils_error().raise(LOCAL_INFO,"SubSpectrum parameter is nan!!");
198  return result;
199  }
200 
202 
204 
206  const double value, const str& name, const bool allow_new, const bool decouple)
207  {
208  bool done = false;
209  // No index input; check if direct string exists in map
210  // If not, try to use particle database to convert to short
211  // name plus index and try that.
212  // Otherwise:
213  // If decouple=true
214  // If allow_new=false: Doesn't make sense; error
215  // If allow_new=true: add new entry
216  // If decouple=false
217  // check if antiparticle exists in map (both short and long strings)
218  // if yes: add override under antiparticle name
219  // if no:
220  // if allow_new=false: no match anywhere, and not allowed to add new, error!
221  // if allow_new=true: add new entry under original name
222 
223  // SafeBool(false) set so we don't match on antiparticle; if anti-particle entry exists, need to convert to and set that override instead.
224  #ifdef CHECK_WHERE_FOUND
225  std::cout << "set_override "<<name<<" called (allow_new="<<allow_new<<", decouple="<<decouple<<"): checking zero index maps" << std::endl;
226  #endif
227  if( has(partype,name,use_overrides,SafeBool(false)) )
228  {
229  override_maps.at(partype).m0[name] = value;
230  done = true;
231  #ifdef CHECK_WHERE_FOUND
232  std::cout << "Found in zero index override map; override added" << std::endl;
233  #endif
234  }
235  // Check short name
236  else if( Models::ParticleDB().has_short_name(name) )
237  {
238  #ifdef CHECK_WHERE_FOUND
239  std::cout << "Checking for short name" << std::endl;
240  #endif
241  std::pair<str, int> p = Models::ParticleDB().short_name_pair(name);
242  if( has(partype,p.first,p.second,SafeBool(false)) )
243  {
244  override_maps.at(partype).m1[p.first][p.second] = value;
245  done = true;
246  #ifdef CHECK_WHERE_FOUND
247  std::cout << "Found in one index override map with short name '"<<p.first<<","<<p.second<<"'; override added"<< std::endl;
248  #endif
249  }
250  }
251 
252  // Deal with possible antiparticle match and decoupling
253  if(not done)
254  {
255  if(decouple)
256  {
257  if(allow_new)
258  {
259  override_maps.at(partype).m0[name] = value;
260  done = true;
261  #ifdef CHECK_WHERE_FOUND
262  std::cout << "Decoupling allowed: added value to one index override map"<< std::endl;
263  #endif
264  }
265  else
266  {
267  std::ostringstream errmsg;
268  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
269  errmsg << "Options 'decouple=true' and 'allow_new=false' set simultaneously, but this doesn't make sense. If you might be decoupling particle/antiparticle values for the first time then you *must* also set 'allow_new'." << std::endl;
270  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
271  }
272  }
273  else // no decouple
274  {
275  #ifdef CHECK_WHERE_FOUND
276  std::cout << "Checking for entries under antiparticle name"<< std::endl;
277  std::cout << "has_particle = "<<Models::ParticleDB().has_particle(name)<<std::endl;
278  if(Models::ParticleDB().has_particle(name)) {
279  std::cout << "has_antiparticle = "<<Models::ParticleDB().has_antiparticle(name)<<std::endl;
280  }
281  #endif
282 
283  // Try antiparticle
284  if(Models::ParticleDB().has_particle(name) and
285  Models::ParticleDB().has_antiparticle(name))
286  {
287  std::string antiname = Models::ParticleDB().get_antiparticle(name);
288  // Repeat the logic above
289  #ifdef CHECK_WHERE_FOUND
290  std::cout << "Checking for antiparticle entry '"<<antiname<<"' in zero index override map"<< std::endl;
291  #endif
292  if( has(partype,antiname,use_overrides,SafeBool(false)) )
293  {
294  override_maps.at(partype).m0[antiname] = value;
295  done = true;
296  #ifdef CHECK_WHERE_FOUND
297  std::cout << "Found entry under antiparticle name '"<<antiname<<"' in zero index override map. Override added."<< std::endl;
298  #endif
299  }
300  else if( Models::ParticleDB().has_short_name(antiname) )
301  {
302  #ifdef CHECK_WHERE_FOUND
303  std::cout << "Checking for entry under short antiparticle name + index in one index override map."<< std::endl;
304  #endif
305  std::pair<str, int> p = Models::ParticleDB().short_name_pair(antiname);
306  if( has(partype,p.first,p.second,use_overrides,SafeBool(false)) )
307  {
308  override_maps.at(partype).m1[p.first][p.second] = value;
309  done = true;
310  #ifdef CHECK_WHERE_FOUND
311  std::cout << "Found entry under short antiparticle name + index in one index override map. Override added."<< std::endl;
312  #endif
313  }
314  }
315  // No maching antiparticle entry; check if we are allowed to add new values
316  else if(allow_new)
317  {
318  override_maps.at(partype).m0[name] = value;
319  done = true;
320  #ifdef CHECK_WHERE_FOUND
321  std::cout << "No antiparticle match found, but 'allow_new'="<<allow_new<<", so adding entry to zero index override map." << std::endl;
322  #endif
323  }
324  }
325  else // No antiparticle conversion possible
326  {
327  if(allow_new)
328  {
329  override_maps.at(partype).m0[name] = value;
330  done = true;
331  #ifdef CHECK_WHERE_FOUND
332  std::cout << "Antiparticle doesn't exist, but 'allow_new'="<<allow_new<<", so adding entry to zero index override map." << std::endl;
333  #endif
334  }
335  else
336  {
337  std::ostringstream errmsg;
338  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
339  errmsg << "No "<<Par::toString.at(partype)<<" with string reference '"<<name<<"' exists in the wrapped spectrum" <<std::endl;
340  errmsg << "If you intended to add this value to the spectrum without overriding anything, please call this function with the optional 'allow_new' boolean parameter set to 'true'. It can then be later retrieved using the normal getters with the same name used here." << std::endl;
341  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
342  }
343  }
344  }
345  }
346 
347  // If none of that worked, throw an error.
348  if(not done)
349  {
350  std::ostringstream errmsg;
351  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
352  errmsg << "No "<<Par::toString.at(partype)<<" with string reference '"<<name<<"' exists in the wrapped spectrum!" <<std::endl;
353  errmsg << "If you intended to add this value to the spectrum without overriding anything, please call this function with the optional 'allow_new' boolean parameter set to 'true'. It can then be later retrieved using the normal getters with the same name used here." << std::endl;
354  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
355  }
356  }
357 
359  const double value, const str& name, const int i, const bool allow_new, const bool decouple)
360  {
361  bool done = false;
362  // One index input; check if direct string plus index exists in map
363  // If not, try to use particle database to convert to long name
364  // and try that.
365  // Otherwise:
366  // If decouple=true
367  // If allow_new=false: Doesn't make sense; error
368  // If allow_new=true: add new entry
369  // If decouple=false
370  // check if antiparticle exists in map (both short and long strings)
371  // if yes: add override under antiparticle name
372  // if no:
373  // if allow_new=false: no match anywhere, and not allowed to add new, error!
374  // if allow_new=true: add new entry under original name
375 
376 
377  if( has(partype,name,i,use_overrides,SafeBool(false)) ) // Don't match anti-particle; will check that if other matching fails
378  {
379  override_maps.at(partype).m1[name][i] = value;
380  done = true;
381  }
382  else if( Models::ParticleDB().has_particle(std::make_pair(name, i)) )
383  {
384  str longname = Models::ParticleDB().long_name(name,i);
385  if( has(partype,longname,use_overrides,SafeBool(false)) )
386  {
387  override_maps.at(partype).m0[longname] = value;
388  done = true;
389  }
390  }
391 
392  // Deal with possible antiparticle match and decoupling
393  if(not done)
394  {
395  if(decouple)
396  {
397  if(allow_new)
398  {
399  override_maps.at(partype).m1[name][i] = value;
400  done = true;
401  }
402  else
403  {
404  std::ostringstream errmsg;
405  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
406  errmsg << "Options 'decouple=true' and 'allow_new=false' set simultaneously, but this doesn't make sense. If you might be decoupling particle/antiparticle values for the first time then you *must* also set 'allow_new'." << std::endl;
407  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
408  }
409  }
410  else // no decouple
411  {
412  // Try antiparticle
413  if(Models::ParticleDB().has_particle(name) and
415  {
416  std::string antiname = Models::ParticleDB().get_antiparticle(name);
417  // Repeat the logic above
418  if( has(partype,antiname,i,use_overrides,SafeBool(false)) ) // Don't match anti-particle; will check that if other matching fails
419  {
420  override_maps.at(partype).m1[antiname][i] = value;
421  done = true;
422  }
423  else if( Models::ParticleDB().has_particle(std::make_pair(antiname, i)) )
424  {
425  str longname = Models::ParticleDB().long_name(antiname,i);
426  if( has(partype,longname,use_overrides,SafeBool(false)) )
427  {
428  override_maps.at(partype).m0[longname] = value;
429  done = true;
430  }
431  }
432  // No matching antiparticle; see if we are allowed to just add the value
433  else if(allow_new)
434  {
435  override_maps.at(partype).m1[name][i] = value;
436  done = true;
437  }
438  }
439  else // No antiparticle conversion possible
440  {
441  if(allow_new)
442  {
443  override_maps.at(partype).m1[name][i] = value;
444  done = true;
445  }
446  else
447  {
448  std::ostringstream errmsg;
449  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
450  errmsg << "No "<<Par::toString.at(partype)<<" with string reference '"<<name<<"' exists in the wrapped spectrum" <<std::endl;
451  errmsg << "If you intended to add this value to the spectrum without overriding anything, please call this function with the optional 'allow_new' boolean parameter set to 'true'. It can then be later retrieved using the normal getters with the same name used here." << std::endl;
452  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
453  }
454  }
455  }
456  }
457 
458  // If none of that worked, throw an error.
459  if(not done)
460  {
461  std::ostringstream errmsg;
462  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
463  errmsg << "No "<<Par::toString.at(partype)<<" with string reference '"<<name<<"' exists in the wrapped spectrum!" <<std::endl;
464  errmsg << "If you intended to add this value to the spectrum without overriding anything, please call this function with the optional 'allow_new' boolean parameter set to 'true'. It can then be later retrieved using the normal getters with the same name used here." << std::endl;
465  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
466  }
467 
468  }
469 
471  const double value, const str& name, const int i, const int j, const bool allow_new)
472  {
473  if(not allow_new and not has(partype,name,i,j) )
474  {
475  std::ostringstream errmsg;
476  errmsg << "Error setting override value in SubSpectrum object!" << std::endl;
477  errmsg << "No "<<Par::toString.at(partype)<<" with string reference '"<<name<<"' and indices '"<<i<<","<<j<<"' exists in the wrapped spectrum!" <<std::endl;
478  errmsg << "If you intended to add this value to the spectrum without overriding anything, please call this function with the optional 'allow_new' boolean parameter set to 'false'. It can then be later retrieved using the normal getters with the same name used here." << std::endl;
479  utils_error().forced_throw(LOCAL_INFO,errmsg.str());
480  }
481  override_maps.at(partype).m2[name][i][j] = value;
482  }
483 
485 
486  /* Input short name plus index pair */
487  void SubSpectrum::set_override(const Par::Tags partype, const double value, const std::pair<str,int> shortpr, const bool allow_new, const bool decouple)
488  {
489  set_override(partype, value, shortpr.first, shortpr.second, allow_new, decouple);
490  }
491 
492  /* Input PDG code plus context integer */
493  void SubSpectrum::set_override(const Par::Tags partype, const double value, const int PDGcode, const int context, const bool allow_new, const bool decouple)
494  {
495  set_override(partype, value, std::make_pair(PDGcode,context), allow_new, decouple);
496  }
497 
498  void SubSpectrum::set_override(const Par::Tags partype, const double value, const std::pair<int,int> pdgpr, const bool allow_new, const bool decouple)
499  {
500  /* If there is a short name, then retrieve that plus the index */
501  if( Models::ParticleDB().has_short_name(pdgpr) )
502  {
503  return set_override(partype, value, Models::ParticleDB().short_name_pair(pdgpr), allow_new, decouple);
504  }
505  else /* Use the long name with no index instead (will throw error if name not in PDB) */
506  {
507  return set_override(partype, value, Models::ParticleDB().long_name(pdgpr), allow_new, decouple);
508  }
509  }
510 
512 
513  /* Helpers for override functions which take parameter names and indices as vectors, and
514  loop over them, to make it easy to set many parameters to the same value.
515  No two-index versions at the moment, but could be added if needed. */
516  void SubSpectrum::set_override_vector(const Par::Tags tag, const double value, const std::vector<str>& params, const bool allow_new, const bool decouple)
517  {
518  for(std::vector<str>::const_iterator it = params.begin();
519  it != params.end(); ++it)
520  {
521  this->set_override(tag, value, *it, allow_new, decouple);
522  }
523  }
524 
525  void SubSpectrum::set_override_vector(const Par::Tags tag, const double value, const std::vector<str>& params, const std::vector<int> indices, const bool allow_new, const bool decouple)
526  {
527  for(std::vector<str>::const_iterator it = params.begin(); it != params.end(); ++it)
528  {
529  for(std::vector<int>::const_iterator i = indices.begin(); i != indices.end() ; ++i)
530  {
531  this->set_override(tag, value, *it, *i, allow_new, decouple);
532  }
533  }
534  }
535 
536  void SubSpectrum::set_override_vector(const Par::Tags tag, const double value, const std::vector<str>& params, const int i, const bool allow_new, const bool decouple)
537  {
538  std::vector<int> indices;
539  indices.push_back(i);
540  this->set_override_vector(tag,value,params,indices,allow_new,decouple);
541  }
542 
543  void SubSpectrum::set_override_vector(const Par::Tags tag, const double value, const str& par, const std::vector<int> indices, const bool allow_new, const bool decouple)
544  {
545  std::vector<str> params;
546  params.push_back(par);
547  this->set_override_vector(tag,value,params,indices,allow_new,decouple);
548  }
549 
550  void SubSpectrum::RunToScale(double scale, const int behave)
551  {
552  if(behave==0 or behave==1)
553  {
554  if(scale < hard_lower() or scale > hard_upper()) {
555  if(behave==1) {
556  std::ostringstream msg;
557  msg << "RGE running requested outside hard limits! This is forbidden with behave=1. Set behave=0 (default) to automatically stop running at soft limits, or behave=2 to force running to requested scale (may trigger errors from underlying RGE code!)." << std::endl;
558  msg << " Requested : "<< scale << std::endl;
559  msg << " hard_upper: "<< hard_upper() << std::endl;
560  msg << " hard_lower: "<< hard_lower() << std::endl;
561  utils_error().raise(LOCAL_INFO, msg.str());
562  } else { // behave==0
563  if (scale < soft_lower()) { scale=soft_lower(); }
564  else if(scale > soft_upper()) { scale=soft_upper(); }
565  else {
566  // Hard limits must be outside soft limits; this is a bug in the derived Spectum object
567  std::ostringstream msg;
568  msg << "RGE running requested outside hard limits, but within soft limits! The soft limits should always be within the hard limits, so this is a bug in the derived SubSpectrum object being accessed. I cannot tell you which class this is though; check the dependency graph to see which ones are being created, and if necessary consult your debugger." << std::endl;
569  msg << " Requested : "<< scale << std::endl;
570  msg << " hard_upper: "<< hard_upper() << std::endl;
571  msg << " soft_upper: "<< soft_upper() << std::endl;
572  msg << " soft_lower: "<< soft_lower() << std::endl;
573  msg << " hard_lower: "<< hard_lower() << std::endl;
574  utils_error().raise(LOCAL_INFO, msg.str());
575  }
576  }
577  } else if(scale < soft_lower() or scale > soft_upper()) {
578  if(behave==1) {
579  std::ostringstream msg;
580  msg << "RGE running requested outside soft limits! Accuracy may be low. Note: Set behave=2 to suppress this warning, or behave=0 (default) to automatically stop running when soft limit is hit." << std::endl;
581  msg << " Requested : "<< scale << std::endl;
582  msg << " soft_upper: "<< soft_upper() << std::endl;
583  msg << " soft_lower: "<< soft_lower() << std::endl;
584  utils_warning().raise(LOCAL_INFO, msg.str());
585  } else { // behave==0
586  if(scale < soft_lower()) scale=soft_lower();
587  if(scale > soft_upper()) scale=soft_upper();
588  }
589  }
590  }
591  RunToScaleOverride(scale);
592  }
593 
594 
596 
597 
599 
601 
602 
603 
604 
605 }
606 
607 
608 
Mini helper class to specify behaviour of getters w.r.t. overrides in a type-safe way...
void RunToScale(double scale, const int behave=0)
Run spectrum to a new scale This function is a wrapper for RunToScaleOverride which automatically che...
virtual double soft_upper() const
std::pair< str, int > short_name_pair(str) const
Retrieve the short name and index, from the long name.
Definition: partmap.cpp:155
virtual void add_to_SLHAea(int, SLHAstruct &) const
Add spectrum information to an SLHAea object (if possible)
EXPORT_SYMBOLS error & utils_error()
Utility errors.
void add_MODSEL_disclaimer(SLHAstruct &slha, const str &object)
Add a disclaimer about the absence of a MODSEL block in a generated SLHAea object.
#define LOCAL_INFO
Definition: local_info.hpp:34
str long_name(str, int) const
Retrieve the long name, from the short name and index.
Definition: partmap.cpp:124
std::vector< Tags > get_all()
virtual void RunToScaleOverride(double)
Run spectrum to new scale.
virtual void writeSLHAfile(int, const str &) const
Dump out spectrum information to an SLHA file (if possible)
Definition: subspectrum.cpp:40
Routines to help translate between SLHA2 sfermions and SLHA1 (or similar) sfermions.
virtual SLHAstruct getSLHAea(int) const
Get spectrum information in SLHAea format (if possible)
Definition: subspectrum.cpp:56
void set_override_vector(const Par::Tags, const double, const std::vector< str > &, const bool allow_new=false, const bool decouple=false)
Vector override functions.
SubSpectrum helper class for seaching through the function pointer maps and calling the requested fun...
bool has_antiparticle(str) const
Check if a particle has a matching anti-particle in the database, using the long name.
Definition: partmap.cpp:277
str get_antiparticle(str) const
Get the matching anti-particle long name for a particle in the database, using the long name...
Definition: partmap.cpp:239
SLHAea::Coll SLHAstruct
Less confusing name for SLHAea container class.
bool has_particle(str) const
Check if a particle is in the database, using the long name.
Definition: partmap.cpp:205
virtual double get(const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const =0
EXPORT_SYMBOLS warning & utils_warning()
Utility warnings.
double safeget(const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
safeget functions, by Abram
partmap & ParticleDB()
Database accessor function.
Definition: partmap.cpp:36
virtual double hard_lower() const
virtual double soft_lower() const
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
Abstract class for accessing general spectrum information.
void set_override(const Par::Tags, const double, const str &, const bool allow_new=false, const bool decouple=false)
Parameter override functions.
std::map< Par::Tags, OverrideMaps > override_maps
Map of override maps.
virtual double hard_upper() const
Limits to RGE running; warning/error raised if running beyond these is attempted. ...
TODO: see if we can use this one:
Definition: Analysis.hpp:33
virtual bool has(const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const =0
Getters/Setters etc.
static std::map< Par::Tags, OverrideMaps > create_override_maps()
Initialiser function for override_maps.
Definition: subspectrum.cpp:65