gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::SLHASimpleSpec< Derived > Class Template Reference

#include <SLHASimpleSpec.hpp>

Inheritance diagram for Gambit::SLHASimpleSpec< Derived >:
Collaboration diagram for Gambit::SLHASimpleSpec< Derived >:

Public Types

typedef SpecTraits< Derived >::Model Model
 
typedef SpecTraits< Derived >::Input Input
 
typedef MapTypes< Derived, MapTag::GetMTget
 
- Public Types inherited from Gambit::Spec< Derived >
typedef Derived D
 
typedef Spec< DSelf
 
typedef SpecTraits< D >::Contents Contents
 Note: Wrapper need to define a specialisation of SpecTraits, which typedefs Model and Input. More...
 
typedef SpecTraits< D >::Model Model
 
typedef SpecTraits< D >::Input Input
 
typedef MapTypes< D, MapTag::GetMTget
 
typedef MapTypes< D, MapTag::SetMTset
 
typedef std::map< Par::Tags, MapCollection< MTget > > GetterMaps
 Will need a map of map collections for both the getters and setters, containing the map collections for the permitted parameter types. More...
 
typedef std::map< Par::Tags, MapCollection< MTset > > SetterMaps
 

Public Member Functions

 SLHASimpleSpec ()
 
 SLHASimpleSpec (const SLHAea::Coll &input_slha)
 
virtual ~SLHASimpleSpec ()
 
Modelget_Model ()
 
Inputget_Input ()
 
const Modelget_Model () const
 
const Inputget_Input () const
 
void add_to_SLHAea (int, SLHAea::Coll &) const
 Add spectrum information to an SLHAea object. More...
 
virtual double GetScale () const
 (using bass class version of getSLHAea) More...
 
virtual void SetScale (double)
 Manually set the renormalisation scale of parameters somewhat dangerous to allow this but may be needed. More...
 
virtual void RunToScaleOverride (double)
 Run spectrum to new scale. More...
 
- Public Member Functions inherited from Gambit::Spec< Derived >
std::string getName () const
 Main public interface functions. More...
 
 Spec ()
 Constructor This uses the "Contents" class to verify (once, not every construction) that this wrapper provides all the basic functionality that it is supposed to. More...
 
virtual ~Spec ()
 Virtual destructor. More...
 
virtual std::unique_ptr< SubSpectrumclone () const
 CRTP-style polymorphic clone function Now derived classes will not need to re-implement the clone function. More...
 
bool has (const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool=SafeBool(true)) const
 Spec member function definitions. More...
 
double get (const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool=SafeBool(true)) const
 
void set (const Par::Tags, const double, const str &, const SafeBool=SafeBool(true))
 
bool has (const Par::Tags, const str &, const int, const SpecOverrideOptions=use_overrides, const SafeBool=SafeBool(true)) const
 One index. More...
 
double get (const Par::Tags, const str &, const int, const SpecOverrideOptions=use_overrides, const SafeBool=SafeBool(true)) const
 
void set (const Par::Tags, const double, const str &, const int, const SafeBool=SafeBool(true))
 
bool has (const Par::Tags, const str &, const int, const int, const SpecOverrideOptions=use_overrides) const
 Two indices. More...
 
double get (const Par::Tags, const str &, const int, const int, const SpecOverrideOptions=use_overrides) const
 
void set (const Par::Tags, const double, const str &, const int, const int)
 
Modelget_Model ()
 
const Modelget_Model () const
 
Inputget_Input ()
 
const Inputget_Input () const
 
Modelmodel ()
 Get model object on which to call function pointers. More...
 
const Modelmodel () const
 Return it as const if we are a const object. More...
 
Inputinput ()
 Get struct containing any extra data input on SubSpectrum object creation. More...
 
const Inputinput () const
 Return it as const if we are a const object. More...
 
- Public Member Functions inherited from Gambit::SubSpectrum
virtual const std::map< int, int > & PDG_translator () const
 TODO: extra PDB overloads to handle all the one and two index cases (well all the ones that are feasible...) More...
 
 SubSpectrum ()
 Constructors/destructors. More...
 
virtual ~SubSpectrum ()
 
