gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-252-gf9a3f78
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 63 of file SLHASimpleSpec.hpp.

Member Typedef Documentation

◆ Input

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

Definition at line 71 of file SLHASimpleSpec.hpp.

◆ Model

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

Definition at line 70 of file SLHASimpleSpec.hpp.

◆ MTget

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

Definition at line 81 of file SLHASimpleSpec.hpp.

Constructor & Destructor Documentation

◆ SLHASimpleSpec() [1/2]

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

Definition at line 84 of file SLHASimpleSpec.hpp.

85  : slhawrap()
86  {}

◆ SLHASimpleSpec() [2/2]

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

Definition at line 88 of file SLHASimpleSpec.hpp.

89  : slhawrap(input_slha)
90  {}

◆ ~SLHASimpleSpec()

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

Definition at line 92 of file SLHASimpleSpec.hpp.

92 {};

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 156 of file SLHASimpleSpec.hpp.

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

◆ get_Input() [1/2]

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

Definition at line 98 of file SLHASimpleSpec.hpp.

98 { 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 100 of file SLHASimpleSpec.hpp.

100 { 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 97 of file SLHASimpleSpec.hpp.

97 { return slhawrap; }

◆ get_Model() [2/2]

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

Definition at line 99 of file SLHASimpleSpec.hpp.

99 { 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 108 of file SLHASimpleSpec.hpp.

109  {
112  const SLHAea::Coll& data(slhawrap.get_slhaea());
113  double scale = 0.0;
114  try
115  {
116  scale = SLHAea::to<double>(data.at("GAUGE").find_block_def()->at(3));
117  }
118  catch (const std::out_of_range& e)
119  {
120  std::ostringstream errmsg;
121  errmsg << "Could not find block \"GAUGE\" in SLHAea object. Received out_of_range error with message: " << e.what();
122  utils_error().raise(LOCAL_INFO,errmsg.str());
123  }
124  return scale;
125  }
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 135 of file SLHASimpleSpec.hpp.

136  {
137  utils_error().raise(LOCAL_INFO,
138  "Call made to RunToScale function of SLHASimpleSpec! This is not allowed; this\n"
139  "version of the SubSpectrum wrapper cannot perform RGE It is just a\n"
140  "simple box containing SLHA information read from a file or SLHAea object.\n");
141  }
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 127 of file SLHASimpleSpec.hpp.

128  {
129  // this is actually a bit of a drag since one should go through all the blocks
130  // that have Q defined and set them accordingly. Leave for now.
131  utils_error().raise(LOCAL_INFO,
132  "Call made to SetScale function of SLHASimpleSpec! This is currently not implemented!");
133  }
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 78 of file SLHASimpleSpec.hpp.

◆ slhawrap

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

Definition at line 75 of file SLHASimpleSpec.hpp.


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