virtual void writeSLHAfile (int, const str &) const
 Dump out spectrum information to an SLHA file (if possible) More...
 
virtual SLHAstruct getSLHAea (int) const
 Get spectrum information in SLHAea format (if possible) More...
 
virtual int get_numbers_stable_particles () const
 There may be more than one new stable particle this method will tell you how many. More...
 
virtual double hard_upper () const
 Limits to RGE running; warning/error raised if running beyond these is attempted. More...
 
virtual double soft_upper () const
 
virtual double soft_lower () const
 
virtual double hard_lower () const
 
void RunToScale (double scale, const int behave=0)
 Run spectrum to a new scale This function is a wrapper for RunToScaleOverride which automatically checks limits and raises warnings. More...
 
void set_override (const Par::Tags, const double, const str &, const bool allow_new=false, const bool decouple=false)
 Parameter override functions. More...
 
void set_override (const Par::Tags, const double, const str &, const int, const bool allow_new=false, const bool decouple=false)
 
void set_override (const Par::Tags, const double, const str &, const int, const int, const bool allow_new=false)
 
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. More...
 
void set_override_vector (const Par::Tags, const double, const std::vector< str > &, const std::vector< int >, const bool allow_new=false, const bool decouple=false)
 
void set_override_vector (const Par::Tags, const double, const std::vector< str > &, const int, const bool allow_new=false, const bool decouple=false)
 
void set_override_vector (const Par::Tags, const double, const str &, const std::vector< int >, const bool allow_new=false, const bool decouple=false)
 
double safeget (const Par::Tags, const str &, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 safeget functions, by Abram More...
 
double safeget (const Par::Tags, const str &, const int, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
double safeget (const Par::Tags, const str &, const int, const int, const SpecOverrideOptions=use_overrides) const
 
double safeget (const Par::Tags, const int, const int, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
double safeget (const Par::Tags, const std::pair< int, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
double safeget (const Par::Tags, const std::pair< str, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
void set_override (const Par::Tags, const double, const int, const int, const bool allow_new=false, const bool decouple=false)
 PDB overloads for setters. More...
 
void set_override (const Par::Tags, const double, const std::pair< int, int >, const bool allow_new=false, const bool decouple=false)
 
void set_override (const Par::Tags, const double, const std::pair< str, int >, const bool allow_new=false, const bool decouple=false)
 PDB overloads of set_override functions. More...
 
bool has (const Par::Tags, const int, const int, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 PDB getter/checker overloads. More...
 
double get (const Par::Tags, const int, const int, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
bool has (const Par::Tags, const std::pair< int, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
double get (const Par::Tags, const std::pair< int, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
bool has (const Par::Tags, const std::pair< str, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 
double get (const Par::Tags, const std::pair< str, int >, const SpecOverrideOptions=use_overrides, const SafeBool check_antiparticle=SafeBool(true)) const
 

Protected Attributes

Model slhawrap
 
Input dummyinput
 
- Protected Attributes inherited from Gambit::SubSpectrum
std::map< Par::Tags, OverrideMapsoverride_maps
 Map of override maps. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gambit::Spec< Derived >
static const std::map< Par::Tags, MapCollection< MTget > > fill_getter_maps ()
 
static const std::map< Par::Tags, MapCollection< MTset > > fill_setter_maps ()
 
static int index_offset ()
 Get integer offset convention used by internal model class (needed by getters which take indices) By default assume no offset. More...
 
- Public Attributes inherited from Gambit::Spec< Derived >
DummyModel dummymodel
 Default "null" versions of get_Model and get_Input, to be used if wrapper does not override them. More...
 
DummyInput dummyinput
 
- Static Public Attributes inherited from Gambit::Spec< Derived >
static const GetterMaps getter_maps
 Initialise maps (uses filler overrides from DerivedSpec if defined) More...
 
static const SetterMaps setter_maps
 

Detailed Description

template<class Derived>
class Gambit::SLHASimpleSpec< Derived >

Definition at line 64 of file SLHASimpleSpec.hpp.

Member Typedef Documentation

◆ Input

template<class Derived>
typedef SpecTraits<Derived>::Input Gambit::SLHASimpleSpec< Derived >::Input

Definition at line 72 of file SLHASimpleSpec.hpp.

◆ Model

template<class Derived>
typedef SpecTraits<Derived>::Model Gambit::SLHASimpleSpec< Derived >::Model

Definition at line 71 of file SLHASimpleSpec.hpp.

◆ MTget

template<class Derived>
typedef MapTypes<Derived,MapTag::Get> Gambit::SLHASimpleSpec< Derived >::MTget

Definition at line 82 of file SLHASimpleSpec.hpp.

Constructor & Destructor Documentation

◆ SLHASimpleSpec() [1/2]

template<class Derived>
Gambit::SLHASimpleSpec< Derived >::SLHASimpleSpec ( )
inline

Definition at line 85 of file SLHASimpleSpec.hpp.

86  : slhawrap()
87  {}

◆ SLHASimpleSpec() [2/2]

template<class Derived>
Gambit::SLHASimpleSpec< Derived >::SLHASimpleSpec ( const SLHAea::Coll &  input_slha)
inline

Definition at line 89 of file SLHASimpleSpec.hpp.

90  : slhawrap(input_slha)
91  {}

◆ ~SLHASimpleSpec()

template<class Derived>
virtual Gambit::SLHASimpleSpec< Derived >::~SLHASimpleSpec ( )
inlinevirtual

Definition at line 93 of file SLHASimpleSpec.hpp.

93 {};

Member Function Documentation

◆ add_to_SLHAea()

template<class Derived >
void Gambit::SLHASimpleSpec< Derived >::add_to_SLHAea ( int  ,
SLHAea::Coll &  slha 
) const
virtual

Add spectrum information to an SLHAea object.

Member functions for SLHASimpleSpec class.

Add spectrum information to an SLHAea object

Reimplemented from Gambit::SubSpectrum.

Definition at line 157 of file SLHASimpleSpec.hpp.

158  {
159  // Get the internal SLHAea data object
160  const SLHAea::Coll& data = get_Model().get_slhaea();
161 
162  // NO version check. Cannot assume that this is required or makes sense for whatever
163  // model this might be. If it does matter, then the wrapper for that model should
164  // replace this function and do the check itself.
165  //int wrapped_slha_version = get_Model().slha_version();
166  //if (slha_version != wrapped_slha_version)
167  //{
168  // std::stringstream x;
169  // x << "Wrapped SLHA file is in SLHA" << wrapped_slha_version << ", but something requested to add it to an SLHAea object in SLHA" << slha_version << " format.";
170  // model_error().raise(LOCAL_INFO, x.str());
171  //}
172 
173  // Make a copy of the internal SLHAea object, remove any SM info from it and add the rest to the slhaea object.
174  // (we will assume that if SM is wanted then it is provided by the SMSimpleSpec wrapper, or similar)
175  SLHAea::Coll data_copy = data;
176  SLHAea::Coll::key_matches target_blocks[4] = { SLHAea::Coll::key_matches("SMINPUTS"), SLHAea::Coll::key_matches("VCKMIN"), SLHAea::Coll::key_matches("UPMNSIN"), SLHAea::Coll::key_matches("MASS") };
177  for (SLHAea::Coll::iterator sblock = slha.begin(); sblock != slha.end(); ++sblock)
178  {
179  for (SLHAea::Coll::iterator dblock = data_copy.begin(); dblock != data_copy.end();)
180  {
181  bool delete_dblock = false;
182  for (int i = 0; i < 3; i++)
183  {
184  if (target_blocks[i](*sblock) and target_blocks[i](*dblock)) delete_dblock = true;
185  }
186  if (delete_dblock) dblock = data_copy.erase(dblock);
187  else ++dblock;
188  }
189  }
190  for (SLHAea::Coll::iterator sblock = slha.begin(); sblock != slha.end();)
191  {
192  if (target_blocks[3](*sblock))
193  {
194  if(slha["MASS"][24].is_data_line()) data_copy["MASS"][24] = slha["MASS"][24];
195  sblock = slha.erase(sblock);
196  }
197  else
198  {
199  ++sblock;
200  }
201  }
202  slha.insert(slha.end(), data_copy.cbegin(), data_copy.cend());
203  }
greatScanData data
Definition: great.cpp:38

◆ get_Input() [1/2]

template<class Derived>
Input& Gambit::SLHASimpleSpec< Derived >::get_Input ( )
inline

Definition at line 99 of file SLHASimpleSpec.hpp.

99 { return dummyinput; /*unused, but needs to be defined for the interface*/ }

◆ get_Input() [2/2]

template<class Derived>
const Input& Gambit::SLHASimpleSpec< Derived >::get_Input ( ) const
inline

Definition at line 101 of file SLHASimpleSpec.hpp.

101 { return dummyinput; /*unused, but needs to be defined for the interface*/ }

◆ get_Model() [1/2]

template<class Derived>
Model& Gambit::SLHASimpleSpec< Derived >::get_Model ( )
inline

Definition at line 98 of file SLHASimpleSpec.hpp.

98 { return slhawrap; }

◆ get_Model() [2/2]

template<class Derived>
const Model& Gambit::SLHASimpleSpec< Derived >::get_Model ( ) const
inline

Definition at line 100 of file SLHASimpleSpec.hpp.

100 { return slhawrap; }

◆ GetScale()

template<class Derived>
virtual double Gambit::SLHASimpleSpec< Derived >::GetScale ( ) const
inlinevirtual

(using bass class version of getSLHAea)

RunningPars interface overrides

TODO: Currently assumes all blocks at same scale. Should at least check if this is true in constructor.

Reimplemented from Gambit::SubSpectrum.

Reimplemented in Gambit::SMSimpleSpec.

Definition at line 109 of file SLHASimpleSpec.hpp.

110  {
113  const SLHAea::Coll& data(slhawrap.get_slhaea());
114  double scale = 0.0;
115  try
116  {
117  scale = SLHAea::to<double>(data.at("GAUGE").find_block_def()->at(3));
118  }
119  catch (const std::out_of_range& e)
120  {
121  std::ostringstream errmsg;
122  errmsg << "Could not find block \"GAUGE\" in SLHAea object. Received out_of_range error with message: " << e.what();
123  utils_error().raise(LOCAL_INFO,errmsg.str());
124  }
125  return scale;
126  }
greatScanData data
Definition: great.cpp:38
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34

◆ RunToScaleOverride()

template<class Derived>
virtual void Gambit::SLHASimpleSpec< Derived >::RunToScaleOverride ( double  )
inlinevirtual

Run spectrum to new scale.

Functions to be overridden in classes derived from Spec<Derived> (i.e. the final wrappers)

Reimplemented from Gambit::SubSpectrum.

Definition at line 136 of file SLHASimpleSpec.hpp.

137  {
138  utils_error().raise(LOCAL_INFO,
139  "Call made to RunToScale function of SLHASimpleSpec! This is not allowed; this\n"
140  "version of the SubSpectrum wrapper cannot perform RGE It is just a\n"
141  "simple box containing SLHA information read from a file or SLHAea object.\n");
142  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34

◆ SetScale()

template<class Derived>
virtual void Gambit::SLHASimpleSpec< Derived >::SetScale ( double  )
inlinevirtual

Manually set the renormalisation scale of parameters somewhat dangerous to allow this but may be needed.

Reimplemented from Gambit::SubSpectrum.

Definition at line 128 of file SLHASimpleSpec.hpp.

129  {
130  // this is actually a bit of a drag since one should go through all the blocks
131  // that have Q defined and set them accordingly. Leave for now.
132  utils_error().raise(LOCAL_INFO,
133  "Call made to SetScale function of SLHASimpleSpec! This is currently not implemented!");
134  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34

Member Data Documentation

◆ dummyinput

template<class Derived>
Input Gambit::SLHASimpleSpec< Derived >::dummyinput
protected

Definition at line 79 of file SLHASimpleSpec.hpp.

◆ slhawrap

template<class Derived>
Model Gambit::SLHASimpleSpec< Derived >::slhawrap
protected

Definition at line 76 of file SLHASimpleSpec.hpp.


The documentation for this class was generated from the following file: