gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.4.0
a Global And Modular Bsm Inference Tool
Gambit Namespace Reference

TODO: see if we can use this one: More...

Namespaces

 ColliderBit
 
 DarkBit
 
 DecayBit
 
 Diver_1_0_0
 
 Diver_1_0_2
 
 Diver_1_0_4
 
 DRes
 
 FlavBit
 
 FunctorHelp
 Definitions of friend functions from above.
 
 GMPI
 Forward declare MPI class.
 
 GreAT
 
 IniParser
 
 Logging
 Forward declare minimial logging components needed to use logger.
 
 LogTags
 
 Models
 Forward declaration of Models::ModelFunctorClaw class for use in constructors.
 
 MultiNest
 
 Par
 List of parameter types used to classify spectrum contents.
 
 PolyChord
 
 PostProcessor
 
 PrecisionBit
 
 Printers
 Forward declaration of Printers::BasePrinter class for use in print functions.
 
 Priors
 
 Scanner
 
 slhahelp
 
 SpecBit
 
 SpectrumContents
 
 Stats
 
 Utils
 

Classes

struct  __is_container__
 
struct  __is_container__< std::array< T, N > >
 
struct  __is_container__< std::deque< T > >
 
struct  __is_container__< std::forward_list< T > >
 
struct  __is_container__< std::list< T > >
 
struct  __is_container__< std::map< T1, T2 > >
 
struct  __is_container__< std::multimap< T1, T2 > >
 
struct  __is_container__< std::multiset< T > >
 
struct  __is_container__< std::set< T > >
 
struct  __is_container__< std::unordered_map< T1, T2 > >
 
struct  __is_container__< std::unordered_multimap< T1, T2 > >
 
struct  __is_container__< std::unordered_multiset< T > >
 
struct  __is_container__< std::unordered_set< T > >
 
struct  __is_container__< std::vector< T > >
 
struct  __is_pair__
 
struct  __is_pair__< std::pair< T1, T2 > >
 
struct  __is_vector__
 
struct  __is_vector__< std::vector< T > >
 
struct  addVariadicPt_internal
 
struct  addVariadicPt_internal< 0, 1, 1, ret >
 
struct  addVariadicPt_internal< low, low, N, ret >
 
struct  addVariadicPt_struct
 
struct  addVariadicPt_struct< n, n, N, ret >
 
struct  addVariadicPt_struct< N, n, N, ret >
 
struct  always_false
 Helper for the static_assert below. More...
 
class  ASCIItableReader
 
class  backend_functor
 Actual backend functor type. More...
 
class  backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... >
 Template specialisation for non-variadic, non-void backend functions. More...
 
class  backend_functor< typename variadic_ptr< TYPE, ARGS... >::type, TYPE, ARGS... >
 Template specialisation for variadic, non-void backend functions. More...
 
class  backend_functor< typename variadic_ptr< void, ARGS... >::type, void, ARGS... >
 Template specialisation for variadic void backend functions. More...
 
class  backend_functor< void(*)(ARGS...), void, ARGS... >
 Template specialisation for non-variadic, void backend functions. More...
 
class  backend_functor_common
 Backend functor class for functions with result type TYPE and argumentlist ARGS. More...
 
class  BE_bucket_base
 A base class for BEvariable_bucket and BEfunction_bucket. More...
 
class  BEfunction_bucket
 The actual usable form of the interface class to backend functions. More...
 
class  BEfunction_bucket< TYPE(*)(ARGS...), TYPE, ARGS... >
 Partial specialisation for non-variadic backend functions. More...
 
class  BEfunction_bucket< typename variadic_ptr< TYPE, ARGS... >::type, TYPE, ARGS... >
 Partial specialisation for variadic backend functions. More...
 
class  BEfunction_bucket_common
 An interface class for backend functions. More...
 
class  BEvariable_bucket
 An interface class for backend variables. More...
 
class  CallFcn
 Helper class for calling function pointers found by FptrFinder. More...
 
struct  CallFcn< HostSpec, MapTag::Get >
 Specialisation of CallFcn for calling 'getter' functions. More...
 
struct  CallFcn< HostSpec, MapTag::Set >
 Specialisation of CallFcn for calling 'setter' functions. More...
 
struct  capability_info
 Helper struct to carry around capability information. More...
 
class  Cholesky
 
struct  dbl_dbl_bool
 
class  DecayTable
 GAMBIT native decay table class. More...
 
struct  DefaultTraits
 Default values for traits. Specialisations of SpecTraits should inherit from this, and then override the traits that they want to customise. More...
 
class  dep_bucket
 An interface class for module dependencies. More...
 
class  DescriptionDatabase
 A small wrapper object for 'description database' nodes. More...
 
struct  div_ints_by_half
 
class  DummyInput
 
class  DummyModel
 Dummy classes to satisfy template parameters for Spec class in cases when those objects are not needed by the getters. More...
 
struct  enable_if_all_member
 
struct  enable_if_all_member_vector
 
struct  enable_if_not_all_member
 
struct  enable_if_not_all_member_vector
 
struct  enable_if_not_one_member
 
struct  enable_if_not_one_member_vector
 
struct  enable_if_one_member
 
struct  enable_if_one_member_vector
 
class  error
 GAMBIT error class. More...
 
class  exception
 GAMBIT exception base class. More...
 
class  Farray
 Array class that matches the memory structure and functionality of arrays in Fortran codes Syntax: Farray<[type], [lower index, dim 1], [upper index, dim 1], [alternating lower/upper indices for subsequent dimensions]> DO NOT UNDER ANY CIRCUMSTANCE add new member variables to this class! This would break the crucial memory structure. More...
 
struct  FcnInfo1
 Structs to hold function pointers and valid index sets. More...
 
struct  FcnInfo2
 
class  FcomplexT
 Fortran complex type. More...
 
class  FptrFinder
 Forward declaration of FptrFinder. More...
 
class  Fstring
 Farray specialization for Fortran strings. More...
 
class  FstringArray
 Farray specialization for Fortran arrays of strings. More...
 
class  functor
 Function wrapper (functor) base class. More...
 
struct  GalacticHaloProperties
 
class  gambit_core
 Master driver class for a GAMBIT scan. More...
 
class  HardShutdownException
 Special exception used during emergency early shutdown. More...
 
class  HiggsCouplingsTable
 GAMBIT native higgs coupling table class. More...
 
struct  ini_code
 A container for a function that needs to be constructed at compile and executed as initialisation code at startup. More...
 
struct  inputVariadicPt_internal
 
struct  inputVariadicPt_internal< 0, 0, 0, ret >
 
struct  inputVariadicPt_internal< 0, 1, 1, ret >
 
struct  inputVariadicPt_internal< low, low, N, ret >
 
struct  inputVariadicPt_struct
 
struct  inputVariadicPt_struct< n, n, N, ret >
 
struct  inputVariadicPt_struct< N, n, N, ret >
 
struct  inputVariadicStruct
 
struct  inputVariadicStruct< 0 >
 
class  invalid_point_exception
 Gambit invalid point exception class. More...
 
struct  is_all_member
 
struct  is_all_member_internal
 
struct  is_all_member_internal< type, void(T, args...)>
 
struct  is_all_member_vector
 
struct  is_all_member_vector_internal
 
struct  is_all_member_vector_internal< void(const std::vector< T > &, args...)>
 
struct  is_all_member_vector_internal< void(std::vector< T > &, args...)>
 
struct  is_all_member_vector_internal< void(std::vector< T >, args...)>
 
struct  is_all_member_vector_internal< void(T, args...)>
 
struct  is_container
 
struct  is_one_member
 
struct  is_one_member_internal
 
struct  is_one_member_internal< type, void(T, args...)>
 
struct  is_one_member_vector
 
struct  is_one_member_vector_internal
 
struct  is_one_member_vector_internal< void(const std::vector< T > &, args...)>
 
struct  is_one_member_vector_internal< void(std::vector< T > &, args...)>
 
struct  is_one_member_vector_internal< void(std::vector< T >, args...)>
 
struct  is_one_member_vector_internal< void(T, args...)>
 
struct  is_pair
 
struct  is_same_type
 
struct  is_same_type< mult_types< args... >, T >
 
struct  is_same_type< T, T >
 
struct  is_same_type_internal
 
struct  is_same_type_internal< void(T, args...), T >
 
struct  is_same_type_internal< void(T, args...), type >
 
struct  is_vector
 
class  Likelihood_Container
 Class for collecting pointers to all the likelihood components, then running and combining them. More...
 
class  Likelihood_Container_Factory
 
struct  LocalMaxwellianHalo
 
struct  MapCollection
 Struct to hold collections of function pointer maps to be filled by derived classes. More...
 
struct  MapTag
 Tags. More...
 
struct  MapTypes
 Fully unspecialised MapTypes declaration. More...
 
struct  MapTypes< DerivedSpec, MapTag::Get >
 Types needed for function pointer maps Partial specialisation for "getter" maps. More...
 
struct  MapTypes< DerivedSpec, MapTag::Set >
 Types needed for function pointer maps Partial specialisation for "setter" maps. More...
 
struct  Mesons_decay_constants
 
struct  Mesons_masses
 
class  model_functor
 Functors specific to ModelParameters objects. More...
 
struct  model_info
 Helper struct to carry around model information. More...
 
class  ModelHierarchy
 Model hierarchy tree class. More...
 
class  ModelParameters
 
class  module_functor
 Actual module functor type for all but TYPE=void. More...
 
class  module_functor< void >
 Actual module functor type for TYPE=void. More...
 
class  module_functor_common
 Functor derived class for module functions. More...
 
class  MPIShutdownException
 Special exception raised when emergency shutdown triggered via MPI. More...
 
class  MSSMea
 Skeleton "model" class which interacts with an SLHAea object Some common functions defined in base class. More...
 
class  MSSMSimpleSpec
 MSSM specialisation of SLHAea object wrapper version of SubSpectrum class. More...
 
struct  mult_types
 
class  omp_safe_ptr
 A safe pointer designed to point at an array, and return the entry in that array corresponding to the current OpenMP thread. More...
 
class  Options
 A small wrapper object for 'options' nodes. More...
 
struct  OverrideMaps
 Definition of struct to hold various override values for a given ParamTag. More...
 
class  Piped_exceptions
 Gambit piped error class. More...
 
class  Piped_invalid_point
 Gambit piped invalid point exception class. More...
 
class  primary_model_functor
 Functors specific to primary ModelParameters objects. More...
 
class  Random
 
class  reg_elem
 
struct  remove_all
 
struct  rmVariadicPt_internal
 
struct  rmVariadicPt_internal< 0, 1, 1, ret >
 
struct  rmVariadicPt_internal< low, low, N, ret >
 
struct  rmVariadicPt_struct
 
struct  rmVariadicPt_struct< n, n, N, ret >
 
struct  rmVariadicPt_struct< N, N, N, ret >
 
struct  rmVariadicPt_struct< N, n, N, ret >
 
class  safe_ptr
 A safe pointer that throws an informative error if you try to dereference it when nullified, and cannot be used to overwrite the thing it points to. More...
 
class  safe_variable_ptr
 A safe variable pointer that throws an informative error if you try to dereference it when nullified, but unlike safe_ptr it can be used to overwrite the thing it points to. More...
 
class  SafeBool
 
class  safety_bucket_base
 Base class for the interface classes 'dep_bucket', 'BEvariable_bucket' and 'BEfunction_bucket'. More...
 
class  SetMaps
 FptrFinder friend class for implementing named parameter idiom. More...
 
class  SignalData
 Variables for use in signal handlers. More...
 
class  SilentShutdownException
 Special exception used during clean exit from diagnostics. More...
 
class  SLHAeaModel
 Skeleton "model" class which interacts with an SLHAea object. More...
 
class  SLHASimpleSpec
 
class  SMea
 Skeleton "model" class which interacts with an SLHAea object Some common functions defined in base class. More...
 
struct  SMInputs
 Container class for Standard Model input information (defined as in SLHA2) More...
 
class  SMSimpleSpec
 SM specialisation of SLHAea object wrapper version of SubSpectrum class. More...
 
class  SoftShutdownException
 Special exception used during controlled early shutdown. More...
 
class  Spec
 Need to forward declare Spec class. More...
 
class  special_exception
 GAMBIT special exception class. Not logged, meant for always catching. More...
 
class  SpecOverrideOptions
 Mini helper class to specify behaviour of getters w.r.t. overrides in a type-safe way. More...
 
struct  SpecTraits
 Forward declare base traits class which communicates Model and Input typedefs from the wrapper class Triggers informative compiler error if an appropriate specialisation is not defined for whatever SubSpectrum wrapper might be trying to instantiate this. More...
 
struct  SpecTraits< Models::DiracSingletDM_Z2SimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< Models::MajoranaSingletDM_Z2SimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< Models::ScalarSingletDM_Z2SimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< Models::ScalarSingletDM_Z3SimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< Models::VectorSingletDM_Z2SimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< MSSMSimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< SMSimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
struct  SpecTraits< SpecBit::MDMSpec< MI > >
 Specialisation of "traits" class used to inform Spec<T> class of what "Model" and "Input" are for this derived class. More...
 
struct  SpecTraits< SpecBit::MSSMSpec< MI > >
 Specialisation of "traits" class used to inform Spec<T> class of what "Model" and "Input" are for this derived class. More...
 
struct  SpecTraits< SpecBit::ScalarSingletDM_Z2Spec< MI > >
 Specialisation of "traits" class used to inform Spec<T> class of what "Model" and "Input" are for this derived class. More...
 
struct  SpecTraits< SpecBit::ScalarSingletDM_Z3Spec< MI > >
 Specialisation of "traits" class used to inform Spec<T> class of what "Model" and "Input" are for this derived class. More...
 
struct  SpecTraits< SpecBit::SMHiggsSimpleSpec >
 Specialisation of traits class needed to inform base spectrum class of the Model and Input types. More...
 
class  Spectrum
 "Standard Model" (low-energy) plus high-energy model container class More...
 
class  SpectrumParameter
 Simple class to contain information defining how some parameter in a SubSpectrum object can be accessed. More...
 
class  SubSpectrum
 Virtual base class for interacting with spectrum generator output. More...
 
class  SubSpectrumContents
 Base class for defining the required contents of a SubSpectrum object. More...
 
class  table_formatter
 
struct  triplet
 
struct  type_equal_to
 
struct  type_hasher
 
struct  type_index
 
struct  variadic_ptr
 Type redefinition to get around icc compiler bugs. More...
 
class  VerifyContents
 Simpler helper class to run the verify_contents function only once, the first time a particular wrapper class is constructed. More...
 
class  warning
 GAMBIT warning class. More...
 

Typedefs

typedef double(* fptr) (int &)
 Pointer to a function that takes an integer by reference and returns a double. More...
 
typedef double(* fptr_dd) (double &)
 A double in, double out function pointer. More...
 
typedef SLHAea::Coll SLHAstruct
 Less confusing name for SLHAea container class. More...
 
typedef std::string str
 Shorthand for a standard string. More...
 
typedef LogTags::LogTag_declaration LogTag
 
typedef std::map< std::string, doublemap_str_dbl
 Shorthand for a string-to-double map. More...
 
typedef std::map< std::string, doubleparameterMap
 
typedef std::pair< str, strsspair
 Shorthand for a pair of standard strings. More...
 
typedef std::pair< double, doubleddpair
 Shorthand for a pair of doubles. More...
 
typedef std::map< std::string, std::map< std::string, double > > map_str_map_str_dbl
 Shorthand for a string-to-string-to-double map. More...
 
typedef std::map< std::string, std::string > map_str_str
 Shorthand for a string-to-string map. More...
 
typedef std::map< std::pair< int, int >, doublemap_intpair_dbl
 Shorthand for an int-int pair to double map. More...
 
typedef std::map< int, triplet< double > > map_int_triplet_dbl
 Shorthand for an int-to-double triplet map. More...
 
typedef FcomplexT< float > Fcomplex
 Fortran type typedefs TODO: Implement compiler dependent macros ensuring that these are always correct. More...
 
typedef FcomplexT< float > Fcomplex8
 
typedef FcomplexT< doubleFcomplex16
 
typedef FcomplexT< doubleFdouble_complex
 
typedef FcomplexT< long doubleFlongdouble_complex
 
typedef char Fcharacter
 
typedef double Fdouble
 
typedef double Fdouble_precision
 
typedef double Fdoubleprecision
 
typedef int Finteger
 
typedef short Finteger2
 
typedef long int Finteger4
 
typedef long long Finteger8
 
typedef int32_t Flogical
 
typedef bool Flogical1
 
typedef float Freal
 
typedef float Freal4
 
typedef double Freal8
 
typedef long double Freal16
 
typedef void MVoid
 Types used for Mathematica backends. More...
 
typedef int MInteger
 
typedef double MReal
 
typedef bool MBool
 
typedef char MChar
 
typedef std::string MString
 
template<typename T >
using MList = std::vector< T >
 

Functions

gambit_coreCore ()
 Core accessor function. More...
 
errorcore_error ()
 Core errors. More...
 
warningcore_warning ()
 Core warnings. More...
 
int register_module (str)
 Register a module with the Core. More...
 
int register_module_functor_core (module_functor_common &)
 Register a module functor with the Core. More...
 
int register_model_functor_core (primary_model_functor &)
 Register a model functor with the Core. More...
 
int register_backend (str, str)
 Register a backend with the Core. More...
 
int register_backend_functor (functor &)
 Register a backend functor with the Core. More...
 
int register_management_req (module_functor_common &)
 Register a loop management requirement with the Core. More...
 
YAML::Emitter & operator<< (YAML::Emitter &, const capability_info &)
 Emitter for the capability_info struct. More...
 
YAML::Emitter & operator<< (YAML::Emitter &, const model_info &)
 Emitter for the model_info struct. More...
 
void ini_catch (std::exception &)
 Catch initialisation exceptions. More...
 
int add_equivrelation (str, str)
 Helper function for adding a type equivalency at initialisation. More...
 
int pass_default_to_backendinfo (str, str)
 Helper function for passing default backend information at initialisation. More...
 
int add_model (str, str)
 Runtime addition of model to GAMBIT model database. More...
 
int add_parameter (model_functor &, str)
 Add a new parameter to a primary model functor. More...
 
int set_model_name (model_functor &, str)
 Set the model name in a primary model functor. More...
 
int copy_parameters (model_functor &, model_functor &, bool, str="", str="")
 Tell a model functor to take its parameter definition from another model functor. More...
 
int register_model_functor (std::map< str, bool(*)()>, std::map< str, str >, bool(*)(), str, str)
 Register a model functor. More...
 
int register_module_with_log (str)
 Create a log tag for a new module. More...
 
int register_function (module_functor_common &, bool, safe_ptr< bool > *, std::map< str, str > &, std::map< str, bool(*)()> &, bool(&)(), safe_ptr< Options > &)
 Register a function with a module. More...
 
SLHAstruct read_SLHA (str slha)
 Read an SLHA file in to an SLHAea object with some error-checking. More...
 
double SLHAea_get (const SLHAstruct &slha, const str &block, const int index)
 Get an entry from an SLHAea object as a double, with some error checking. More...
 
double SLHAea_get (const SLHAstruct &slha, const str &block, const int index, const double defvalue)
 Get an entry from an SLHAea object as a double; raise a warning and use a default value if the entry is missing. More...
 
void SLHAea_add_block (SLHAstruct &, const str &name, const double scale=-1)
 Add a new block to an SLHAea object, with our without a scale. More...
 
void SLHAea_delete_block (SLHAstruct &slha, const std::string &block)
 Delete an entire block from an SLHAea object, if it exists (actually just the first block matching the given name) More...
 
bool SLHAea_block_exists (SLHAstruct &slha, const str &block)
 Check if a block exists in an SLHAea object. More...
 
bool SLHAea_check_block (SLHAstruct &slha, const str &block)
 Check if a block exists in an SLHAea object, add it if not. More...
 
bool SLHAea_check_block (SLHAstruct &slha, const str &block, const int index)
 Check if a block exists in an SLHAea object, add it if not, and check if it has an entry at a given index. More...
 
bool SLHAea_check_block (SLHAstruct &slha, const str &block, const int index1, const int index2)
 
void SLHAea_add_GAMBIT_SPINFO (SLHAstruct &slha)
 Write the SPINFO block with GAMBIT name and version number. More...
 
template<typename T >
void SLHAea_add_matrix (SLHAstruct &slha, const str &block, const std::vector< T > &matrix, const int rows, const int cols, const str &comment="", const bool overwrite=false)
 Add a whole matrix to an SLHAea object if it doesn't already exist. More...
 
void SLHAea_add_from_subspec (SLHAstruct &slha, const str local_info, const SubSpectrum &subspec, const Par::Tags partype, const std::pair< int, int > &pdg_pair, const str &block, const str &comment, const bool error_if_missing=true, const double rescale=1.0)
 Add an entry from a subspectrum getter to an SLHAea object; SLHA index given by pdg code. More...
 
void SLHAea_add_from_subspec (SLHAstruct &slha, const str local_info, const SubSpectrum &subspec, const Par::Tags partype, const str &name, const str &block, const int slha_index, const str &comment, const bool error_if_missing=true, const double rescale=1.0)
 Add an entry from a subspectrum getter to an SLHAea object; 1 SLHA index. More...
 
void SLHAea_add_from_subspec (SLHAstruct &slha, const str local_info, const SubSpectrum &subspec, const Par::Tags partype, const str &name, const int index1, const int index2, const str &block, const int slha_index1, const int slha_index2, const str &comment, const bool error_if_missing=true, const double rescale=1.0)
 Add an entry from a subspectrum getter to an SLHAea object; two SubSpectrum getter indices, two SLHA indices. More...
 
int SMlike_higgs_PDG_code (const SubSpectrum &)
 Determine which MSSM higgs is most SM-like. More...
 
template<typename HE , typename HEmod >
Spectrum spectrum_from_SLHAea (HEmod hemod, SLHAstruct slhaea, const Spectrum::mc_info &mci, const Spectrum::mr_info &mri)
 Create a simple spectrum object from an SLHAea object. More...
 
template<typename HE >
Spectrum spectrum_from_SLHA (str slha, const Spectrum::mc_info &mci, const Spectrum::mr_info &mri)
 Create a simple spectrum object from an SLHA file. More...
 
bool within_bounds (const int i, const std::set< int > allowed)
 Helper function for checking if indices are valid. More...
 
void terminator ()
 
double virtual_SMHiggs_widths (str, double)
 Higgs branching ratios and total width Gamma [GeV], as function of mass [GeV] (90 - 300 GeV) More...
 
void get_calculator_info (const SLHAstruct &slha, str &calculator, str &calculator_version)
 
template<class T >
void SLHAea_overwrite_block (SLHAstruct &slha, const str &block, int index, T value, const str &comment)
 Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line. More...
 
template<class T >
void SLHAea_overwrite_block (SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
 Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line. More...
 
bool is_abs (str &s)
 Helper function for checking if a particle or ratio has been requested as an absolute value. More...
 
Logging::LogMasterlogger ()
 Function to retrieve a reference to the Gambit global log object. More...
 
void MSSM_mA_to_MSSM_mhud (const ModelParameters &myP, ModelParameters &targetP, const SubSpectrum &HE)
 
void MSSMatX_to_MSSMatQ (const ModelParameters &myP, ModelParameters &targetP, const SubSpectrum &HE)
 
void MSSM20atX_to_MSSM25atX (const ModelParameters &myP, ModelParameters &targetP)
 
void MSSM25atX_to_MSSM30atX (const ModelParameters &myP, ModelParameters &targetP)
 
void MSSM30atX_to_MSSM63atX (const ModelParameters &myP, ModelParameters &targetP)
 
bool orderer (std::pair< int, double > a, std::pair< int, double > b)
 Helper function for sorting int, double pairs according to the double. More...
 
template<typename T >
bool operator!= (const SafeBool &lhs, const T &)
 
template<typename T >
bool operator== (const SafeBool &lhs, const T &)
 
std::string format_for_screen (const std::string &input_string)
 
void print_to_screen (const std::string &file_in, const std::string &name)
 
int get_screen_cols ()
 
std::string separate_line (std::string &line, std::string::size_type indent, std::string::size_type cols_pos)
 
std::string signal_name (int sig)
 Translate signal codes to strings. More...
 
EXPORT_SYMBOLS SignalDatasignaldata ()
 Retrieve global instance of signal handler options struct. More...
 
void set_signal_handler (const YAML::Node &keyvalnode, const int sig, const std::string &def_mode)
 Choose signal handler for a given signal via yaml file option. More...
 
sigset_t * signal_mask ()
 Getter for global signal set. More...
 
EXPORT_SYMBOLS errorutils_error ()
 Utility errors. More...
 
EXPORT_SYMBOLS warningutils_warning ()
 Utility warnings. More...
 
errorbackend_error ()
 Backend errors. More...
 
warningbackend_warning ()
 Backend warnings. More...
 
errorlogging_error ()
 Logging errors. More...
 
warninglogging_warning ()
 Logging warnings. More...
 
errormodel_error ()
 Model errors. More...
 
warningmodel_warning ()
 Model warnings. More...
 
invalid_point_exceptioninvalid_point ()
 Invalid point exceptions. More...
 
void initialise_standalone_logs (str)
 Logger setup standalone utility function. More...
 
std::string spacing (int, int)
 Spacing utility for stream overloads. More...
 
template<class Type1 , class Type2 >
std::ostream & operator<< (std::ostream &os, const std::pair< Type1, Type2 > &p)
 Stream overload for pairs of any type that already has << defined. More...
 
template<class Type >
std::ostream & operator<< (std::ostream &os, const std::set< Type > &set)
 Stream overload for sets of any type that already has << defined. More...
 
template<class Type >
std::ostream & operator<< (std::ostream &os, const std::vector< Type > &v)
 Stream overload for vectors of any type that already has << defined. More...
 
template<class Type >
std::ostream & operator<< (std::ostream &os, const std::map< std::string, Type > &map)
 Stream overload for map from string to any type that already has << defined. More...
 
template<typename T >
byVal (T t)
 Redirection function to turn an lvalue into an rvalue, so that it is correctly passed by value when doing perfect forwarding with functor typecasting. More...
 
template<typename T >
int sgn (T val)
 
template<typename T >
std::vector< T > initVector (std::vector< T > vector)
 
template<typename T , typename... Args>
std::vector< T > initVector (std::vector< T > vector, T value, Args... args)
 
template<typename T , typename U , typename... Args>
std::vector< T > initVector (std::vector< T > vector, U value, Args... args)
 
template<typename T , typename... Args>
std::vector< T > initVector (T value, Args... args)
 
template<typename T >
std::set< T > initSet (std::set< T > set)
 Same as above, but for sets. More...
 
template<typename T , typename... Args>
std::set< T > initSet (std::set< T > set, T value, Args... args)
 
template<typename T , typename U , typename... Args>
std::set< T > initSet (std::set< T > set, U value, Args... args)
 
template<typename T , typename... Args>
std::set< T > initSet (T value, Args... args)
 
const std::string stringifyVariadic ()
 
const std::string stringifyVariadic (const std::string &str)
 
template<typename... args>
const std::string stringifyVariadic (const std::string &str, const args &... strs)
 
double squareVariadic ()
 
template<typename... args>
double squareVariadic (const double &val, const args &... params)
 
template<typename ret , typename t1 , typename... args>
auto addVariadicPt (const unsigned int &i, const t1 &val, ret &f, const args &... params) -> decltype(f(val, params...))
 
template<typename ret >
double rmVariadicPt (const unsigned int &i, ret &f)
 
template<typename ret , typename T , typename... args>
auto rmVariadicPt (const unsigned int &i, ret &f, const T &in, const args &... params) -> decltype(f(params...))
 
template<typename ret , typename t1 , typename... args>
auto inputVariadicPt (const unsigned int &i, const t1 &val, ret &f, const args &... params) -> decltype(f(params...))
 
template<typename T , typename... args>
double inputVariadicFunction (T &, std::vector< double >::const_iterator, std::vector< double >::const_iterator, double, double, double, double, double, double, double, double, double, double)
 
template<typename T , typename... args>
double inputVariadicFunction (T &f, std::vector< double >::const_iterator begin, std::vector< double >::const_iterator end, const args &... params)
 
template<typename T >
std::enable_if< is_vector< T >::value, int >::type getVariadicVectorSize (const T &in)
 
template<typename T >
std::enable_if<!is_vector< T >::value, int >::type getVariadicVectorSize (const T &in)
 
int getVariadicMaxVector ()
 
template<typename T , typename... args>
int getVariadicMaxVector (const T &in, const args &... params)
 
void inputVariadicVector (std::vector< double >::iterator)
 
template<typename... args>
void inputVariadicVector (std::vector< double >::iterator vec, const double &val, const args &... params)
 
void outputVariadicVector (std::vector< double >::const_iterator)
 
template<typename... args>
void outputVariadicVector (std::vector< double >::const_iterator vec, double &val, args &... params)
 
template<typename ret >
ret getVariadicPt (unsigned int i)
 
template<typename t , typename ret = t, typename... args>
ret getVariadicPt (unsigned int i, const t &in, const args &... params)
 
strgambit_version ()
 Statically construct a string containing the full GAMBIT version information and return a reference to it. More...
 
const YAML::Node getVariadicNode (const YAML::Node &node)
 
const YAML::Node getVariadicNode (const YAML::Node &node, std::string key)
 
template<typename... args>
const YAML::Node getVariadicNode (const YAML::Node &node, const std::string &key, const args &... keys)
 
Piped_exceptions piped_errors (1000)
 Global instance of Piped_exceptions class for errors. More...
 
Piped_exceptions piped_warnings (1000)
 Global instance of Piped_exceptions class for warnings. More...
 
void add_screen_spaces (std::string &str, std::string::size_type size, std::string::size_type indent)
 
void wrap_lines (std::vector< std::vector< std::string >> &data_in, const std::vector< int > &widths, const std::vector< int > &minWidths, double pad, std::vector< unsigned char > *row_flags=0)
 
str get_gambit_version ()
 Construct a string containing the full GAMBIT version information. More...
 
void SLHAea_add (SLHAstruct &slha, const str &block, const int index, const double value, const str &comment="", const bool overwrite=false)
 Add an entry to an SLHAea object (if overwrite=false, only if it doesn't already exist) More...
 
void SLHAea_add (SLHAstruct &slha, const str &block, const int index, const str &value, const str &comment="", const bool overwrite=false)
 
void SLHAea_add (SLHAstruct &slha, const str &block, const int index, const int value, const str &comment="", const bool overwrite=false)
 
void SLHAea_add (SLHAstruct &slha, const str &block, const int index1, const int index2, const double &value, const str &comment, const bool overwrite=false)
 
void swap (Spectrum &first, Spectrum &second)
 Swap resources of two Spectrum objects Note: Not a member function! This is an external function which is a friend of the Spectrum class. More...
 
void sighandler_soft (int sig)
 Signal handler functions. More...
 
void block_signals ()
 Signal blocking/unblocking. More...
 
void unblock_signals ()
 

Variables

 gambit_registry
 
reg_elem< factory_type > __scanner_factories__
 
const Logging::endofmessage EOM = Logging::endofmessage()
 Explicit const instance of the end of message struct in Gambit namespace. More...
 
Piped_invalid_point piped_invalid_point
 Global instance of piped invalid point class. More...
 
Piped_exceptions piped_errors
 Global instance of Piped_exceptions class for errors. More...
 
Piped_exceptions piped_warnings
 Global instance of Piped_exceptions class for warnings. More...
 
const double pi = 3.141592653589793238462643383279502884197
 
const double root2 = sqrt(2.0)
 
const double hbar = 6.582119514e-25
 
const double K2eV = 8.6173303e-5
 
const double eV2g = 1.782661907e-33
 
const double gev2cm = 197.327053e-16
 
const double gev2cm2 = pow(197.327053e-16, 2.0)
 
const double gev2pb = gev2cm2*1e36
 
const double gev2tocm3s1 = 1.16733e-17
 
const double s2cm = 2.99792458e10
 
const double m_planck = 1.220910e19
 
const double m_planck_red = m_planck/sqrt(8.0*pi)
 
const double atomic_mass_unit = 0.931494028
 
const double m_proton_amu = 1.00727646688
 
const double m_neutron_amu = 1.0086649156
 
const double m_proton = m_proton_amu * atomic_mass_unit
 
const double m_neutron = m_neutron_amu * atomic_mass_unit
 
const double m_electron = 0.5109989461e-3
 
const double alpha_EM = 7.2973525664e-3
 
const double T_CMB = 2.7255
 
constexpr double alpha_e_OS_thomson_limit = 0.0072973525664
 Thomson limit of $\alpha_e$ in OS scheme from PDG 2017 More...
 
constexpr double alpha_e_OS_MZ = 1. / 128.944
 $\alpha_e(M_Z)$ in OS scheme from 1105.3149 More...
 
constexpr double delta_alpha_OS = 1. - alpha_e_OS_thomson_limit / alpha_e_OS_MZ
 $\Delta\alpha$ in OS scheme. More...
 
const int gambit_version_major = 0
 
const int gambit_version_minor = 0
 
const int gambit_version_revision = 0
 
const str gambit_version_patch = ""
 
const int gambit_version_int = 10000*gambit_version_major + 100*gambit_version_minor + gambit_version_revision
 
const double mw_central_observed = 80.385
 M_W (Breit-Wigner mass parameter ~ pole) = 80.385 +/- 0.015 GeV (1 sigma), Gaussian. More...
 
const double mw_err_observed = 0.015
 

Detailed Description

TODO: see if we can use this one:

Standard libraries.

=================================================

Function definitions

Map in which to keep factory functions for the priors (prior_creators)

Registry of priors Here we specify mappings from strings to prior objects.

Just declare the classes here; should be defined in source files.


GAMBIT: Global and Modular BSM Inference Tool


ATLAS 2 lepton direct stop analysis (36.1fb^-1) - `heavy stop'.

Based on:

Author
Martin White

Known issues:

1) Photon isolation requirement is missing 2) They use a bizarre HT definition where they don't apply overlap removal between photons and jets. This might not work for us, since jets won't be made by photons in our events.

Warning
Not yet validated!
Author
Christoph Weniger (c.wen.nosp@m.iger.nosp@m.@uva..nosp@m.nl)
Date
2014 Mar
Author
Anders Kvellestad (ander.nosp@m.kve@.nosp@m.fys.u.nosp@m.io.n.nosp@m.o)
Date
2014 Oct
Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.su)
Date
2015 Apr
Author
Sebastian Wild (sebas.nosp@m.tian.nosp@m..wild.nosp@m.@ph..nosp@m.tum.d.nosp@m.e)
Date
2016 Aug

MSSM input parameter definition, with A pole mass and mu as explicit input parameters instead of mHu2 and mHd2 (GUT scale version)


Authors

(add name and date if you modify)

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2017 Sep

MSSM63 model declaration (version with boundary conditions at SUSY scale)


Authors

(add name and date if you modify)

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2017 Sep

MSSM input parameter definition, with A pole mass and mu as explicit input parameters instead of mHu2 and mHd2 (SUSY scale version)


Authors

(add name and date if you modify)

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2017 Sep

MSSM input parameter definition, with A pole mass and mu as explicit input parameters instead of mHu2 and mHd2.


Authors

(add name and date if you modify)

Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2017 Aug

Authors:

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2015 Apr
Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2016 Oct

Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2015 Apr

Translation function definitions for all 'mA' versions of 63 parameter MSSM, back to the corresponding mhu2 mhd2 parameterisations

Contains translation functions for: MSSM63atQ_mA –> MSSM63atQ MSSM63atMGUT_mA –> MSSM63atMGUT MSSM63atMSUSY_mA –> MSSM63atMSUSY


Authors

(add name and date if you modify)

Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2017 Aug
Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2017 Sep, Oct

Authors (add name and date if you modify):

Author
Ben Farmer (b.far.nosp@m.mer@.nosp@m.imper.nosp@m.ial..nosp@m.ac.uk)
Date
2019 Jan

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
Feb 2014

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 August
2014 Feb
Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2014 Dec

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 August 2013 Feb 2014

We need this so that strings in the inifile can be used to choose which prior objects and which combinations of them we want. Map in which to keep factory functions for the priors

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 July 2013/Feb 2014
Author
Pat Scott (patsc.nosp@m.ott@.nosp@m.physi.nosp@m.cs.m.nosp@m.cgill.nosp@m..ca)
Date
2013 Aug

Author
Ben Farmer (ben.f.nosp@m.arme.nosp@m.r@gma.nosp@m.il.c.nosp@m.om)
Date
2016 Mar, 2017 Jan, Feb, Mar

Author
Gregory Martinez (grego.nosp@m.ry.d.nosp@m.avid..nosp@m.mart.nosp@m.inez@.nosp@m.gmai.nosp@m.l.com)
Date
2013 August
2014 Feb
Author
Pat Scott (p.sco.nosp@m.tt@i.nosp@m.mperi.nosp@m.al.a.nosp@m.c.uk)
Date
2014 Dec
2017 Jun
Author
Ben Farmer (benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se)
Date
2016 Aug

Author
Ben Farmer (ben.f.nosp@m.arme.nosp@m.r@gma.nosp@m.il.c.nosp@m.om)
Date
October 2013 - Aug 2016

Author
Ben Farmer (ben.f.nosp@m.arme.nosp@m.r@gma.nosp@m.il.c.nosp@m.om)
Date
October 2013 - Aug 2016
Author
Will Handley (wh260.nosp@m.@cam.nosp@m..ac.u.nosp@m.k)
Date
May 2018

Author
Christoph Weniger c.wen.nosp@m.iger.nosp@m.@uva..nosp@m.nl
Date
Dec 2014

Author
Christoph Weniger c.wen.nosp@m.iger.nosp@m.@uva..nosp@m.nl
Date
Dec 2014
Author
Ben Farmer benja.nosp@m.min..nosp@m.farme.nosp@m.r@fy.nosp@m.sik.s.nosp@m.u.se
Date
Jan 2016

POSIX filesystem libraries Gambit

Typedef Documentation

◆ ddpair

typedef std::pair<double, double> Gambit::ddpair

Shorthand for a pair of doubles.

Definition at line 64 of file util_types.hpp.

◆ Fcharacter

typedef char Gambit::Fcharacter

Definition at line 621 of file util_types.hpp.

◆ Fcomplex

typedef FcomplexT<float> Gambit::Fcomplex

Fortran type typedefs TODO: Implement compiler dependent macros ensuring that these are always correct.

Definition at line 616 of file util_types.hpp.

◆ Fcomplex16

Definition at line 618 of file util_types.hpp.

◆ Fcomplex8

typedef FcomplexT<float> Gambit::Fcomplex8

Definition at line 617 of file util_types.hpp.

◆ Fdouble

Definition at line 622 of file util_types.hpp.

◆ Fdouble_complex

Definition at line 619 of file util_types.hpp.

◆ Fdouble_precision

Definition at line 623 of file util_types.hpp.

◆ Fdoubleprecision

Definition at line 624 of file util_types.hpp.

◆ Finteger

Definition at line 625 of file util_types.hpp.

◆ Finteger2

typedef short Gambit::Finteger2

Definition at line 626 of file util_types.hpp.

◆ Finteger4

typedef long int Gambit::Finteger4

Definition at line 627 of file util_types.hpp.

◆ Finteger8

typedef long long Gambit::Finteger8

Definition at line 628 of file util_types.hpp.

◆ Flogical

typedef int32_t Gambit::Flogical

Definition at line 629 of file util_types.hpp.

◆ Flogical1

typedef bool Gambit::Flogical1

Definition at line 630 of file util_types.hpp.

◆ Flongdouble_complex

Definition at line 620 of file util_types.hpp.

◆ fptr

typedef double(* Gambit::fptr) (int &)

Pointer to a function that takes an integer by reference and returns a double.

Just used for example purposes in ExampleBit_A and ExampleBit_B.

Definition at line 66 of file shared_types.hpp.

◆ fptr_dd

typedef double(* Gambit::fptr_dd) (double &)

A double in, double out function pointer.

Definition at line 69 of file shared_types.hpp.

◆ Freal

typedef float Gambit::Freal

Definition at line 631 of file util_types.hpp.

◆ Freal16

typedef long double Gambit::Freal16

Definition at line 634 of file util_types.hpp.

◆ Freal4

typedef float Gambit::Freal4

Definition at line 632 of file util_types.hpp.

◆ Freal8

Definition at line 633 of file util_types.hpp.

◆ LogTag

Definition at line 62 of file log_tags.hpp.

◆ map_int_triplet_dbl

Shorthand for an int-to-double triplet map.

Definition at line 119 of file util_types.hpp.

◆ map_intpair_dbl

typedef std::map< std::pair < int, int >, double> Gambit::map_intpair_dbl

Shorthand for an int-int pair to double map.

Definition at line 73 of file util_types.hpp.

◆ map_str_dbl

typedef std::map< std::string, double > Gambit::map_str_dbl

Shorthand for a string-to-double map.

Definition at line 48 of file basebaseprinter.hpp.

◆ map_str_map_str_dbl

typedef std::map<std::string,std::map<std::string,double> > Gambit::map_str_map_str_dbl

Shorthand for a string-to-string-to-double map.

Definition at line 68 of file util_types.hpp.

◆ map_str_str

typedef std::map<std::string,std::string> Gambit::map_str_str

Shorthand for a string-to-string map.

Definition at line 70 of file util_types.hpp.

◆ MBool

typedef bool Gambit::MBool

Definition at line 641 of file util_types.hpp.

◆ MChar

typedef char Gambit::MChar

Definition at line 642 of file util_types.hpp.

◆ MInteger

Definition at line 639 of file util_types.hpp.

◆ MList

template<typename T >
using Gambit::MList = typedef std::vector<T>

Definition at line 644 of file util_types.hpp.

◆ MReal

Definition at line 640 of file util_types.hpp.

◆ MString

typedef std::string Gambit::MString

Definition at line 643 of file util_types.hpp.

◆ MVoid

Types used for Mathematica backends.

Definition at line 638 of file util_types.hpp.

◆ parameterMap

typedef std::map<std::string, double> Gambit::parameterMap

Definition at line 51 of file model_parameters.hpp.

◆ SLHAstruct

typedef SLHAea::Coll Gambit::SLHAstruct

Less confusing name for SLHAea container class.

Definition at line 37 of file slhaea_helpers.hpp.

◆ sspair

typedef std::pair<str, str> Gambit::sspair

Shorthand for a pair of standard strings.

Definition at line 62 of file util_types.hpp.

◆ str

typedef std::string Gambit::str

Shorthand for a standard string.

Definition at line 33 of file spectrum_helpers.hpp.

Function Documentation

◆ add_equivrelation()

int Gambit::add_equivrelation ( str  s1,
str  s2 
)

Helper function for adding a type equivalency at initialisation.

Definition at line 44 of file ini_functions.cpp.

References Gambit::Utils::type_equivalency::add(), ini_catch(), and Gambit::Utils::typeEquivalencies().

45  {
46  try
47  {
49  }
50  catch (std::exception& e) { ini_catch(e); }
51  return 0;
52  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
void add(str, str)
Define a new equivalency relation {.
type_equivalency & typeEquivalencies()
Backend info accessor function.
Here is the call graph for this function:

◆ add_model()

int Gambit::add_model ( str  model,
str  parent 
)

Runtime addition of model to GAMBIT model database.

Definition at line 66 of file ini_functions.cpp.

References Gambit::Models::ModelFunctorClaw::declare_model(), ini_catch(), and Gambit::Models::ModelDB().

67  {
68  try
69  {
70  Models::ModelDB().declare_model(model, parent);
71  }
72  catch (std::exception& e) { ini_catch(e); }
73  return 0;
74  }
ModelFunctorClaw & ModelDB()
Claw accessor function.
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
void declare_model(const str &, const str &)
Add a new model to the model database.
Definition: models.cpp:151
Here is the call graph for this function:

◆ add_parameter()

int Gambit::add_parameter ( model_functor primary_parameters,
str  param 
)

Add a new parameter to a primary model functor.

Definition at line 77 of file ini_functions.cpp.

References Gambit::model_functor::addParameter(), and ini_catch().

78  {
79  try
80  {
81  primary_parameters.addParameter(param);
82  }
83  catch (std::exception& e) { ini_catch(e); }
84  return 0;
85  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ add_screen_spaces()

void Gambit::add_screen_spaces ( std::string &  str,
std::string::size_type  size,
std::string::size_type  indent 
)
inline

Definition at line 46 of file screen_print_utils.cpp.

Referenced by format_for_screen().

47  {
48  std::stringstream ss(str.substr(indent));
49  std::string word;
50  std::string::size_type words =0;
51 
52  while (ss >> word){words++;}
53  words--;
54  if (words <= 0)
55  return;
56  std::string::size_type to_add = (size - str.length())/(words);
57  std::string::size_type extras = (size - str.length())%(words);
58  std::string::size_type extras_even = words/2;
59  std::string::size_type extras_odd = words - extras_even;
60  if (extras > extras_odd)
61  {
62  extras_even = extras - extras_odd;
63  }
64  else
65  {
66  extras_odd = extras;
67  extras_even = 0;
68  }
69 
70  std::string::size_type pos = str.find_first_not_of(" ", indent);
71  pos = str.find_first_of(" ", pos);
72  int i = 0;
73  while (pos != std::string::npos)
74  {
75  i++;
76  if (i%2 == 0 && extras_even > 0)
77  {
78  str.insert(pos, to_add + 1, ' ');
79  extras_even--;
80  }
81  else if (i%2 == 1 && extras_odd > 0)
82  {
83  str.insert(pos, to_add + 1, ' ');
84  extras_odd--;
85  }
86  else if (to_add > 0)
87  {
88  str.insert(pos, to_add, ' ');
89  }
90 
91  pos = str.find_first_not_of(" ", pos);
92  pos = str.find_first_of(" ", pos);
93  }
94  }
std::string str
Shorthand for a standard string.
Here is the caller graph for this function:

◆ addVariadicPt()

template<typename ret , typename t1 , typename... args>
auto Gambit::addVariadicPt ( const unsigned int i,
const t1 &  val,
ret &  f,
const args &...  params 
) -> decltype(f(val, params...))

Definition at line 407 of file variadic_functions.hpp.

References combine_hdf5::f.

408  {
409  return addVariadicPt_internal<0, sizeof...(args)+1, sizeof...(args)+1, decltype(f(params...))>::reducePt(f, i, val, params...);
410  }

◆ backend_error()

error & Gambit::backend_error ( )

Backend errors.

Definition at line 41 of file standalone_error_handlers.cpp.

References Gambit::LogTags::backends.

Referenced by Gambit::DecayBit::all_decays_from_SLHA(), Gambit::module_functor< ModelParameters >::calculate(), Gambit::module_functor< void >::calculate(), and main().

42  {
43  static error local("A problem has been raised by the backend system.","backend_error", backends);
44  return local;
45  }
Here is the caller graph for this function:

◆ backend_warning()

warning & Gambit::backend_warning ( )

Backend warnings.

Definition at line 48 of file standalone_error_handlers.cpp.

References Gambit::LogTags::backends.

49  {
50  static warning local("A problem has been raised by the backend system.","backend_warning", backends);
51  return local;
52  }

◆ block_signals()

void Gambit::block_signals ( )

Signal blocking/unblocking.

Definition at line 31 of file signal_helpers.cpp.

References signal_mask().

32  {
33  sigprocmask(SIG_BLOCK, signal_mask(), NULL);
34  }
sigset_t * signal_mask()
Getter for global signal set.
Here is the call graph for this function:

◆ byVal()

◆ copy_parameters()

int Gambit::copy_parameters ( model_functor donor,
model_functor donee,
bool  add_friend,
str  model = "",
str  model_x = "" 
)

Tell a model functor to take its parameter definition from another model functor.

Definition at line 99 of file ini_functions.cpp.

References Gambit::Models::ModelFunctorClaw::add_friend(), Gambit::model_functor::donateParameters(), ini_catch(), and Gambit::Models::ModelDB().

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  }
ModelFunctorClaw & ModelDB()
Claw accessor function.
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
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ Core()

gambit_core & Gambit::Core ( )

Core accessor function.

Definition at line 24 of file core_singleton.cpp.

References Gambit::Models::ModelDB().

Referenced by main(), register_backend(), register_backend_functor(), register_management_req(), register_model_functor_core(), register_module(), and register_module_functor_core().

25  {
26  static gambit_core local(Models::ModelDB(), Backends::backendInfo());
27  return local;
28  }
ModelFunctorClaw & ModelDB()
Claw accessor function.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ core_error()

◆ core_warning()

warning & Gambit::core_warning ( )

Core warnings.

Definition at line 32 of file error_handlers.cpp.

References Gambit::LogTags::core.

33  {
34  static warning local("The Core has encountered a problem.","core_warning", core);
35  return local;
36  }

◆ format_for_screen()

std::string Gambit::format_for_screen ( const std::string &  input_string)

Definition at line 100 of file screen_print_utils.cpp.

References add_screen_spaces(), get_screen_cols(), and separate_line().

Referenced by Gambit::Scanner::Plugins::Plugin_Loader::print_priors(), and print_to_screen().

101  {
102  int cols = get_screen_cols();
103  std::string output_string, str;
104  std::stringstream ss(input_string);
105 
106  if (cols > 0)
107  {
108  std::string::size_type cols_pos = cols;
109  while (std::getline(ss, str))
110  {
111  bool add_n = false;
112  std::string line = str;
113 
114  if (str.length() >= 16 && str.substr(0, 16) == "#remove_newlines")
115  {
116  bool ck_space = false;
117  line = "";
118 
119  while(std::getline(ss, str))
120  {
121  if (str.length() >= 21 && str.substr(0, 21) == "#dont_remove_newlines")
122  {
123  break;
124  }
125  else if (str.find_first_not_of(" ") == std::string::npos)
126  {
127  add_n = true;
128  break;
129  }
130  else if (!(str.length() > 0 && str[0] == '#'))
131  {
132  if (ck_space)
133  {
134  if (str[0] != ' ')
135  line += " ";
136 
137  ck_space = false;
138  }
139 
140  if (str[str.length()-1] != ' ')
141  ck_space = true;
142 
143  line += str;
144  }
145  }
146  }
147 
148  std::string::size_type len = line.find_last_not_of(" ");
149  if (len == std::string::npos || line.length() == 0)
150  {
151  output_string += "\n";
152  }
153  else if (!(line.length() > 0 && line[0] == '#'))
154  {
155  line = line.substr(0, len+1);
156 
157  std::string::size_type cols_corr = line.find_first_of("\x1b");
158  std::string::size_type indent = line.find_first_not_of(" ");
159  std::string::size_type colon_indent = line.find_first_of(":");
160 
161  if (colon_indent != std::string::npos && 2*colon_indent < cols_pos)
162  {
163  indent = line.find_first_not_of(" ", colon_indent +1);
164  }
165 
166  for (;;)
167  {
168  if ((cols_corr == std::string::npos) && (line.length() > cols_pos))
169  {
170  std::string temp = separate_line(line, indent, cols_pos);
171  add_screen_spaces(temp, cols_pos, indent);
172  output_string += temp + "\n";
173  }
174  else
175  {
176  output_string += line + "\n";
177  break;
178  }
179  }
180 
181  if (add_n)
182  output_string += "\n";
183  }
184  }
185  }
186  else
187  {
188  while(std::getline(ss, str))
189  {
190  if (!(str.length() > 0 && str[0] == '#'))
191  {
192  str = str.substr(0, str.find_last_not_of(" ")+1);
193  output_string += str + "\n";
194  }
195  }
196  }
197 
198  return output_string;
199  }
void add_screen_spaces(std::string &str, std::string::size_type size, std::string::size_type indent)
int get_screen_cols()
std::string separate_line(std::string &line, std::string::size_type indent, std::string::size_type cols_pos)
std::string str
Shorthand for a standard string.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gambit_version()

str & Gambit::gambit_version ( )

◆ get_calculator_info()

void Gambit::get_calculator_info ( const SLHAstruct slha,
str calculator,
str calculator_version 
)

Definition at line 33 of file decay_table.cpp.

Referenced by Gambit::DecayTable::DecayTable().

34  {
35  auto dcinfo = slha.find("DCINFO");
36  if (dcinfo != slha.end())
37  {
38  if (dcinfo->size() > 1)
39  {
40  for (unsigned int i = 1; i < dcinfo->at(1).size(); ++i)
41  {
42  str s(dcinfo->at(1).at(i));
43  if (s[0] != '#') calculator += s;
44  }
45  }
46  if (dcinfo->size() > 2)
47  {
48  for (unsigned int i = 1; i < dcinfo->at(2).size(); ++i)
49  {
50  str s(dcinfo->at(2).at(i));
51  if (s[0] != '#') calculator_version += s;
52  }
53  }
54  }
55  }
std::string str
Shorthand for a standard string.
Here is the caller graph for this function:

◆ get_gambit_version()

str Gambit::get_gambit_version ( )

Construct a string containing the full GAMBIT version information.

Definition at line 23 of file version.cpp.

References gambit_version_major, gambit_version_minor, gambit_version_patch, and gambit_version_revision.

Referenced by gambit_version().

24  {
25  std::ostringstream ss;
27  if (!gambit_version_patch.empty()) ss << "-" << gambit_version_patch;
28  return ss.str();
29  }
const int gambit_version_revision
Definition: version.hpp:41
const int gambit_version_minor
Definition: version.hpp:35
const int gambit_version_major
Definition: version.hpp:29
const str gambit_version_patch
Definition: version.hpp:47
Here is the caller graph for this function:

◆ get_screen_cols()

int Gambit::get_screen_cols ( )
inline

Definition at line 72 of file screen_print_utils.hpp.

References combine_hdf5::f.

Referenced by format_for_screen(), and Gambit::table_formatter::str().

73  {
74  int ret = -1;
75  if (FILE* f = popen("tput cols", "r"))
76  {
77  char buffer[1024];
78  int n;
79 
80  while ((n = fread(buffer, 1, sizeof buffer, f)) > 0)
81  {
82  std::stringstream ss(std::string(buffer, n));
83  if (! (ss >> ret))
84  {
85  ret = -1;
86  }
87  }
88 
89  pclose(f);
90  }
91 
92  return ret;
93  }
Here is the caller graph for this function:

◆ getVariadicMaxVector() [1/2]

int Gambit::getVariadicMaxVector ( )
inline

Definition at line 648 of file variadic_functions.hpp.

Referenced by getVariadicMaxVector().

648 {return 0;}
Here is the caller graph for this function:

◆ getVariadicMaxVector() [2/2]

template<typename T , typename... args>
int Gambit::getVariadicMaxVector ( const T &  in,
const args &...  params 
)
inline

Definition at line 651 of file variadic_functions.hpp.

References getVariadicMaxVector(), getVariadicVectorSize(), and combine_hdf5::N.

652  {
653  int N0 = getVariadicMaxVector(params...);
654  int N = getVariadicVectorSize(in);
655 
656  return (N > N0 && N0 != 0) ? N0 : N;
657  }
int getVariadicMaxVector(const T &in, const args &... params)
std::enable_if<!is_vector< T >::value, int >::type getVariadicVectorSize(const T &in)
Here is the call graph for this function:

◆ getVariadicNode() [1/3]

◆ getVariadicNode() [2/3]

const YAML::Node Gambit::getVariadicNode ( const YAML::Node &  node,
std::string  key 
)
inline

Definition at line 48 of file yaml_variadic_functions.hpp.

49  {
50  return node[key];
51  }

◆ getVariadicNode() [3/3]

template<typename... args>
const YAML::Node Gambit::getVariadicNode ( const YAML::Node &  node,
const std::string &  key,
const args &...  keys 
)
inline

Definition at line 54 of file yaml_variadic_functions.hpp.

References getVariadicNode().

55  {
56  if(not node[key]) return node[key];
57  else return getVariadicNode(node[key], keys...);
58  }
const YAML::Node getVariadicNode(const YAML::Node &node, const std::string &key, const args &... keys)
Here is the call graph for this function:

◆ getVariadicPt() [1/2]

template<typename ret >
ret Gambit::getVariadicPt ( unsigned int  i)
inline

Definition at line 678 of file variadic_functions.hpp.

679  {
680  return 0.0;
681  }

◆ getVariadicPt() [2/2]

template<typename t , typename ret = t, typename... args>
ret Gambit::getVariadicPt ( unsigned int  i,
const t &  in,
const args &...  params 
)
inline

Definition at line 684 of file variadic_functions.hpp.

685  {
686  return (i) ? getVariadicPt<ret>(i-1, params...) : in;
687  }

◆ getVariadicVectorSize() [1/2]

template<typename T >
std::enable_if<is_vector<T>::value, int>::type Gambit::getVariadicVectorSize ( const T &  in)
inline

Definition at line 642 of file variadic_functions.hpp.

Referenced by getVariadicMaxVector().

642 {return in.size();}
Here is the caller graph for this function:

◆ getVariadicVectorSize() [2/2]

template<typename T >
std::enable_if<!is_vector<T>::value, int>::type Gambit::getVariadicVectorSize ( const T &  in)
inline

Definition at line 646 of file variadic_functions.hpp.

646 {return 0;}

◆ ini_catch()

void Gambit::ini_catch ( std::exception &  e)

Catch initialisation exceptions.

Definition at line 29 of file ini_catch.cpp.

Referenced by add_equivrelation(), add_model(), add_parameter(), copy_parameters(), pass_default_to_backendinfo(), register_backend(), register_backend_functor(), register_function(), register_management_req(), register_model_functor(), register_model_functor_core(), register_module(), register_module_functor_core(), register_module_with_log(), and set_model_name().

30  {
31  std::cout << "GAMBIT has failed to initialise due to a fatal exception: " << e.what() << std::endl;
32  throw(e);
33  }
Here is the caller graph for this function:

◆ initialise_standalone_logs()

void Gambit::initialise_standalone_logs ( str  prefix)

Logger setup standalone utility function.

Definition at line 26 of file standalone_utils.cpp.

References Gambit::Utils::ensure_path_exists(), Gambit::Logging::LogMaster::initialise(), and logger().

Referenced by main().

27  {
28  // Make a logging object
29  std::map<std::string, std::string> loggerinfo;
30 
31  // Ensure that the desired output directory exists
33 
34  // Add entries to the loggerinfo map
35  loggerinfo["Default"] = prefix+"default.log";
36  loggerinfo["Debug"] = prefix+"debug.log";
37  loggerinfo["Warning"] = prefix+"warnings.log";
38  loggerinfo["Error"] = prefix+"errors.log";
39 
40  // Initialise global LogMaster object
41  logger().initialise(loggerinfo);
42  }
Logging::LogMaster & logger()
Function to retrieve a reference to the Gambit global log object.
Definition: logger.cpp:95
EXPORT_SYMBOLS const str & ensure_path_exists(const str &)
Ensure that a path exists (and then return the path, for chaining purposes)
void initialise(std::vector< std::pair< std::set< std::string >, std::string >> &)
Function to construct loggers according to blueprint.
Definition: logmaster.cpp:223
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSet() [1/4]

template<typename T >
std::set<T> Gambit::initSet ( std::set< T >  set)

Same as above, but for sets.

Definition at line 86 of file variadic_functions.hpp.

Referenced by Gambit::SpecBit::MSSMSpec< MI >::fill_getter_maps(), Gambit::SpecBit::MSSMSpec< MI >::fill_setter_maps(), and initSet().

87  {
88  return set;
89  }
Here is the caller graph for this function:

◆ initSet() [2/4]

template<typename T , typename... Args>
std::set<T> Gambit::initSet ( std::set< T >  set,
value,
Args...  args 
)

Definition at line 92 of file variadic_functions.hpp.

References initSet().

93  {
94  set.insert(value);
95  return initSet(set, args...);
96  }
std::set< T > initSet(T value, Args... args)
Here is the call graph for this function:

◆ initSet() [3/4]

template<typename T , typename U , typename... Args>
std::set<T> Gambit::initSet ( std::set< T >  set,
value,
Args...  args 
)

Definition at line 101 of file variadic_functions.hpp.

References initSet().

102  {
103  T value_converted = value;
104  set.insert(value_converted);
105  return initSet(set, args...);
106  }
std::set< T > initSet(T value, Args... args)
Here is the call graph for this function:

◆ initSet() [4/4]

template<typename T , typename... Args>
std::set<T> Gambit::initSet ( value,
Args...  args 
)

Definition at line 109 of file variadic_functions.hpp.

References initSet().

110  {
111  std::set<T> set;
112  set.insert(value);
113  set = initSet(set, args...);
114  return set;
115  }
std::set< T > initSet(T value, Args... args)
Here is the call graph for this function:

◆ initVector() [1/4]

◆ initVector() [2/4]

template<typename T , typename... Args>
std::vector<T> Gambit::initVector ( std::vector< T >  vector,
value,
Args...  args 
)

Definition at line 58 of file variadic_functions.hpp.

References initVector().

59  {
60  vector.push_back(value);
61  return initVector(vector, args...);
62  }
std::vector< T > initVector(T value, Args... args)
Here is the call graph for this function:

◆ initVector() [3/4]

template<typename T , typename U , typename... Args>
std::vector<T> Gambit::initVector ( std::vector< T >  vector,
value,
Args...  args 
)

Definition at line 67 of file variadic_functions.hpp.

References initVector().

68  {
69  T value_converted = value;
70  vector.push_back(value_converted);
71  return initVector(vector, args...);
72  }
std::vector< T > initVector(T value, Args... args)
Here is the call graph for this function:

◆ initVector() [4/4]

template<typename T , typename... Args>
std::vector<T> Gambit::initVector ( value,
Args...  args 
)

Definition at line 75 of file variadic_functions.hpp.

References initVector().

76  {
77  std::vector<T> vector;
78  vector.push_back(value);
79  vector = initVector(vector, args...);
80  return vector;
81  }
std::vector< T > initVector(T value, Args... args)
Here is the call graph for this function:

◆ inputVariadicFunction() [1/2]

template<typename T , typename... args>
double Gambit::inputVariadicFunction ( T &  ,
std::vector< double >::const_iterator  ,
std::vector< double >::const_iterator  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double  ,
double   
)
inline

Definition at line 615 of file variadic_functions.hpp.

Referenced by inputVariadicFunction().

617  {
618  std::cout << "inputVariadicFunction: Max argument length exceeded." << std::endl;
619  assert(0);
620  return 0.0;
621  }
Here is the caller graph for this function:

◆ inputVariadicFunction() [2/2]

template<typename T , typename... args>
double Gambit::inputVariadicFunction ( T &  f,
std::vector< double >::const_iterator  begin,
std::vector< double >::const_iterator  end,
const args &...  params 
)
inline

Definition at line 624 of file variadic_functions.hpp.

References combine_hdf5::f, and inputVariadicFunction().

625  {
626  if(begin != end)
627  {
628  return inputVariadicFunction(f, begin+1, end, params..., *begin);
629  }
630  else
631  {
632  return f(params...);
633  }
634  }
double inputVariadicFunction(T &f, std::vector< double >::const_iterator begin, std::vector< double >::const_iterator end, const args &... params)
Here is the call graph for this function:

◆ inputVariadicPt()

template<typename ret , typename t1 , typename... args>
auto Gambit::inputVariadicPt ( const unsigned int i,
const t1 &  val,
ret &  f,
const args &...  params 
) -> decltype(f(params...))

Definition at line 585 of file variadic_functions.hpp.

References combine_hdf5::f.

586  {
587  return inputVariadicPt_internal<0, sizeof...(args), sizeof...(args), decltype(f(params...))>::reducePt(f, i, val, params...);
588  }

◆ inputVariadicVector() [1/2]

void Gambit::inputVariadicVector ( std::vector< double >::iterator  )
inline

Definition at line 659 of file variadic_functions.hpp.

Referenced by inputVariadicVector().

659 {}
Here is the caller graph for this function:

◆ inputVariadicVector() [2/2]

template<typename... args>
void Gambit::inputVariadicVector ( std::vector< double >::iterator  vec,
const double val,
const args &...  params 
)
inline

Definition at line 662 of file variadic_functions.hpp.

References inputVariadicVector().

663  {
664  *vec = val;
665  inputVariadicVector(vec+1, params...);
666  }
void inputVariadicVector(std::vector< double >::iterator vec, const double &val, const args &... params)
Here is the call graph for this function:

◆ invalid_point()

invalid_point_exception & Gambit::invalid_point ( )

Invalid point exceptions.

Definition at line 83 of file standalone_error_handlers.cpp.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::DecayBit::all_decays(), Gambit::ColliderBit::calc_LHC_LogLikes(), Gambit::Piped_invalid_point::check(), Gambit::SpecBit::check_EW_stability_ScalarSingletDM_Z3(), Gambit::Spectrum::check_mass_cuts(), Gambit::SpecBit::check_perturb_MDM(), Gambit::SpecBit::check_perturb_min_lambda(), Gambit::DecayBit::check_width(), Gambit::DecayBit::compute_SM_higgs_decays(), Gambit::DarkBit::DarkSUSY_PointInit_MSSM(), Gambit::slhahelp::family_state_closest_to_mass_es(), Gambit::slhahelp::family_state_mix_matrix(), Gambit::SpecBit::FH_AllHiggsMasses(), Gambit::SpecBit::FH_Couplings(), Gambit::ColliderBit::FH_HiggsProd(), Gambit::SpecBit::FH_MSSMMasses(), Gambit::PrecisionBit::FH_PrecisionObs(), Gambit::SpecBit::find_non_perturb_scale_MDM(), Gambit::slhahelp::gauge_es_from_mass_es(), Gambit::SpecBit::get_DiracSingletDM_Z2_spectrum(), Gambit::SpecBit::get_MajoranaSingletDM_Z2_spectrum(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAfile(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAstruct(), Gambit::SpecBit::get_MSSM_spectrum_SPheno(), Gambit::SpecBit::get_ScalarSingletDM_Z3_spectrum(), Gambit::SpecBit::get_VectorSingletDM_Z2_spectrum(), Gambit::ColliderBit::getPythiaFileReader(), Gambit::PrecisionBit::GM2C_SUSY(), Gambit::DecayBit::integrate_cquad(), Gambit::slhahelp::mass_es_closest_to_family(), Gambit::slhahelp::mass_es_from_gauge_es(), Gambit::module_functor_common::notifyOfInvalidation(), Gambit::DarkBit::RD_oh2_DarkSUSY(), Gambit::DarkBit::RD_oh2_general(), Gambit::DecayBit::Ref_SM_Higgs_decays_table(), Gambit::SpecBit::run_FS_spectrum_generator(), Gambit::DarkBit::TH_ProcessCatalog_MSSM(), daFunk::throwError(), Gambit::PrecisionBit::update_H_masses(), and Gambit::PrecisionBit::update_W_masses().

84  {
85  static invalid_point_exception local;
86  return local;
87  }
Here is the caller graph for this function:

◆ is_abs()

bool Gambit::is_abs ( str s)

Helper function for checking if a particle or ratio has been requested as an absolute value.

Definition at line 160 of file spectrum.cpp.

Referenced by Gambit::Spectrum::check_mass_cuts().

161  {
162  if (s.at(0) != '|' or *s.rbegin() != '|') return false;
163  s = s.substr(1, s.size()-2);
164  return true;
165  }
Here is the caller graph for this function:

◆ logger()

Logging::LogMaster & Gambit::logger ( )

Function to retrieve a reference to the Gambit global log object.

Definition at line 95 of file logger.cpp.

Referenced by Gambit::DecayBit::all_decays_from_SLHA(), Gambit::SignalData::all_processes_ready(), Gambit::DarkBit::alt_erg_integrand(), Gambit::Printers::asciiReader::asciiReader(), Gambit::SignalData::attempt_soft_shutdown(), bail(), Gambit::gambit_core::bail(), Gambit::IniParser::Parser::basicParse(), Gambit::DRes::DependencyResolver::calcObsLike(), Gambit::module_functor< ModelParameters >::calculate(), Gambit::module_functor< void >::calculate(), Gambit::DarkBit::capture_rate_Sun_vnqn(), Gambit::SignalData::check_if_shutdown_begun(), Gambit::Printers::HDF5Printer::combine_output(), Gambit::Printers::HDF5Printer::combine_output_py(), Gambit::Printers::HDF5Printer::common_constructor(), Gambit::ColliderBit::copyEvent(), Gambit::Random::create_rng_engine(), Gambit::DarkBit::DarkSUSY_PointInit_LocalHalo_func(), Gambit::DarkBit::DarkSUSY_PointInit_MSSM(), Gambit::DarkBit::DD_couplings_DarkSUSY(), Gambit::DarkBit::DD_couplings_DiracSingletDM_Z2(), Gambit::DarkBit::DD_couplings_MajoranaSingletDM_Z2(), Gambit::DarkBit::DD_couplings_MicrOmegas(), Gambit::DarkBit::DD_couplings_VectorSingletDM_Z2(), Gambit::DRes::DependencyResolver::DependencyResolver(), Gambit::DecayBit::DiracSingletDM_Higgs_decays(), Gambit::DRes::DependencyResolver::doResolution(), Gambit::DarkBit::dump_GammaSpectrum(), Gambit::DRes::DependencyResolver::fillParQueue(), Gambit::Printers::HDF5Printer::finalise(), Gambit::Printers::HDF5Printer2::finalise(), Gambit::ColliderBit::generatePythia8Event(), Gambit::DRes::DependencyResolver::generateTree(), Gambit::Printers::HDF5Printer::get_highest_PPID_from_HDF5(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAfile(), Gambit::Printers::get_param_id(), Gambit::DarkBit::get_ScalarSingletDM_DD_couplings(), Gambit::DRes::DependencyResolver::getObsLikeOrder(), Gambit::ColliderBit::getPythiaFileReader(), Gambit::Printers::HDF5Printer2::HDF5Printer2(), initialise_standalone_logs(), Gambit::SignalData::inside_multithreaded_region(), Gambit::DarkBit::intersect_parabola_line(), Gambit::SpecBit::light_quark_test(), Gambit::DarkBit::lnL_CTAGC_gamLike(), Gambit::DarkBit::lnL_FermiGC_gamLike(), Gambit::DarkBit::lnL_FermiLATdwarfs_gamLike(), Gambit::DarkBit::lnL_HESSGC_gamLike(), Gambit::PrecisionBit::lnL_light_quark_masses_chi2(), Gambit::DarkBit::lnL_oh2_Simple(), Gambit::DarkBit::lnL_oh2_upperlimit(), Gambit::DarkBit::lnL_rho0_lognormal(), Gambit::DarkBit::lnL_sigmas_sigmal(), Gambit::DarkBit::lnL_v0_gaussian(), Gambit::DarkBit::lnL_vesc_gaussian(), Gambit::DarkBit::lnL_vrot_gaussian(), Gambit::exception::log_exception(), main(), Gambit::Likelihood_Container::main(), Gambit::DecayBit::MajoranaSingletDM_Higgs_decays(), Gambit::SpecBit::make_test_spectrum(), MSSM_mA_to_MSSM_mhud(), Gambit::MSSMea::MSSMea(), Gambit::Printers::HDF5::openFile(), Gambit::ColliderBit::operateLHCLoop(), Gambit::backend_functor< TYPE(*)(ARGS...), TYPE, ARGS... >::operator()(), Gambit::backend_functor< void(*)(ARGS...), void, ARGS... >::operator()(), Gambit::backend_functor< typename variadic_ptr< TYPE, ARGS... >::type, TYPE, ARGS... >::operator()(), Gambit::backend_functor< typename variadic_ptr< void, ARGS... >::type, void, ARGS... >::operator()(), Gambit::Printers::HDF5Printer::prepare_and_combine_tmp_files(), Gambit::module_functor< ModelParameters >::print(), Gambit::DarkBit::TH_Channel::printChannel(), Gambit::DRes::DependencyResolver::printFunctorEvalOrder(), Gambit::DRes::DependencyResolver::printFunctorList(), Gambit::DRes::DependencyResolver::printObsLike(), Gambit::gambit_core::process_primary_options(), Gambit::DarkBit::RD_fraction_leq_one(), Gambit::DarkBit::RD_fraction_one(), Gambit::DarkBit::RD_fraction_rescaled(), Gambit::DarkBit::RD_oh2_DarkSUSY(), Gambit::DarkBit::RD_oh2_general(), Gambit::DarkBit::RD_oh2_Xf_MicrOmegas(), Gambit::DRes::DependencyResolver::resolveDependencyFromRules(), Gambit::DRes::DependencyResolver::resolveRequirement(), Gambit::DRes::DependencyResolver::resolveVertexBackend(), Gambit::gambit_core::run_diagnostic(), set_signal_handler(), Gambit::Likelihood_Container::setParameters(), Gambit::ColliderBit::smearEventATLAS(), Gambit::ColliderBit::smearEventATLASnoeff(), Gambit::ColliderBit::smearEventCMS(), Gambit::ColliderBit::smearEventCMSnoeff(), Gambit::SpecBit::specbit_test_func3(), Gambit::SpecBit::specbit_test_show_SMInputs(), Gambit::SpecBit::specbit_test_Spectrum(), Gambit::Printers::SQLitePrinter::SQLitePrinter(), Gambit::SpecBit::test_Singlet_spectrum(), Gambit::DarkBit::UnitTest_DarkBit(), Gambit::SignalData::update_looptime(), Gambit::DecayBit::VectorSingletDM_Higgs_decays(), and Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::VertexBufferNumeric1D_HDF5().

96  {
97  // I assume that these being static, the constructor for x will only get called once.
98  // With the LogMaster constructed last out of these object, it should be destructed first, thus the other objects should be available for use in the LogMaster destructor.
99  static Logging::ensure_construction_order x;
100  static Logging::LogMaster global_log;
101  return global_log;
102  }
Here is the caller graph for this function:

◆ logging_error()

error & Gambit::logging_error ( )

Logging errors.

Definition at line 55 of file standalone_error_handlers.cpp.

References Gambit::LogTags::logs.

Referenced by Gambit::Logging::LogMaster::initialise().

56  {
57  static error local("A problem has occurred in the logging utilities.","logging_error", logs);
58  return local;
59  }
Here is the caller graph for this function:

◆ logging_warning()

warning & Gambit::logging_warning ( )

Logging warnings.

Definition at line 62 of file standalone_error_handlers.cpp.

References Gambit::LogTags::logs.

63  {
64  static warning local("A problem has occurred in the logging utilities.","logging_warning", logs);
65  return local;
66  }

◆ model_error()

◆ model_warning()

warning & Gambit::model_warning ( )

Model warnings.

Definition at line 76 of file standalone_error_handlers.cpp.

References Gambit::LogTags::models.

Referenced by main().

77  {
78  static warning local("A problem has been encountered in the model subsystem.","model_warning", models);
79  return local;
80  }
Here is the caller graph for this function:

◆ MSSM20atX_to_MSSM25atX()

void Gambit::MSSM20atX_to_MSSM25atX ( const ModelParameters myP,
ModelParameters targetP 
)

Definition at line 61 of file MSSM20atX.cpp.

References Gambit::ModelParameters::setValue(), and Gambit::ModelParameters::setValues().

62  {
63  // Send all parameter values upstream to matching parameters in parent.
64  // Ignore that some parameters don't exist in the parent, these are set below.
65  targetP.setValues(myP,false);
66 
67  // RH squark soft masses, gen 1 and 2
68  targetP.setValue("mq2_1", myP["mq2_12"] ); // mq2_11 in MSSM63
69  targetP.setValue("mq2_2", myP["mq2_12"] ); // mq2_22 " "
70  // RH slepton soft masses, gen 1 and 2
71  targetP.setValue("ml2_1", myP["ml2_12"] ); // ml2_11 in MSSM63
72  targetP.setValue("ml2_2", myP["ml2_12"] ); // ml2_22 " "
73  // LH down-type squark soft masses
74  targetP.setValue("md2_1", myP["md2_12"] ); // ml2_11 in MSSM63
75  targetP.setValue("md2_2", myP["md2_12"] ); // ml2_22 " "
76  // LH up-type squark soft masses
77  targetP.setValue("mu2_1", myP["mu2_12"] ); // mu2_11 in MSSM63
78  targetP.setValue("mu2_2", myP["mu2_12"] ); // mu2_22 " "
79  // LH charged slepton soft masses
80  targetP.setValue("me2_1", myP["me2_12"] ); // me2_11 in MSSM63
81  targetP.setValue("me2_2", myP["me2_12"] ); // me2_22 " "
82  // Done
83  }
Here is the call graph for this function:

◆ MSSM25atX_to_MSSM30atX()

void Gambit::MSSM25atX_to_MSSM30atX ( const ModelParameters myP,
ModelParameters targetP 
)

Definition at line 46 of file MSSM25atX.cpp.

References Gambit::ModelParameters::setValue(), and Gambit::ModelParameters::setValues().

47  {
48  // Copy all the common parameters of MSSM25atQ into MSSM30atQ
49  targetP.setValues(myP,false);
50 
51  // Manually set the parameters which differ
52  // slepton trilinear couplings
53  // Off-diagonal elements set to zero by parent model
54  // First and second generation elements set equal
55  targetP.setValue("Ae_1", myP["Ae_12"] ); // Ae2_11 in MSSM63
56  targetP.setValue("Ae_2", myP["Ae_12"] ); // Ae2_22 " "
57  //targetP.setValue("Ae_3", myP["Ae_3"] ); // Ae2_33 // Taken care of by common parameter copy
58 
59  // down-type trilinear couplings
60  // Off-diagonal elements set to zero by parent model
61  // First and second generation to zero
62  targetP.setValue("Ad_1", 0. ); // Ad2_11 in MSSM63
63  targetP.setValue("Ad_2", 0. ); // Ad2_22 " "
64  //targetP.setValue("Ad_3", myP["Ad_3"] ); // Ad2_33 // Taken care of by common parameter copy
65 
66  // up-type trilinear couplings
67  // Off-diagonal elements set to zero by parent model
68  // First and second generation set to zero
69  targetP.setValue("Au_1", 0. ); // Au2_11 in MSSM63
70  targetP.setValue("Au_2", 0. ); // Au2_22 " "
71  // targetP.setValue("Au_3", myP["Au_3"] ); // Au2_33 // Taken care of by common parameter copy
72 
73  // Done
74  }
Here is the call graph for this function:

◆ MSSM30atX_to_MSSM63atX()

void Gambit::MSSM30atX_to_MSSM63atX ( const ModelParameters myP,
ModelParameters targetP 
)

Definition at line 66 of file MSSM30atX.cpp.

References Gambit::ModelParameters::setValue(), and Gambit::ModelParameters::setValues().

67  {
68 
69  // Copy all common parameters of MSSM30atX into MSSM63atX
70  targetP.setValues(myP,false);
71 
72  // Manually set parameters that differ
73 
74  // RH squark soft masses
75  // Off-diagonal elements set to zero
76  // Only upper diagonal needed (symmetric)
77  targetP.setValue("mq2_11", myP["mq2_1"] );
78  targetP.setValue("mq2_12", 0. );
79  targetP.setValue("mq2_13", 0. );
80 
81  //targetP.setValue("mq2_21", 0. );
82  targetP.setValue("mq2_22", myP["mq2_2"] );
83  targetP.setValue("mq2_23", 0. );
84 
85  //targetP.setValue("mq2_31", 0. );
86  //targetP.setValue("mq2_32", 0. );
87  targetP.setValue("mq2_33", myP["mq2_2"] );
88 
89  // RH slepton soft masses
90  // Off-diagonal elements set to zero
91  // Only upper diagonal needed (symmetric)
92  targetP.setValue("ml2_11", myP["ml2_1"] );
93  targetP.setValue("ml2_12", 0. );
94  targetP.setValue("ml2_13", 0. );
95 
96  //targetP.setValue("ml2_21", 0. );
97  targetP.setValue("ml2_22", myP["ml2_2"] );
98  targetP.setValue("ml2_23", 0. );
99 
100  //targetP.setValue("ml2_31", 0. );
101  //targetP.setValue("ml2_32", 0. );
102  targetP.setValue("ml2_33", myP["ml2_3"] );
103 
104  // LH down-type slepton soft masses
105  // Off-diagonal elements set to zero
106  // Only upper diagonal needed (symmetric)
107  targetP.setValue("md2_11", myP["md2_1"] );
108  targetP.setValue("md2_12", 0. );
109  targetP.setValue("md2_13", 0. );
110 
111  //targetP.setValue("md2_21", 0. );
112  targetP.setValue("md2_22", myP["md2_2"] );
113  targetP.setValue("md2_23", 0. );
114 
115  //targetP.setValue("md2_31", 0. );
116  //targetP.setValue("md2_32", 0. );
117  targetP.setValue("md2_33", myP["md2_3"] );
118 
119  // LH up-type slepton soft masses
120  // Off-diagonal elements set to zero
121  // Only upper diagonal needed (symmetric)
122  targetP.setValue("mu2_11", myP["mu2_1"] );
123  targetP.setValue("mu2_12", 0. );
124  targetP.setValue("mu2_13", 0. );
125 
126  //targetP.setValue("mu2_21", 0. );
127  targetP.setValue("mu2_22", myP["mu2_2"] );
128  targetP.setValue("mu2_23", 0. );
129 
130  //targetP.setValue("mu2_31", 0. );
131  //targetP.setValue("mu2_32", 0. );
132  targetP.setValue("mu2_33", myP["mu2_3"] );
133 
134  // LH charged slepton soft masses
135  // Off-diagonal elements set to zero
136  // Only upper diagonal needed (symmetric)
137  targetP.setValue("me2_11", myP["me2_1"] );
138  targetP.setValue("me2_12", 0. );
139  targetP.setValue("me2_13", 0. );
140 
141  //targetP.setValue("me2_21", 0. );
142  targetP.setValue("me2_22", myP["me2_2"] );
143  targetP.setValue("me2_23", 0. );
144 
145  //targetP.setValue("me2_31", 0. );
146  //targetP.setValue("me2_32", 0. );
147  targetP.setValue("me2_33", myP["me2_3"] );
148 
149  // slepton trilinear couplings
150  // Off-diagonal elements set to zero
151  targetP.setValue("Ae_11", myP["Ae_1"] );
152  targetP.setValue("Ae_12", 0. );
153  targetP.setValue("Ae_13", 0. );
154 
155  targetP.setValue("Ae_21", 0. );
156  targetP.setValue("Ae_22", myP["Ae_2"] );
157  targetP.setValue("Ae_23", 0. );
158 
159  targetP.setValue("Ae_31", 0. );
160  targetP.setValue("Ae_32", 0. );
161  targetP.setValue("Ae_33", myP["Ae_3"] );
162 
163  // down-type trilinear couplings
164  // Off-diagonal elements set to zero
165  // First and second generation to zero
166  targetP.setValue("Ad_11", myP["Ad_1"] );
167  targetP.setValue("Ad_12", 0. );
168  targetP.setValue("Ad_13", 0. );
169 
170  targetP.setValue("Ad_21", 0. );
171  targetP.setValue("Ad_22", myP["Ad_2"] );
172  targetP.setValue("Ad_23", 0. );
173 
174  targetP.setValue("Ad_31", 0. );
175  targetP.setValue("Ad_32", 0. );
176  targetP.setValue("Ad_33", myP["Ad_3"] );
177 
178  // up-type trilinear couplings
179  // Off-diagonal elements set to zero
180  // First and second generation set to zero
181  targetP.setValue("Au_11", myP["Au_1"] );
182  targetP.setValue("Au_12", 0. );
183  targetP.setValue("Au_13", 0. );
184 
185  targetP.setValue("Au_21", 0. );
186  targetP.setValue("Au_22", myP["Au_2"] );
187  targetP.setValue("Au_23", 0. );
188 
189  targetP.setValue("Au_31", 0. );
190  targetP.setValue("Au_32", 0. );
191  targetP.setValue("Au_33", myP["Au_3"] );
192 
193  // Done!
194  }
Here is the call graph for this function:

◆ MSSM_mA_to_MSSM_mhud()

void Gambit::MSSM_mA_to_MSSM_mhud ( const ModelParameters myP,
ModelParameters targetP,
const SubSpectrum HE 
)

Definition at line 48 of file MSSM63atX_mA.cpp.

References EOM, Gambit::SubSpectrum::get(), Gambit::SubSpectrum::has(), Gambit::LogTags::info, LOCAL_INFO, logger(), Gambit::Par::mass2, model_error(), PARENT, Gambit::ModelParameters::setValue(), Gambit::ModelParameters::setValues(), sgn(), unimproved_MSSM_spectrum, and USE_MODEL_PIPE.

49  {
50  // Copy all the common parameters of MSSM63at<X>_mA into MSSM63at<X>
51  targetP.setValues(myP,false); // Set "missing_is_error" flag to false since e.g. mA parameter from MSSM63atQ_mA does not exist in MSSM63atQ. Similar for variants at other scales.
52 
53  // Set the sign of mu
54  targetP.setValue("SignMu", Gambit::sgn(myP["mu"]));
55 
56  // Now only the "mHu2" and "mHd2" parameters are left unset. Extract these from the Spectrum object dependency.
57  // Make sure the high-scale value was correctly added to the spectrum wrapper object
58  if (HE.has(Par::mass2,"mHu2") and HE.has(Par::mass2,"mHd2"))
59  {
60  targetP.setValue("mHu2", HE.get(Par::mass2,"mHu2"));
61  targetP.setValue("mHd2", HE.get(Par::mass2,"mHd2"));
62  }
63  else
64  {
65  model_error().raise(LOCAL_INFO,"Parameter with name 'mHu2' or 'mHd2' (type Par::mass2) not found in Spectrum object! "
66  "Translation from MSSM<X>_mA to MSSM<X> is not possible without this value. "
67  "Please use a Spectrum wrapper that provides it.");
68  }
69 
70  }
#define LOCAL_INFO
Definition: local_info.hpp:34
int sgn(T val)
error & model_error()
Model errors.
Here is the call graph for this function:

◆ MSSMatX_to_MSSMatQ()

void Gambit::MSSMatX_to_MSSMatQ ( const ModelParameters myP,
ModelParameters targetP,
const SubSpectrum HE 
)

Definition at line 44 of file MSSM63atX.cpp.

References Gambit::SubSpectrum::get(), Gambit::SubSpectrum::has(), LOCAL_INFO, Gambit::Par::mass1, model_error(), Gambit::ModelParameters::setValue(), and Gambit::ModelParameters::setValues().

45  {
46  // Copy all the parameters of MSSM63atMGUT into MSSM63atQ
47  targetP.setValues(myP);
48 
49  // Now only the "Qin" parameter is left unset. Need to extract this from the Spectrum object dependency.
50  // Make sure the high-scale value was correctly added to the spectrum wrapper object
51  if( HE.has(Par::mass1,"high_scale") )
52  {
53  targetP.setValue("Qin", HE.get(Par::mass1,"high_scale") );
54  }
55  else
56  {
57  model_error().raise(LOCAL_INFO,"Parameter with name 'high_scale' (type Par::mass1) not found in Spectrum object! Translation from MSSM63at<X> to MSSM63atQ is not possible without this value. Please use a Spectrum wrapper which provides it.");
58  }
59  // Done!
60  }
#define LOCAL_INFO
Definition: local_info.hpp:34
error & model_error()
Model errors.
Here is the call graph for this function:

◆ operator!=()

template<typename T >
bool Gambit::operator!= ( const SafeBool lhs,
const T &   
)

Definition at line 48 of file safebool.hpp.

References Gambit::SafeBool::this_type_does_not_support_comparisons().

48  {
49  lhs.this_type_does_not_support_comparisons();
50  return false;
51  }
Here is the call graph for this function:

◆ operator<<() [1/6]

template<class Type1 , class Type2 >
std::ostream& Gambit::operator<< ( std::ostream &  os,
const std::pair< Type1, Type2 > &  p 
)
inline

Stream overload for pairs of any type that already has << defined.

Definition at line 40 of file stream_overloads.hpp.

41  {
42  os << "( " << p.first << ", " << p.second << ")";
43  return os;
44  }

◆ operator<<() [2/6]

template<class Type >
std::ostream& Gambit::operator<< ( std::ostream &  os,
const std::set< Type > &  set 
)
inline

Stream overload for sets of any type that already has << defined.

Definition at line 48 of file stream_overloads.hpp.

49  {
50  os << "{";
51  int length = set.size();
52  if (length != 0)
53  {
54  typename std::set<Type>::const_iterator it, start, finish;
55  start = set.begin();
56  finish = set.end();
57  os << *start;
58  if (length != 1)
59  {
60  for (it = ++start; it != finish; it++) { os << ", " << *it; }
61  }
62  }
63  os << "}";
64  return os;
65  }

◆ operator<<() [3/6]

template<class Type >
std::ostream& Gambit::operator<< ( std::ostream &  os,
const std::vector< Type > &  v 
)
inline

Stream overload for vectors of any type that already has << defined.

Definition at line 69 of file stream_overloads.hpp.

70  {
71  os << "[";
72  int length = v.size();
73  if (length != 0)
74  {
75  typename std::vector<Type>::const_iterator it, start, finish;
76  start = v.begin();
77  finish = v.end();
78  os << *start;
79  if (length != 1)
80  {
81  for (it = ++start; it != finish; it++) { os << ", " << *it; }
82  }
83  }
84  os << " ]";
85  return os;
86  }

◆ operator<<() [4/6]

YAML::Emitter & Gambit::operator<< ( YAML::Emitter &  out,
const capability_info info 
)

Emitter for the capability_info struct.

Definition at line 37 of file yaml_description_database.cpp.

References Gambit::capability_info::beset, Gambit::capability_info::description, Gambit::capability_info::modset, and Gambit::capability_info::name.

38  {
39  std::vector< std::pair<str, std::map<str, std::set<std::pair<str,str> > > > > origins;
40  origins.push_back(std::pair<str, std::map<str, std::set<std::pair<str,str> > > >("modules", info.modset));
41  origins.push_back(std::pair<str, std::map<str, std::set<std::pair<str,str> > > >("backends", info.beset));
42  out << YAML::BeginMap;
43  out << YAML::Key << "name" << YAML::Value << info.name;
44  out << YAML::Key << "description";
45  out << YAML::Literal << info.description; // Long string format
46  for (std::vector< std::pair<str, std::map<str, std::set<std::pair<str,str> > > > >::const_iterator it = origins.begin(); it != origins.end(); ++it)
47  {
48  out << YAML::Key << it->first << YAML::Value << YAML::BeginSeq;
49  for (std::map<str, std::set<std::pair<str,str> > >::const_iterator jt = it->second.begin(); jt != it->second.end(); ++jt)
50  {
51  out << YAML::BeginMap << YAML::Key << jt->first << YAML::Value << YAML::BeginSeq;
52  for (std::set<std::pair<str,str> >::const_iterator kt = jt->second.begin(); kt != jt->second.end(); ++kt)
53  {
54  out << YAML::BeginMap << YAML::Key << kt->first << YAML::Value << kt->second << YAML::EndMap;
55  }
56  out << YAML::EndSeq << YAML::EndMap;
57  }
58  out << YAML::EndSeq;
59  }
60  out << YAML::EndMap;
61  out << YAML::Newline;
62  return out;
63  }
std::string str
Shorthand for a standard string.

◆ operator<<() [5/6]

YAML::Emitter & Gambit::operator<< ( YAML::Emitter &  out,
const model_info info 
)

Emitter for the model_info struct.

Definition at line 66 of file yaml_description_database.cpp.

References Gambit::model_info::descendants, Gambit::model_info::description, Gambit::model_info::lineage, Gambit::model_info::name, Gambit::model_info::nparams, Gambit::model_info::parameters, and Gambit::model_info::parent.

67  {
68  out << YAML::BeginMap;
69  out << YAML::Key << "name" << YAML::Value << info.name;
70  out << YAML::Key << "nparams" << YAML::Value << info.nparams;
71  out << YAML::Key << "parameters"<< YAML::Value << YAML::BeginSeq;
72  for (std::vector<std::string>::const_iterator jt = info.parameters.begin(); jt != info.parameters.end(); ++jt)
73  {
74  out << *jt;
75  }
76  out << YAML::EndSeq;
77  out << YAML::Key << "parent" << YAML::Value << info.parent;
78  out << YAML::Key << "lineage" << YAML::Value << YAML::BeginSeq;
79  for (std::vector<std::string>::const_iterator jt = info.lineage.begin(); jt !=info.lineage.end(); ++jt)
80  {
81  out << *jt;
82  }
83  out << YAML::EndSeq;
84  out << YAML::Key << "descendants" << YAML::Value << YAML::BeginSeq;
85  for (std::vector<std::string>::const_iterator jt = info.descendants.begin(); jt !=info.descendants.end(); ++jt)
86  {
87  out << *jt;
88  }
89  out << YAML::EndSeq;
90  out << YAML::Key << "description";
91  out << YAML::Literal << info.description; // Long string format
92  out << YAML::EndMap;
93  out << YAML::Newline;
94  return out;
95  }

◆ operator<<() [6/6]

template<class Type >
std::ostream& Gambit::operator<< ( std::ostream &  os,
const std::map< std::string, Type > &  map 
)

Stream overload for map from string to any type that already has << defined.

Definition at line 90 of file stream_overloads.hpp.

References spacing().

91  {
92  unsigned int maxlen = 0;
93 
94  for (auto it = map.begin(); it != map.end(); it++)
95  {
96  if ((*it).first.length() > maxlen) maxlen = (*it).first.length();
97  }
98 
99  for (auto it = map.begin(); it != map.end(); it++)
100  {
101  if (it != map.begin()) {os << std::endl;}
102  os << " " << (*it).first << spacing((*it).first.length(), maxlen) << "(" << (*it).second << ")";
103  }
104 
105  return os;
106  }
std::string spacing(int, int)
Spacing utility for stream overloads.
Here is the call graph for this function:

◆ operator==()

template<typename T >
bool Gambit::operator== ( const SafeBool lhs,
const T &   
)

Definition at line 53 of file safebool.hpp.

References Gambit::SafeBool::this_type_does_not_support_comparisons().

53  {
54  lhs.this_type_does_not_support_comparisons();
55  return false;
56  }
Here is the call graph for this function:

◆ orderer()

bool Gambit::orderer ( std::pair< int, double a,
std::pair< int, double b 
)

Helper function for sorting int, double pairs according to the double.

Definition at line 36 of file MSSMSimpleSpec.cpp.

Referenced by Gambit::MSSMea::MSSMea().

36 { return a.second < b.second; }
Here is the caller graph for this function:

◆ outputVariadicVector() [1/2]

void Gambit::outputVariadicVector ( std::vector< double >::const_iterator  )
inline

Definition at line 668 of file variadic_functions.hpp.

Referenced by outputVariadicVector().

668 {}
Here is the caller graph for this function:

◆ outputVariadicVector() [2/2]

template<typename... args>
void Gambit::outputVariadicVector ( std::vector< double >::const_iterator  vec,
double val,
args &...  params 
)
inline

Definition at line 671 of file variadic_functions.hpp.

References outputVariadicVector(), and daFunk::vec().

672  {
673  val = *vec;
674  outputVariadicVector(vec+1, params...);
675  }
void outputVariadicVector(std::vector< double >::const_iterator vec, double &val, args &... params)
std::vector< T > vec(std::vector< T > vector)
Definition: daFunk.hpp:142
Here is the call graph for this function:

◆ pass_default_to_backendinfo()

int Gambit::pass_default_to_backendinfo ( str  be,
str  def 
)

Helper function for passing default backend information at initialisation.

Definition at line 55 of file ini_functions.cpp.

References Gambit::LogTags::def, and ini_catch().

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  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ piped_errors()

Piped_exceptions Gambit::piped_errors ( 1000  )

Global instance of Piped_exceptions class for errors.

◆ piped_warnings()

Piped_exceptions Gambit::piped_warnings ( 1000  )

Global instance of Piped_exceptions class for warnings.

◆ print_to_screen()

void Gambit::print_to_screen ( const std::string &  file_in,
const std::string &  name 
)

Definition at line 205 of file screen_print_utils.cpp.

References Gambit::LogTags::err, Gambit::Printers::HDF5::file, format_for_screen(), LOCAL_INFO, and utils_error().

Referenced by Gambit::gambit_core::backend_diagnostic(), Gambit::gambit_core::capability_diagnostic(), Gambit::gambit_core::ff_backend_diagnostic(), Gambit::gambit_core::ff_capability_diagnostic(), Gambit::gambit_core::ff_model_diagnostic(), Gambit::gambit_core::ff_module_diagnostic(), ff_prior_diagnostic(), Gambit::gambit_core::ff_prior_diagnostic(), ff_scanner_diagnostic(), Gambit::gambit_core::ff_scanner_diagnostic(), ff_test_function_diagnostic(), Gambit::gambit_core::ff_test_function_diagnostic(), Gambit::gambit_core::model_diagnostic(), Gambit::gambit_core::module_diagnostic(), Gambit::Scanner::Plugins::Plugin_Loader::print_all_to_screen(), Gambit::Scanner::Plugins::Plugin_Loader::print_plugin_to_screen(), prior_diagnostic(), Gambit::gambit_core::prior_diagnostic(), scanner_diagnostic(), Gambit::gambit_core::scanner_diagnostic(), test_function_diagnostic(), and Gambit::gambit_core::test_function_diagnostic().

206  {
208  char temp_file[20] = "_gambit_temp_XXXXXX";
209  int err = mkstemp(temp_file);
210  if (err == -1) utils_error().raise(LOCAL_INFO, "Error returned from mkstemp.");
211  std::ofstream out(temp_file);
212  out << file << std::flush;
213  if (std::system("command -v less >/dev/null"))
214  {
215  err = std::system((std::string("more -d ") + std::string(temp_file)).c_str());
216  if (err) utils_error().raise(LOCAL_INFO, "Error returned from call to more.");
217  }
218  else
219  {
220  err = std::system((std::string("less -S -R -P\"Gambit diagnostic ") + name + std::string(" line %l (press h for help or q to quit)\" ") + std::string(temp_file)).c_str());
221  if (err) utils_error().raise(LOCAL_INFO, "Error returned from call to less.");
222  }
223  err = std::system(("rm -f " + std::string(temp_file) + " >/dev/null").c_str());
224  if (err) utils_error().raise(LOCAL_INFO, "Error returned from attempt to remove temp file.");
225  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
std::string format_for_screen(const std::string &input_string)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_SLHA()

SLHAstruct Gambit::read_SLHA ( str  slha)

Read an SLHA file in to an SLHAea object with some error-checking.

Definition at line 29 of file slhaea_helpers.cpp.

References Gambit::LogTags::err, LOCAL_INFO, and utils_error().

Referenced by QUICK_FUNCTION(), and spectrum_from_SLHA().

30  {
31  SLHAstruct slhaea;
32  std::ifstream ifs(slha.c_str());
33  if (!ifs.good())
34  {
35  std::ostringstream err;
36  err << "ERROR: SLHA file " << slha << " not found.";
37  utils_error().raise(LOCAL_INFO,err.str());
38  }
39  ifs >> slhaea;
40  ifs.close();
41  return slhaea;
42  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
SLHAea::Coll SLHAstruct
Less confusing name for SLHAea container class.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ register_backend()

int Gambit::register_backend ( str  be,
str  ver 
)

Register a backend with the Core.

Definition at line 62 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerBackend().

63  {
64  try
65  {
66  Core().registerBackend(be, ver);
67  }
68  catch (std::exception& e) { ini_catch(e); }
69  return 0;
70  }
gambit_core & Core()
Core accessor function.
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
void registerBackend(str, str)
Register a new backend.
Definition: core.cpp:225
Here is the call graph for this function:

◆ register_backend_functor()

int Gambit::register_backend_functor ( functor f)

Register a backend functor with the Core.

Definition at line 73 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerBackendFunctor().

74  {
75  try
76  {
78  }
79  catch (std::exception& e) { ini_catch(e); }
80  return 0;
81  }
gambit_core & Core()
Core accessor function.
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
void registerBackendFunctor(functor &)
Add a new backend functor to backendFunctorList.
Definition: core.cpp:218
Here is the call graph for this function:

◆ register_function()

int Gambit::register_function ( module_functor_common f,
bool  can_manage,
safe_ptr< bool > *  done,
std::map< str, str > &  iCanDo,
std::map< str, bool(*)()> &  map,
bool(&)()  provides,
safe_ptr< Options > &  opts 
)

Register a function with a module.

Definition at line 138 of file ini_functions.cpp.

References Gambit::functor::capability(), Gambit::functor::getOptions(), ini_catch(), Gambit::module_functor_common::loopIsDone(), Gambit::functor::name(), Gambit::module_functor_common::setCanBeLoopManager(), and Gambit::functor::type().

140  {
141  try
142  {
143  if (can_manage)
144  {
145  f.setCanBeLoopManager(true);
146  *done = f.loopIsDone();
147  }
148  map[f.capability()] = &provides;
149  iCanDo[f.name()] = f.type();
150  opts = f.getOptions();
151  }
152  catch (std::exception& e) { ini_catch(e); }
153  return 0;
154  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ register_management_req()

int Gambit::register_management_req ( module_functor_common f)

Register a loop management requirement with the Core.

Definition at line 84 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerNestedModuleFunctor().

85  {
86  try
87  {
89  }
90  catch (std::exception& e) { ini_catch(e); }
91  return 0;
92  }
gambit_core & Core()
Core accessor function.
void registerNestedModuleFunctor(functor &)
Add a new module functor to nestFunctorList.
Definition: core.cpp:215
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ register_model_functor()

int Gambit::register_model_functor ( std::map< str, bool(*)()>  map_bools,
std::map< str, str iCanDo,
bool(*)()  provides_function,
str  function,
str  capability 
)

Register a model functor.

Definition at line 111 of file ini_functions.cpp.

References ini_catch().

113  {
114  try
115  {
116  map_bools[capability] = provides_function;
117  iCanDo[function] = "ModelParameters";
118  }
119  catch (std::exception& e) { ini_catch(e); }
120  return 0;
121  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ register_model_functor_core()

int Gambit::register_model_functor_core ( primary_model_functor primary_parameters)

Register a model functor with the Core.

Definition at line 51 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerPrimaryModelFunctor().

52  {
53  try
54  {
55  Core().registerPrimaryModelFunctor(primary_parameters);
56  }
57  catch (std::exception& e) { ini_catch(e); }
58  return 0;
59  }
gambit_core & Core()
Core accessor function.
void registerPrimaryModelFunctor(primary_model_functor &)
Add a new primary model functor to primaryModelFunctorList.
Definition: core.cpp:228
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ register_module()

int Gambit::register_module ( str  module)

Register a module with the Core.

Definition at line 29 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerModule().

30  {
31  try
32  {
33  Core().registerModule(module);
34  }
35  catch (std::exception& e) { ini_catch(e); }
36  return 0;
37  }
gambit_core & Core()
Core accessor function.
void registerModule(str)
Add a new module to modules list.
Definition: core.cpp:205
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ register_module_functor_core()

int Gambit::register_module_functor_core ( module_functor_common f)

Register a module functor with the Core.

Definition at line 40 of file ini_functions.cpp.

References Core(), ini_catch(), and Gambit::gambit_core::registerModuleFunctor().

41  {
42  try
43  {
45  }
46  catch (std::exception& e) { ini_catch(e); }
47  return 0;
48  }
gambit_core & Core()
Core accessor function.
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
void registerModuleFunctor(functor &)
Add a new module functor to functorList.
Definition: core.cpp:208
Here is the call graph for this function:

◆ register_module_with_log()

int Gambit::register_module_with_log ( str  module)

Create a log tag for a new module.

Definition at line 124 of file ini_functions.cpp.

References Gambit::Logging::components(), Gambit::Logging::getfreetag(), ini_catch(), and Gambit::Logging::tag2str().

125  {
126  int mytag;
127  try
128  {
129  mytag = Logging::getfreetag();
130  Logging::tag2str()[mytag] = module;
131  Logging::components().insert(mytag);
132  }
133  catch (std::exception& e) { ini_catch(e); }
134  return mytag;
135  }
std::map< int, std::string > & tag2str()
Definition: logging.cpp:130
int getfreetag()
Definition: logging.cpp:138
std::set< int > & components()
Definition: logging.cpp:81
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ rmVariadicPt() [1/2]

template<typename ret >
double Gambit::rmVariadicPt ( const unsigned int i,
ret &  f 
)

Definition at line 492 of file variadic_functions.hpp.

493  {
494  std::cout << "rmVariadicPt: need at least one argument" << std::endl;
495  assert(0);
496  return 0.0;
497  }

◆ rmVariadicPt() [2/2]

template<typename ret , typename T , typename... args>
auto Gambit::rmVariadicPt ( const unsigned int i,
ret &  f,
const T &  in,
const args &...  params 
) -> decltype(f(params...))

Definition at line 500 of file variadic_functions.hpp.

References combine_hdf5::f.

501  {
502  return rmVariadicPt_internal<0, sizeof...(args)+1, sizeof...(args)+1, decltype(f(params...))>::reducePt(f, i, in, params...);
503  }

◆ separate_line()

std::string Gambit::separate_line ( std::string &  line,
std::string::size_type  indent,
std::string::size_type  cols_pos 
)
inline

Definition at line 99 of file screen_print_utils.hpp.

Referenced by format_for_screen(), and wrap_lines().

100  {
101  std::string sub_line;
102  std::string::size_type end_pos = 0;
103  std::string::size_type end_pos_b = line.find_last_of(" ", cols_pos);
104  if (end_pos_b != std::string::npos)
105  end_pos_b = line.find_last_not_of(" ", end_pos_b);
106  std::string::size_type end_pos_a = line.find_last_of("!.?;:,$#", cols_pos-1);
107  std::string::size_type end_pos_ab = line.find_last_of("/-+=()[]{}*@&^%\\", cols_pos);
108  if (end_pos_ab == cols_pos) end_pos_ab--;
109 
110  if (end_pos_b != std::string::npos && end_pos_b > end_pos)
111  {
112  end_pos = end_pos_b;
113  }
114  if (end_pos_ab != std::string::npos && end_pos_ab > end_pos)
115  {
116  end_pos = end_pos_ab;
117  }
118  if (end_pos_a != std::string::npos && end_pos_a > end_pos)
119  {
120  end_pos = end_pos_a;
121  }
122  if (end_pos == 0 || end_pos == std::string::npos)
123  end_pos = cols_pos;
124  else
125  end_pos++;
126 
127  sub_line = line.substr(0, end_pos);
128  line = std::string(indent, ' ') + line.substr(line.find_first_not_of(" ", end_pos));
129 
130  return sub_line;
131  }
Here is the caller graph for this function:

◆ set_model_name()

int Gambit::set_model_name ( model_functor primary_parameters,
str  model_name 
)

Set the model name in a primary model functor.

Set model name string in a primary model functor.

Definition at line 88 of file ini_functions.cpp.

References ini_catch(), and Gambit::model_functor::setModelName().

89  {
90  try
91  {
92  primary_parameters.setModelName(model_name);
93  }
94  catch (std::exception& e) { ini_catch(e); }
95  return 0;
96  }
void ini_catch(std::exception &)
Catch initialisation exceptions.
Definition: ini_catch.cpp:29
Here is the call graph for this function:

◆ set_signal_handler()

void Gambit::set_signal_handler ( const YAML::Node &  keyvalnode,
const int  sig,
const std::string &  def_mode 
)

Choose signal handler for a given signal via yaml file option.

TODO: Mostly obsolete Choose signal handler for a given signal via yaml file option.

Definition at line 574 of file signal_handling.cpp.

References EOM, logger(), sighandler_soft(), and signal_name().

575  {
576  std::string shutdown_mode;
577  if(keyvalnode["signal_handling"]) {
578  YAML::Node signal_options = keyvalnode["signal_handling"];
579  if(signal_options[signal_name(sig)]) {
580  shutdown_mode = signal_options[signal_name(sig)].as<std::string>();
581  }else{
582  shutdown_mode = def_mode;
583  }
584  }else{
585  shutdown_mode = def_mode;
586  }
587  logger()<< "Setting action on "<<signal_name(sig)<<" to '"<<shutdown_mode<<"'"<<EOM;
588  // if (shutdown_mode=="hard_shutdown"){ signal(sig, sighandler_hard); }
589  // else if (shutdown_mode=="emergency_shutdown"){ signal(sig, sighandler_emergency); }
590  // else if (shutdown_mode=="emergency_shutdown_longjmp"){ signal(sig, sighandler_emergency_longjmp); }
591  //else
592  if (shutdown_mode=="soft_shutdown"){ signal(sig, sighandler_soft); }
593  //else if (shutdown_mode=="null"){ signal(sig, sighandler_null); }
594  else {
595  std::ostringstream msg;
596  msg << "Invalid shutdown mode requested for signal "<<signal_name(sig)<<" ("<<sig<<")"<<" (via YAML file option '"<<signal_name(sig)<<"' in KeyValue section under 'signal_handling'). Value received was '"<<shutdown_mode<<"'. Valid shutdown modes are:" <<std::endl;
597  msg << " 'hard_shutdown' -- Exit immediately." <<std::endl;
598  msg << " 'emergency_shutdown' -- Attempt to save printer/resume data and then immediately exit." <<std::endl;
599  msg << " 'emergency_shutdown_longjmp' -- Longjmp to outside of likelihood loop, then attempt to save printer/resume data and exit"<<std::endl;
600  msg << " 'soft_shutdown' -- Safest: attempt to synchronise processes at safe location, then save printer/resume data and exit." <<std::endl;
601  msg << " 'null' -- Ignore signal. Use at own risk!" <<std::endl;
602  msg << "The default shutdown mode on signal "<<signal_name(sig)<<" is '"<<def_mode<<"'." <<std::endl;
603  std::cerr << msg.str();
604  std::cerr << std::endl;
605  exit(EXIT_FAILURE);
606  }
607  }
std::string signal_name(int sig)
Translate signal codes to strings.
const Logging::endofmessage EOM
Explicit const instance of the end of message struct in Gambit namespace.
Definition: logger.hpp:99
Logging::LogMaster & logger()
Function to retrieve a reference to the Gambit global log object.
Definition: logger.cpp:95
void sighandler_soft(int sig)
Signal handler functions.
Here is the call graph for this function:

◆ sgn()

template<typename T >
int Gambit::sgn ( val)

◆ sighandler_soft()

void Gambit::sighandler_soft ( int  sig)

Signal handler functions.

========================================================================

Helpers

Signal handler functions We used to have more of these, but now we only use the "soft shutdown" signal handler. Sets a "shutdown_begun" flag, which is checked each likelihood loop, after which MPI synchronisation followed by clean shutdown is attempted.

Definition at line 563 of file signal_handling.cpp.

References Gambit::SignalData::add_signal(), Gambit::SignalData::set_shutdown_begun(), and signaldata().

Referenced by main(), and set_signal_handler().

564  {
565  // We will avoid touching streams in this "clean" shutdown mode since technically it is undefined behaviour, so no messages here.
567  signaldata().add_signal(sig); // I think this should be ok... but can delete it if there are any problems
568  }
void set_shutdown_begun(const sig_atomic_t emergnc=0)
Register that shutdown has begun.
void add_signal(int sig)
Check if emergency shutdown is in progress.
EXPORT_SYMBOLS SignalData & signaldata()
Retrieve global instance of signal handler options struct.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signal_mask()

sigset_t * Gambit::signal_mask ( )

Getter for global signal set.

Definition at line 24 of file signal_helpers.cpp.

Referenced by block_signals(), and unblock_signals().

25  {
26  static sigset_t mask;
27  return &mask;
28  }
Here is the caller graph for this function:

◆ signal_name()

std::string Gambit::signal_name ( int  sig)

Translate signal codes to strings.

Definition at line 35 of file signal_handling.cpp.

Referenced by Gambit::SignalData::display_received_signals(), and set_signal_handler().

36  {
37  std::string name;
38  switch(sig){
39  case SIGINT: name="SIGINT"; break;
40  case SIGTERM: name="SIGTERM"; break;
41  case SIGUSR1: name="SIGUSR1"; break;
42  case SIGUSR2: name="SIGUSR2"; break;
43  default: name="<unlisted>";
44  }
45  return name;
46  }
Here is the caller graph for this function:

◆ signaldata()

SignalData & Gambit::signaldata ( )

Retrieve global instance of signal handler options struct.

Definition at line 532 of file signal_handling.cpp.

References Gambit::GreAT::data, LOCAL_INFO, and utils_error().

Referenced by Gambit::Printers::check_for_error_messages(), Gambit::FunctorHelp::entering_multithreaded_region(), Gambit::FunctorHelp::leaving_multithreaded_region(), main(), Gambit::Scanner::Scanner_Plugin_Function< ret(args...)>::main(), Gambit::Scanner::Multi_Scanner_Plugin_Function< ret(args...)>::main(), Gambit::Likelihood_Container::main(), Gambit::PostProcessor::PPDriver::run_main_loop(), and sighandler_soft().

533  {
534  static SignalData data;
535  #ifdef WITH_MPI
536  // If we are using MPI, it is required that the signaldata object be initialised with a communicator object
537  // This 'ifdef' block ensures that this happens, or else throws an error.
538  static int access_count = 0;
539  if(access_count==0){ access_count += 1; }
540  else if(access_count==1)
541  {
542  // Check that communicator object has been initialised
543  if(not data.comm_ready())
544  {
545  std::ostringstream errmsg;
546  errmsg << "Error retrieving global SignalData object! An MPI communicator has not been provided to this object! Please provide one via the 'set_MPI_comm' the first time that 'signaldata()' is called.";
547  utils_error().raise(LOCAL_INFO, errmsg.str());
548  }
549  }
550  #endif
551  return data;
552  }
greatScanData data
Definition: great.cpp:38
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_add() [1/4]

void Gambit::SLHAea_add ( SLHAstruct slha,
const str block,
const int  index,
const double  value,
const str comment = "",
const bool  overwrite = false 
)

Add an entry to an SLHAea object (if overwrite=false, only if it doesn't already exist)

Definition at line 238 of file slhaea_helpers.cpp.

References SLHAea_check_block(), and SLHAea_overwrite_block().

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::SMInputs::add_to_SLHAea(), Gambit::SpecBit::MSSMSpec< MI >::add_to_SLHAea(), Gambit::MSSMea::MSSMea(), Gambit::FlavBit::SI_fill(), and SLHAea_add_GAMBIT_SPINFO().

240  {
241  if (SLHAea_check_block(slha, block, index) and not overwrite) return;
242  SLHAea_overwrite_block(slha, block, index, value, (comment == "" ? "" : "# " + comment));
243  }
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_add() [2/4]

void Gambit::SLHAea_add ( SLHAstruct slha,
const str block,
const int  index,
const str value,
const str comment = "",
const bool  overwrite = false 
)

Definition at line 246 of file slhaea_helpers.cpp.

References SLHAea_check_block(), and SLHAea_overwrite_block().

248  {
249  if (SLHAea_check_block(slha, block, index, overwrite)) return;
250  SLHAea_overwrite_block(slha, block, index, value, (comment == "" ? "" : "# " + comment));
251  }
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SLHAea_add() [3/4]

void Gambit::SLHAea_add ( SLHAstruct slha,
const str block,
const int  index,
const int  value,
const str comment = "",
const bool  overwrite = false 
)

Definition at line 254 of file slhaea_helpers.cpp.

References SLHAea_check_block(), and SLHAea_overwrite_block().

256  {
257  if (SLHAea_check_block(slha, block, index, overwrite)) return;
258  SLHAea_overwrite_block(slha, block, index, value, (comment == "" ? "" : "# " + comment));
259  }
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SLHAea_add() [4/4]

void Gambit::SLHAea_add ( SLHAstruct slha,
const str block,
const int  index1,
const int  index2,
const double value,
const str comment,
const bool  overwrite = false 
)

Definition at line 262 of file slhaea_helpers.cpp.

References SLHAea_check_block(), and SLHAea_overwrite_block().

264  {
265  if (SLHAea_check_block(slha, block, index1, index2) and not overwrite) return;
266  SLHAea_overwrite_block(slha, block, index1, index2, value, (comment == "" ? "" : "# " + comment));
267  }
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SLHAea_add_block()

void Gambit::SLHAea_add_block ( SLHAstruct slha,
const str name,
const double  scale = -1 
)

Add a new block to an SLHAea object, with our without a scale.

Definition at line 82 of file slhaea_helpers.cpp.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::SpecBit::MSSMSpec< MI >::add_to_SLHAea(), and Gambit::MSSMea::MSSMea().

83  {
84  if(scale==-1)
85  {
86  slha[name][""] << "BLOCK" << name;
87  }
88  else
89  {
90  slha[name][""] << "BLOCK" << name << "Q=" << scale;
91  }
92  }
Here is the caller graph for this function:

◆ SLHAea_add_from_subspec() [1/3]

void Gambit::SLHAea_add_from_subspec ( SLHAstruct slha,
const str  local_info,
const SubSpectrum subspec,
const Par::Tags  partype,
const std::pair< int, int > &  pdg_pair,
const str block,
const str comment,
const bool  error_if_missing = true,
const double  rescale = 1.0 
)

Add an entry from a subspectrum getter to an SLHAea object; SLHA index given by pdg code.

Definition at line 272 of file slhaea_helpers.cpp.

References Gambit::SubSpectrum::get(), Gambit::SubSpectrum::has(), SLHAea_overwrite_block(), and utils_error().

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), SpecBit::QedQcdWrapper::add_to_SLHAea(), and SLHAea_add_matrix().

275  {
276  if(subspec.has(partype,pdg_pair))
277  {
278  SLHAea_overwrite_block(slha, block, pdg_pair.first, subspec.get(partype,pdg_pair)*rescale, (comment == "" ? "" : "# " + comment));
279  }
280  else if(error_if_missing)
281  {
282  std::ostringstream errmsg;
283  errmsg << "Error creating SLHAea output from SubSpectrum object! Required entry not found (paramtype="<<Par::toString.at(partype)
284  <<", pdg:context="<<pdg_pair.first<<":"<<pdg_pair.second<<")";
285  utils_error().raise(local_info,errmsg.str());
286  }
287  // else skip this entry
288  return;
289  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_add_from_subspec() [2/3]

void Gambit::SLHAea_add_from_subspec ( SLHAstruct slha,
const str  local_info,
const SubSpectrum subspec,
const Par::Tags  partype,
const str name,
const str block,
const int  slha_index,
const str comment,
const bool  error_if_missing = true,
const double  rescale = 1.0 
)

Add an entry from a subspectrum getter to an SLHAea object; 1 SLHA index.

Definition at line 292 of file slhaea_helpers.cpp.

References Gambit::SubSpectrum::get(), Gambit::SubSpectrum::has(), SLHAea_overwrite_block(), and utils_error().

295  {
296  if(subspec.has(partype,name))
297  {
298  SLHAea_overwrite_block(slha, block, slha_index, subspec.get(partype,name)*rescale, (comment == "" ? "" : "# " + comment));
299  }
300  else if(error_if_missing)
301  {
302  std::ostringstream errmsg;
303  errmsg << "Error creating SLHAea output from SubSpectrum object! Required entry not found (paramtype="<<Par::toString.at(partype)<<", name="<<name<<")";
304  utils_error().raise(local_info,errmsg.str());
305  }
306  // else skip this entry
307  return;
308  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
Here is the call graph for this function:

◆ SLHAea_add_from_subspec() [3/3]

void Gambit::SLHAea_add_from_subspec ( SLHAstruct slha,
const str  local_info,
const SubSpectrum subspec,
const Par::Tags  partype,
const str name,
const int  index1,
const int  index2,
const str block,
const int  slha_index1,
const int  slha_index2,
const str comment,
const bool  error_if_missing = true,
const double  rescale = 1.0 
)

Add an entry from a subspectrum getter to an SLHAea object; two SubSpectrum getter indices, two SLHA indices.

Definition at line 311 of file slhaea_helpers.cpp.

References Gambit::SubSpectrum::get(), Gambit::SubSpectrum::has(), SLHAea_overwrite_block(), and utils_error().

314  {
315  if(subspec.has(partype,name,index1,index2))
316  {
317  SLHAea_overwrite_block(slha, block, slha_index1, slha_index2, subspec.get(partype,name,index1,index2)*rescale, (comment == "" ? "" : "# " + comment));
318  }
319  else if(error_if_missing)
320  {
321  std::ostringstream errmsg;
322  errmsg << "Error creating SLHAea output from SubSpectrum object! Required entry not found (paramtype="<<Par::toString.at(partype)<<", name="<<name<<", index1="<<index1<<", index2="<<index2;
323  utils_error().raise(local_info,errmsg.str());
324  }
325  // else skip this entry
326  return;
327  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
void SLHAea_overwrite_block(SLHAstruct &slha, const str &block, int index1, int index2, T value, const str &comment)
Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line...
Here is the call graph for this function:

◆ SLHAea_add_GAMBIT_SPINFO()

void Gambit::SLHAea_add_GAMBIT_SPINFO ( SLHAstruct slha)

Write the SPINFO block with GAMBIT name and version number.

Definition at line 224 of file slhaea_helpers.cpp.

References gambit_version(), SLHAea_add(), and SLHAea_check_block().

Referenced by Gambit::MSSMSimpleSpec::add_to_SLHAea().

225  {
226  // For now we don't try to track where the data originally came from, we just label
227  // it as GAMBIT-produced.
228  std::ostringstream progname;
229  if(not SLHAea_check_block(slha, "SPINFO", 1, false))
230  {
231  SLHAea_add(slha, "SPINFO", 1, "GAMBIT", "Program");
232  SLHAea_add(slha, "SPINFO", 2, gambit_version(), "Version number");
233  }
234  }
void SLHAea_add(SLHAstruct &slha, const str &block, const int index, const double value, const str &comment="", const bool overwrite=false)
Add an entry to an SLHAea object (if overwrite=false, only if it doesn&#39;t already exist) ...
str & gambit_version()
Statically construct a string containing the full GAMBIT version information and return a reference t...
Definition: version.cpp:32
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_add_matrix()

template<typename T >
void Gambit::SLHAea_add_matrix ( SLHAstruct slha,
const str block,
const std::vector< T > &  matrix,
const int  rows,
const int  cols,
const str comment = "",
const bool  overwrite = false 
)

Add a whole matrix to an SLHAea object if it doesn't already exist.

Definition at line 83 of file slhaea_helpers.hpp.

References SLHAea_add_from_subspec(), and SLHAea_check_block().

Referenced by Gambit::slhahelp::attempt_to_add_SLHA1_mixing().

85  {
86  if (SLHAea_check_block(slha, block, 1, overwrite)) return;
87  std::ostringstream commentwhash;
88  if (comment != "") commentwhash << "# " << comment;
89  for (int i = 0; i < rows; i++) for (int j = 0; j < cols; j++)
90  {
91  slha[block][""] << i+1 << j+1 << matrix.at(i*rows + j) << commentwhash.str();
92  }
93  return;
94  }
bool SLHAea_check_block(SLHAstruct &slha, const str &block, const int index1, const int index2)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_block_exists()

bool Gambit::SLHAea_block_exists ( SLHAstruct slha,
const str block 
)

Check if a block exists in an SLHAea object.

Definition at line 94 of file slhaea_helpers.cpp.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::SpecBit::MSSMSpec< MI >::add_to_SLHAea(), Gambit::MSSMea::MSSMea(), and SLHAea_check_block().

95  {
96  // Check if block exists
97  bool found = false;
98  if(slha.find(block) != slha.end()) found = true;
99  return found;
100  }
Here is the caller graph for this function:

◆ SLHAea_check_block() [1/3]

bool Gambit::SLHAea_check_block ( SLHAstruct slha,
const str block 
)

Check if a block exists in an SLHAea object, add it if not.

Definition at line 102 of file slhaea_helpers.cpp.

References SLHAea_block_exists().

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), Gambit::MSSMea::MSSMea(), SLHAea_add(), SLHAea_add_GAMBIT_SPINFO(), SLHAea_add_matrix(), SLHAea_check_block(), and SLHAea_overwrite_block().

103  {
104  bool exists;
105  if(SLHAea_block_exists(slha,block))
106  {
107  exists = true;
108  }
109  else
110  {
111  slha[block][""] << "BLOCK" << block;
112  exists = false; // Didn't exist, but now it does.
113  }
114  return exists;
115  }
bool SLHAea_block_exists(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_check_block() [2/3]

bool Gambit::SLHAea_check_block ( SLHAstruct slha,
const str block,
const int  index 
)

Check if a block exists in an SLHAea object, add it if not, and check if it has an entry at a given index.

Definition at line 120 of file slhaea_helpers.cpp.

References combine_hdf5::index, and SLHAea_check_block().

121  {
122  bool found;
123  // Check if block exists and create it if it doesn't
124  SLHAea_check_block(slha, block);
125  // Check for existing entry
126  std::stringstream i;
127  i<<index;
128  SLHAea::Block::key_type key(1);
129  key[0] = i.str();
130  //std::cout << "Searching block "<<block<<" for key "<<key[0]<<std::endl;
131  if( slha[block].find(key) != slha[block].end())
132  {
133  found = true;
134  }
135  else
136  {
137  found = false;
138  }
139  return found;
140  }
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SLHAea_check_block() [3/3]

bool Gambit::SLHAea_check_block ( SLHAstruct slha,
const str block,
const int  index1,
const int  index2 
)

Definition at line 142 of file slhaea_helpers.cpp.

References SLHAea_check_block().

143  {
144  bool found;
145  // Check if block exists and create it if it doesn't
146  SLHAea_check_block(slha, block);
147  // Check for existing entry
148  std::stringstream i,j;
149  i<<index1; j<<index2;
150  SLHAea::Block::key_type key(2);
151  key[0] = i.str();
152  key[1] = j.str();
153  //std::cout << "Searching block "<<block<<" for key "<<key[0]<<", "<<key[1]<<std::endl;
154  if( slha[block].find(key) != slha[block].end() )
155  {
156  found = true;
157  }
158  else
159  {
160  found = false;
161  }
162  return found;
163  }
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SLHAea_delete_block()

void Gambit::SLHAea_delete_block ( SLHAstruct slha,
const std::string &  block 
)

Delete an entire block from an SLHAea object, if it exists (actually just the first block matching the given name)

Delete a block entirely if it exists (TODO: actually only deletes first instance of the block found!)

Definition at line 218 of file slhaea_helpers.cpp.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea().

219  {
220  auto it = slha.find(block);
221  if(it!=slha.end()) slha.erase(it);
222  }
Here is the caller graph for this function:

◆ SLHAea_get() [1/2]

double Gambit::SLHAea_get ( const SLHAstruct slha,
const str block,
const int  index 
)

Get an entry from an SLHAea object as a double, with some error checking.

Definition at line 45 of file slhaea_helpers.cpp.

References LOCAL_INFO, and utils_error().

Referenced by Gambit::SMInputs::SMInputs().

46  {
47  double output = 0.0;
48  try
49  {
50  output = SLHAea::to<double>(slha.at(block).at(index).at(1));
51  }
52  catch (const std::out_of_range& e)
53  {
54  std::ostringstream errmsg;
55  errmsg << "Error accessing data at index " << index << " of block " << block
56  << ". Please check that the SLHAea object was properly filled." << std::endl
57  << "(Received out_of_range error from SLHAea class with message: " << e.what() << ")";
58  utils_error().raise(LOCAL_INFO,errmsg.str());
59  }
60  return output;
61  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_get() [2/2]

double Gambit::SLHAea_get ( const SLHAstruct slha,
const str block,
const int  index,
const double  defvalue 
)

Get an entry from an SLHAea object as a double; raise a warning and use a default value if the entry is missing.

Definition at line 64 of file slhaea_helpers.cpp.

References LOCAL_INFO, utils_warning(), and Gambit::LogTags::warn.

65  {
66  double output;
67  try
68  {
69  output = SLHAea::to<double>(slha.at(block).at(index).at(1));
70  }
71  catch (const std::out_of_range& e)
72  {
73  std::ostringstream warn;
74  warn << "Warning! No entry found at index "<<index<<" of block "<<block<<". Using default value: "<<defvalue<< std::endl;
75  utils_warning().raise(LOCAL_INFO,warn.str());
76  output = defvalue;
77  }
78  return output;
79  }
#define LOCAL_INFO
Definition: local_info.hpp:34
EXPORT_SYMBOLS warning & utils_warning()
Utility warnings.
Here is the call graph for this function:

◆ SLHAea_overwrite_block() [1/2]

template<class T >
void Gambit::SLHAea_overwrite_block ( SLHAstruct slha,
const str block,
int  index,
value,
const str comment 
)

Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line.

Definition at line 169 of file slhaea_helpers.cpp.

References combine_hdf5::index, and SLHAea_check_block().

Referenced by SLHAea_add(), and SLHAea_add_from_subspec().

171  {
172  if(SLHAea_check_block(slha, block, index))
173  {
174  //std::cout << "Entry "<<block<<", "<<index<<" already exists, deleting and replacing it." <<std::endl;
175  // entry exists already, delete it
176  slha.at(block).at(index).at(1);
177  auto& line = slha[block][index];
178  line.clear();
179  line << index << value << comment;
180  }
181  else
182  {
183  // Doesn't already exist, add it
184  //std::cout << "Adding entry "<<block<<", "<<index<<std::endl;
185  slha[block][""] << index << value << comment;
186  }
187  }
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SLHAea_overwrite_block() [2/2]

template<class T >
void Gambit::SLHAea_overwrite_block ( SLHAstruct slha,
const str block,
int  index1,
int  index2,
value,
const str comment 
)

Check if a line exists in an SLHAea block, then overwrite it if it does. Otherwise add the line.

Definition at line 191 of file slhaea_helpers.cpp.

References SLHAea_check_block().

193  {
194  //std::vector<int> indices = initVector<int>(index1, index2);
195  if(SLHAea_check_block(slha, block, index1, index2))
196  {
197  //std::cout << "Entry "<<block<<", "<<index1<<","<<index2<<" already exists, deleting and replacing it." <<std::endl;
198  // entry exists already, delete it
199  //slha.at(block).at(indices).at(1); // Is this actually a valid way to use SLHAea? I don't see it in their documentation.
200  std::stringstream i,j;
201  i<<index1; j<<index2;
202  SLHAea::Block::key_type key(2);
203  key[0] = i.str();
204  key[1] = j.str();
205  auto& line = slha[block][key];
206  line.clear();
207  line << index1 << index2 << value << comment;
208  }
209  else
210  {
211  //std::cout << "Adding entry "<<block<<","<<index1<<","<<index2<<std::endl;
212  // Doesn't exist, add it
213  slha[block][""] << index1 << index2 << value << comment;
214  }
215  }
bool SLHAea_check_block(SLHAstruct &slha, const str &block)
Check if a block exists in an SLHAea object, add it if not.
Here is the call graph for this function:

◆ SMlike_higgs_PDG_code()

int Gambit::SMlike_higgs_PDG_code ( const SubSpectrum mssm_spec)

Determine which MSSM higgs is most SM-like.

Needs expansion to work with non-MSSM (e.g. *HDM) models

Definition at line 30 of file smlike_higgs.cpp.

References Gambit::Par::dimensionless, Gambit::SubSpectrum::get(), and Gambit::Par::Pole_Mixing.

Referenced by Gambit::SpecBit::FH_HeavyHiggsMasses(), Gambit::SpecBit::FH_HiggsMass(), Gambit::PrecisionBit::make_MSSM_precision_spectrum_4H_W(), Gambit::PrecisionBit::make_MSSM_precision_spectrum_H(), Gambit::PrecisionBit::make_MSSM_precision_spectrum_H_W(), Gambit::PrecisionBit::mh_from_MSSM_spectrum(), Gambit::SpecBit::MSSM_higgs_couplings_FH(), Gambit::SpecBit::MSSM_higgs_couplings_pwid(), Gambit::DecayBit::Ref_SM_Higgs_decays_FH(), Gambit::DecayBit::Ref_SM_other_Higgs_decays_FH(), and Gambit::DecayBit::Ref_SM_other_Higgs_decays_table().

31  {
32  double sa = - mssm_spec.get(Par::Pole_Mixing,"h0",1,1);
33  double ca = mssm_spec.get(Par::Pole_Mixing,"h0",1,2);
34  double tb = mssm_spec.get(Par::dimensionless, "tanbeta" );
35  double sb = sin(atan(tb));
36  double cb = cos(atan(tb));
37  //cos (beta - alpha) and sin(beta-alpha)
38  double cbma = cb * ca + sb * sa;
39  double sbma = sb * ca - cb * ca;
40  if(sbma > cbma) return 25;
41  return 35;
42  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spacing()

std::string Gambit::spacing ( int  len,
int  maxlen 
)

Spacing utility for stream overloads.

Definition at line 29 of file stream_overloads.cpp.

Referenced by operator<<().

30  {
31  int offset = 0;
32  if (len < maxlen) {offset=maxlen-len;}
33  return std::string(offset+5,' ');
34  }
Here is the caller graph for this function:

◆ spectrum_from_SLHA()

template<typename HE >
Spectrum Gambit::spectrum_from_SLHA ( str  slha,
const Spectrum::mc_info mci,
const Spectrum::mr_info mri 
)

Create a simple spectrum object from an SLHA file.

Definition at line 75 of file spectrum_factories.hpp.

References read_SLHA().

76  {
77  // Read the SLHA file in to an SLHAea object
78  SLHAstruct slhaea = read_SLHA(slha);
79  // Create the final object from the SLHAea object
80  return spectrum_from_SLHAea<HE, SLHAstruct>(slhaea, slhaea, mci, mri);
81  }
SLHAstruct read_SLHA(str slha)
Read an SLHA file in to an SLHAea object with some error-checking.
SLHAea::Coll SLHAstruct
Less confusing name for SLHAea container class.
Here is the call graph for this function:

◆ spectrum_from_SLHAea()

template<typename HE , typename HEmod >
Spectrum Gambit::spectrum_from_SLHAea ( HEmod  hemod,
SLHAstruct  slhaea,
const Spectrum::mc_info mci,
const Spectrum::mr_info mri 
)

Create a simple spectrum object from an SLHAea object.

Definition at line 27 of file spectrum_factories.hpp.

References Spectrum.

28  {
29  // Start by stripping out any DECAY and DCINFO blocks, as we're only
30  // interested in holding spectrum information internally in the
31  // spectrum object, not decay info.
32  SLHAstruct::key_matches is_dcinfo("DCINFO");
33  for (SLHAstruct::iterator block = slhaea.begin(); block != slhaea.end();)
34  {
35  bool delete_block = false;
36  if (is_dcinfo(*block)) delete_block = true;
37  else
38  {
39  auto block_def = block->find_block_def();
40  if (block_def != block->end())
41  {
42  if (block_def->at(0) == "DECAY") delete_block = true;
43  }
44  }
45  if (delete_block) slhaea.erase(block);
46  else ++block;
47  }
48 
49  // Create HE simple SubSpectrum object from the SLHAea object
50  // (interacts with MSSM blocks in MSSM case)
51  HE he(hemod);
52 
53  // Create SMInputs object from the SLHAea object
54  SMInputs sminputs(slhaea);
55 
56  // Create SMSimpleSpec SubSpectrum object from the SLHAea object
57  // (basically just interacts with SMINPUTS block)
58  SMSimpleSpec sm(slhaea);
59 
60  // Create full Spectrum object from components above
61  // Note subtlety! There are TWO constructors for the Spectrum object:
62  // If pointers to SubSpectrum objects are passed, it is assumed that
63  // these objects are managed EXTERNALLY! So if we were to do this:
64  // matched_spectra = Spectrum(&smskel,&mssmskel,sminputs);
65  // then the SubSpectrum objects would end up DELETED at the end of
66  // this scope, and we will get a segfault if we try to access them
67  // later. INSTEAD, we should just pass the objects themselves, and
68  // then they will be CLONED and the Spectrum object will take
69  // possession of them:
70  return Spectrum(sm,he,sminputs,NULL,mci,mri);
71  }
Spectrum Spectrum

◆ squareVariadic() [1/2]

double Gambit::squareVariadic ( )
inline

Definition at line 329 of file variadic_functions.hpp.

Referenced by squareVariadic().

329 {return 0.0;}
Here is the caller graph for this function:

◆ squareVariadic() [2/2]

template<typename... args>
double Gambit::squareVariadic ( const double val,
const args &...  params 
)
inline

Definition at line 332 of file variadic_functions.hpp.

References squareVariadic().

333  {
334  return val*val + squareVariadic(params...);
335  }
double squareVariadic(const double &val, const args &... params)
Here is the call graph for this function:

◆ stringifyVariadic() [1/3]

◆ stringifyVariadic() [2/3]

const std::string Gambit::stringifyVariadic ( const std::string &  str)
inline

Definition at line 320 of file variadic_functions.hpp.

320 {return str;}
std::string str
Shorthand for a standard string.

◆ stringifyVariadic() [3/3]

template<typename... args>
const std::string Gambit::stringifyVariadic ( const std::string &  str,
const args &...  strs 
)
inline

Definition at line 323 of file variadic_functions.hpp.

References stringifyVariadic().

323 {return str + ", " + stringifyVariadic(strs...);}
std::string str
Shorthand for a standard string.
const std::string stringifyVariadic(const std::string &str, const args &... strs)
Here is the call graph for this function:

◆ swap()

void Gambit::swap ( Spectrum first,
Spectrum second 
)

Swap resources of two Spectrum objects Note: Not a member function! This is an external function which is a friend of the Spectrum class.

Friend function: swap resources of two Spectrum objects.

Definition at line 57 of file spectrum.cpp.

References Gambit::Spectrum::HE, Gambit::Spectrum::HE_new, Gambit::Spectrum::initialised, Gambit::Spectrum::input_Param, Gambit::Spectrum::LE, Gambit::Spectrum::LE_new, Gambit::Spectrum::mass_cuts, Gambit::Spectrum::mass_ratio_cuts, Gambit::Spectrum::SMINPUTS, and Gambit::Spectrum::swap.

Referenced by Gambit::Printers::HDF5Printer::clear_previous_points(), Gambit::DarkBit::intersect_parabola_line(), Gambit::ColliderBit::random_unique(), and Gambit::ColliderBit::SortJets().

58  {
59  using std::swap; // enable ADL
60  swap(first.LE, second.LE);
61  swap(first.HE, second.HE);
62  swap(first.LE_new, second.LE_new);
63  swap(first.HE_new, second.HE_new);
64  swap(first.SMINPUTS, second.SMINPUTS);
65  swap(first.input_Param, second.input_Param);
66  swap(first.mass_cuts, second.mass_cuts);
67  swap(first.mass_ratio_cuts, second.mass_ratio_cuts);
68  swap(first.initialised, second.initialised);
69  }
void swap(Spectrum &first, Spectrum &second)
Swap resources of two Spectrum objects Note: Not a member function! This is an external function whic...
Definition: spectrum.cpp:57
Here is the caller graph for this function:

◆ terminator()

void Gambit::terminator ( )
Author
Christoph Weniger
Date
2016 Feb

Definition at line 21 of file terminator.cpp.

Referenced by Gambit::ini_code::ini_code(), and main().

22 {
23  std::cout << std::endl << "Gambit has encountered an uncaught error during initialisation." << std::endl;
24  std::cout << std::endl << "Check the output logs for details." << std::endl;
25  std::cout << std::endl << "(Check your yaml file if you can't recall where the logs are.)" << std::endl << std::endl;
26 
27  std::exception_ptr eptr = std::current_exception();
28  try
29  {
30  std::rethrow_exception(eptr);
31  }
32  catch (const std::exception &e)
33  {
34  std::cout << "what(): " << e.what() << std::endl;
35  }
36  catch (...)
37  {
38  std::cout << "Exception not derived from std::exception." << std::endl;
39  }
40  exit(1);
41 }
Here is the caller graph for this function:

◆ unblock_signals()

void Gambit::unblock_signals ( )

Definition at line 36 of file signal_helpers.cpp.

References signal_mask().

37  {
38  sigprocmask(SIG_UNBLOCK, signal_mask(), NULL);
39  }
sigset_t * signal_mask()
Getter for global signal set.
Here is the call graph for this function:

◆ utils_error()

error & Gambit::utils_error ( )

Utility errors.

Definition at line 27 of file standalone_error_handlers.cpp.

References Gambit::LogTags::utils.

Referenced by Gambit::slhahelp::add_MSSM_spectrum_to_SLHAea(), daFunk::augmentSingl(), Gambit::functor::backend_conditional_dependencies(), Gambit::backend_functor_common< TYPE(*)(ARGS...), TYPE, ARGS... >::backend_functor_common(), Gambit::functor::backendgroups(), Gambit::functor::backendreq_tags(), Gambit::functor::backendreqs(), Gambit::functor::backendspermitted(), daFunk::FunkBase::bind(), Gambit::functor::breakLoop(), Gambit::module_functor_common::breakLoopFromManagedFunctor(), Gambit::functor::canBeLoopManager(), Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::check(), Gambit::DecayTable::Entry::check_BF_validity(), Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::check_index_initd(), Gambit::Spectrum::check_init(), Gambit::Spectrum::check_mass_cuts(), Gambit::ColliderBit::MC_convergence_checker::clear(), Gambit::HiggsCouplingsTable::compute_effective_coupling(), Gambit::Random::create_rng_engine(), Gambit::DecayTable::DecayTable(), Gambit::functor::dependencies(), Gambit::safety_bucket_base::dieGracefully(), Gambit::safe_ptr< double >::dieGracefully(), Gambit::safe_variable_ptr< TYPE >::dieGracefully(), Gambit::DecayTable::Entry::Entry(), Gambit::functor::failBigTime(), Gambit::slhahelp::family_state_closest_to_mass_es(), Gambit::slhahelp::family_state_mix_matrix(), Gambit::functor::forcematchingbackend(), Gambit::slhahelp::gauge_es_from_mass_es(), Gambit::Stats::gaussian_loglikelihood(), Gambit::Stats::gaussian_upper_limit(), Gambit::Spectrum::get(), Gambit::HiggsCouplingsTable::get_charged_decays(), Gambit::HiggsCouplingsTable::get_charged_decays_array(), Gambit::slhahelp::get_gauge_admix_for_family_state(), Gambit::MSSMea::get_MCha_pole_slha(), Gambit::MSSMea::get_MChi_pole_slha(), Gambit::MSSMea::get_Mhh_pole_slha(), Gambit::slhahelp::get_mixing_element(), Gambit::MSSMea::get_MSd_pole_slha(), Gambit::MSSMea::get_MSe_pole_slha(), Gambit::MSSMea::get_MSu_pole_slha(), Gambit::MSSMea::get_MSv_pole_slha(), Gambit::HiggsCouplingsTable::get_neutral_decays(), Gambit::HiggsCouplingsTable::get_neutral_decays_array(), Gambit::HiggsCouplingsTable::get_neutral_decays_SM(), Gambit::HiggsCouplingsTable::get_neutral_decays_SM_array(), Gambit::SLHAeaModel::getdata(), Gambit::Options::getNode(), Gambit::SLHASimpleSpec< MSSMSimpleSpec >::GetScale(), Gambit::DecayTable::Entry::getSLHAea_block(), Gambit::Options::getValue(), Gambit::DescriptionDatabase::getValue(), Gambit::Options::getValueOrDef(), Gambit::slhahelp::identify_mass_ess_for_family(), Gambit::DecayTable::Entry::init(), Gambit::SignalData::inside_multithreaded_region(), Gambit::DescriptionDatabase::loadFile(), Gambit::Options::loadFromFile(), Gambit::Stats::lognormal_loglikelihood_relerror(), Gambit::functor::loopManagerCapability(), Gambit::functor::loopManagerName(), Gambit::functor::loopManagerOrigin(), Gambit::module_functor_common::makeBackendMatchingRule(), Gambit::module_functor_common::makeBackendOptionRule(), Gambit::slhahelp::mass_es_closest_to_family(), Gambit::slhahelp::mass_es_from_gauge_es(), Gambit::functor::model_conditional_backend_reqs(), Gambit::functor::model_conditional_dependencies(), Gambit::module_functor_common::module_functor_common(), Gambit::MSSMea::MSSMea(), Gambit::functor::notifyOfBackends(), Gambit::functor::notifyOfModel(), Gambit::Farray< char, 1, len, lims... >::operator()(), Gambit::FstringArray< len, lims >::operator()(), Gambit::CallFcn< HostSpec, MapTag::Get >::operator()(), Gambit::CallFcn< HostSpec, MapTag::Set >::operator()(), Gambit::Printers::operator<(), print_to_screen(), Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::raise_error(), read_SLHA(), Gambit::ColliderBit::HEPUtilsAnalysisContainer::register_thread(), Gambit::Utils::remove_all_files_in(), daFunk::FunkBase::resolve(), Gambit::functor::resolveBackendReq(), Gambit::module_functor_common::resolveBackendReq(), Gambit::functor::resolveDependency(), Gambit::module_functor_common::resolveDependency(), Gambit::functor::resolveLoopManager(), Gambit::module_functor_common::resolveLoopManager(), Gambit::SubSpectrum::RunToScale(), Gambit::SLHASimpleSpec< MSSMSimpleSpec >::RunToScaleOverride(), Gambit::functor::safe_version(), Gambit::Spectrum::safeget(), Gambit::SubSpectrum::safeget(), Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::search_map(), Gambit::HiggsCouplingsTable::set_charged_decays(), Gambit::ColliderBit::MC_convergence_checker::set_collider(), Gambit::HiggsCouplingsTable::set_neutral_decays(), Gambit::HiggsCouplingsTable::set_neutral_decays_SM(), Gambit::SubSpectrum::set_override(), Gambit::ColliderBit::MC_convergence_checker::set_settings(), Gambit::module_functor_common::setBackendConditionalDependencySingular(), Gambit::functor::setIteration(), Gambit::functor::setNestedList(), Gambit::module_functor_common::setNestedList(), Gambit::module_functor_common::setPermittedBackend(), Gambit::functor::setPrintRequirement(), Gambit::SLHASimpleSpec< MSSMSimpleSpec >::SetScale(), Gambit::functor::setTimingPrintRequirement(), signaldata(), SLHAea_add_from_subspec(), SLHAea_get(), Gambit::invalid_point_exception::thrower(), Gambit::Utils::type_equivalency::type_equivalency(), Gambit::SignalData::update_looptime(), daFunk::ThrowError::value(), Gambit::SubSpectrumContents::verify_contents(), virtual_SMHiggs_widths(), and Gambit::SubSpectrum::writeSLHAfile().

28  {
29  static error local("A problem has been raised by one of the utility codes.","utils_error", utils);
30  return local;
31  }
Here is the caller graph for this function:

◆ utils_warning()

warning & Gambit::utils_warning ( )

Utility warnings.

Definition at line 34 of file standalone_error_handlers.cpp.

References Gambit::LogTags::utils.

Referenced by Gambit::module_functor_common::check_missing_LogTag(), Gambit::functor::notifyOfBackends(), Gambit::SubSpectrum::RunToScale(), Gambit::Spec< SMHiggsSimpleSpec >::set(), SLHAea_get(), and daFunk::throwError().

35  {
36  static warning local("A problem has been raised by one of the utility codes.","utils_warning", utils);
37  return local;
38  }
Here is the caller graph for this function:

◆ virtual_SMHiggs_widths()

double Gambit::virtual_SMHiggs_widths ( str  channel,
double  mh 
)

Higgs branching ratios and total width Gamma [GeV], as function of mass [GeV] (90 - 300 GeV)

Definition at line 36 of file virtual_higgs.cpp.

References combine_hdf5::f, Gambit::ASCIItableReader::getnrow(), daFunk::interp(), LOCAL_INFO, Gambit::ASCIItableReader::setcolnames(), and utils_error().

Referenced by Gambit::DecayBit::compute_SM_higgs_decays().

37  {
38  // Paths to files containing virtual Higgs width tables.
39  const str virtualH_tabfile = GAMBIT_DIR "/Elements/data/Higgs_decay_1307.1347.dat";
40  const str virtualH_highmass = GAMBIT_DIR "/Elements/data/Higgs_decay_multiTeV_supplement.dat";
41  const str virtualH_lowmass = GAMBIT_DIR "/Elements/data/Higgs_decay_lowmass_supplement.dat";
42 
43  // Initialise, reading in the data tables and setting up the interpolators.
44  static ASCIItableReader table(virtualH_tabfile);
45  static ASCIItableReader table_highmass(virtualH_highmass);
46  static ASCIItableReader table_lowmass(virtualH_lowmass);
47  static std::map<std::string, daFunk::Funk> f_vs_mass;
48  static std::map<std::string, daFunk::Funk> f_vs_mass_highmass;
49  static std::map<std::string, daFunk::Funk> f_vs_mass_lowmass;
50  static bool initialised = false;
51  static double minmass, midmass_low, midmass_high, maxmass;
52  const static std::vector<str> non_highmass_channels = initVector<std::string>("ss","gg","bb","mumu");
53  const static std::vector<str> colnames = initVector<std::string>("mass",
54  "bb", "bb+", "bb-", "tautau", "tautau+", "tautau-", "mumu", "mumu+", "mumu-",
55  "ss", "ss+", "ss-", "cc", "cc+", "cc-", "tt", "tt+", "tt-", "gg", "gg+", "gg-",
56  "gammagamma", "gammagamma+", "gammagamma-", "Zgamma", "Zgamma+", "Zgamma-",
57  "WW", "WW+", "WW-", "ZZ", "ZZ+", "ZZ-", "Gamma", "Gamma+", "Gamma-");
58  const static std::vector<str> colnames_extended = initVector<std::string>("mass",
59  "bb", "tautau", "mumu", "ss", "cc", "tt", "gg", "gammagamma", "Zgamma",
60  "WW", "ZZ", "Gamma");
61  if (not initialised)
62  {
63  table.setcolnames(colnames);
64  for (auto it = colnames.begin(); it != colnames.end(); it++)
65  {
66  f_vs_mass[*it] = daFunk::interp("mass", table["mass"], table[*it]);
67  }
68  table_highmass.setcolnames(colnames_extended);
69  table_lowmass.setcolnames(colnames_extended);
70  for (auto it = colnames_extended.begin(); it != colnames_extended.end(); it++)
71  {
72  f_vs_mass_highmass[*it] = daFunk::interp("mass", table_highmass["mass"], table_highmass[*it]);
73  f_vs_mass_lowmass[*it] = daFunk::interp("mass", table_lowmass["mass"], table_lowmass[*it]);
74  }
75  minmass = table_lowmass["mass"][0];
76  midmass_low = table["mass"][0];
77  midmass_high = table_highmass["mass"][0];
78  maxmass = table_highmass["mass"][table_highmass.getnrow()-1];
79  if (table_lowmass["mass"][table_lowmass.getnrow()-1] != midmass_low)
80  utils_error().raise(LOCAL_INFO, "low-mass and intermediate SM higgs tables do not meet cleanly.");
81  if (table["mass"][table.getnrow()-1] != midmass_high)
82  utils_error().raise(LOCAL_INFO, "intermediate and high-mass SM higgs tables do not meet cleanly.");
83  initialised = true;
84  }
85  /*
86  if (channel == "Sh")
87  {
88  return 0;
89  }
90  */
91 
92  // Exit if the requested channel is unknown.
93  if (std::find(colnames.begin(), colnames.end(), channel) == colnames.end())
94  {
95  std::stringstream msg;
96  msg << "Unknown Higgs decay channel: " << channel << ". Recognised channel codes are:";
97  for (auto it = colnames.begin(); it != colnames.end(); it++) if (*it != "mass") msg << endl << " " << *it;
98  utils_error().raise(LOCAL_INFO, msg.str());
99  }
100 
101 
102  // Exit if the requested mass is out of range.
103  if (mh < minmass or mh > maxmass)
104  {
105  std::stringstream msg;
106  msg << "Requested Higgs virtuality is " << mh << "; allowed range is " << minmass << "--" << maxmass << " GeV!";
107  utils_error().raise(LOCAL_INFO, msg.str());
108  }
109 
110  // Retrieve the interpolated result.
111  double f;
112  if (mh <= midmass_low)
113  {
114  f = f_vs_mass_lowmass[channel]->bind("mass")->eval(mh);
115  }
116  else if (mh >= midmass_low and mh <= midmass_high)
117  {
118  f = f_vs_mass[channel]->bind("mass")->eval(mh);
119  }
120  else
121  {
122  if (std::find(non_highmass_channels.begin(), non_highmass_channels.end(), channel) != non_highmass_channels.end()) return 0.;
123  f = f_vs_mass_highmass[channel]->bind("mass")->eval(mh);
124  }
125  return f;
126 
127  }
EXPORT_SYMBOLS error & utils_error()
Utility errors.
#define LOCAL_INFO
Definition: local_info.hpp:34
MATH_OPERATION(Dif,-) MATH_OPERATION(pow) MATH_OPERATION(fmin) MATH_OPERATION(fmax) class FunkInterp shared_ptr< FunkInterp > interp(T f, std::vector< double > x, std::vector< double > y)
Definition: daFunk.hpp:1348
std::string str
Shorthand for a standard string.
Spectrum Spectrum Spectrum Spectrum Spectrum Spectrum mh
Here is the call graph for this function:
Here is the caller graph for this function:

◆ within_bounds()

bool Gambit::within_bounds ( const int  i,
const std::set< int allowed 
)
inline

Helper function for checking if indices are valid.

Definition at line 36 of file spectrum_helpers.hpp.

Referenced by Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::check_indices_1(), and Gambit::FptrFinder< HostSpec, Gambit::MapTag::Get >::check_indices_2().

37  {
38  return ( allowed.find(i) != allowed.end() );
39  }
Here is the caller graph for this function:

◆ wrap_lines()

void Gambit::wrap_lines ( std::vector< std::vector< std::string >> &  data_in,
const std::vector< int > &  widths,
const std::vector< int > &  minWidths,
double  pad,
std::vector< unsigned char > *  row_flags = 0 
)
inline

Definition at line 34 of file table_formatter.cpp.

References separate_line().

Referenced by Gambit::table_formatter::str().

35  {
36  std::vector<unsigned char>::iterator f_it;
37  if (row_flags)
38  f_it= row_flags->begin();
39  for (auto it = data_in.begin(), end = data_in.end(); it != end;)
40  {
41  int col_num = it->size();
42  std::vector<std::string> temp(col_num, "");
43  bool wrapped = false;
44  for (int i = 0; i < col_num; i++)
45  {
46  if (minWidths.at(i) > 0)
47  {
48  int w = widths[i];
49  if (i != col_num-1)
50  {
51  w -= pad;
52  }
53  if (minWidths.at(i) > w)
54  {
55  w = minWidths.at(i);
56  }
57  if (w < (int)(*it)[i].length())
58  {
59  std::string sub = (*it)[i];
60  auto pos = sub.find_first_not_of(" ");
61  if (pos != std::string::npos)
62  {
63  (*it)[i] = separate_line(sub, pos, w);
64  temp[i] = sub;
65  wrapped = true;
66  }
67  else
68  {
69  (*it)[i] = "";
70  }
71  }
72  }
73  }
74 
75  ++it;
76 
77  if (wrapped)
78  {
79  if (row_flags)
80  f_it = row_flags->insert(f_it, 0x80);
81  it = data_in.insert(it, temp);
82  end = data_in.end();
83  }
84 
85  if (row_flags)
86  ++f_it;
87  }
88  }
std::string separate_line(std::string &line, std::string::size_type indent, std::string::size_type cols_pos)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ __scanner_factories__

reg_elem<factory_type> Gambit::__scanner_factories__

◆ alpha_e_OS_MZ

constexpr double Gambit::alpha_e_OS_MZ = 1. / 128.944

$\alpha_e(M_Z)$ in OS scheme from 1105.3149

Definition at line 61 of file numerical_constants.hpp.

Referenced by Gambit::PrecisionBit::GM2C_SUSY().

◆ alpha_e_OS_thomson_limit

constexpr double Gambit::alpha_e_OS_thomson_limit = 0.0072973525664

Thomson limit of $\alpha_e$ in OS scheme from PDG 2017

Definition at line 56 of file numerical_constants.hpp.

Referenced by Gambit::PrecisionBit::GM2C_SUSY().

◆ alpha_EM

const double Gambit::alpha_EM = 7.2973525664e-3

Definition at line 49 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::intersect_parabola_line().

◆ atomic_mass_unit

const double Gambit::atomic_mass_unit = 0.931494028

Definition at line 43 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::intersect_parabola_line().

◆ delta_alpha_OS

constexpr double Gambit::delta_alpha_OS = 1. - alpha_e_OS_thomson_limit / alpha_e_OS_MZ

$\Delta\alpha$ in OS scheme.

Defined by

\[ \alpha(M_Z) = \frac{\alpha(0)}{1 - \Delta\alpha} \]

Definition at line 70 of file numerical_constants.hpp.

Referenced by Gambit::DecayBit::Z_gamma_nu_2l().

◆ EOM

Explicit const instance of the end of message struct in Gambit namespace.

Definition at line 99 of file logger.hpp.

Referenced by Gambit::DecayBit::all_decays_from_SLHA(), Gambit::SignalData::all_processes_ready(), Gambit::DarkBit::alt_erg_integrand(), Gambit::Printers::asciiReader::asciiReader(), Gambit::SignalData::attempt_soft_shutdown(), Gambit::DRes::DependencyResolver::calcObsLike(), Gambit::DarkBit::capture_rate_Sun_vnqn(), Gambit::SignalData::check_if_shutdown_begun(), Gambit::Printers::HDF5Printer::combine_output(), Gambit::Printers::HDF5Printer::combine_output_py(), Gambit::Printers::HDF5Printer::common_constructor(), Gambit::ColliderBit::copyEvent(), Gambit::Random::create_rng_engine(), Gambit::DarkBit::DarkSUSY_PointInit_LocalHalo_func(), Gambit::DarkBit::DarkSUSY_PointInit_MSSM(), Gambit::DarkBit::DD_couplings_DarkSUSY(), Gambit::DarkBit::DD_couplings_DiracSingletDM_Z2(), Gambit::DarkBit::DD_couplings_MajoranaSingletDM_Z2(), Gambit::DarkBit::DD_couplings_MicrOmegas(), Gambit::DarkBit::DD_couplings_VectorSingletDM_Z2(), Gambit::DRes::DependencyResolver::DependencyResolver(), Gambit::DRes::DependencyResolver::doResolution(), Gambit::DarkBit::dump_GammaSpectrum(), Gambit::Logging::LogMaster::emit_backlog(), Gambit::Logging::LogMaster::entering_backend(), Gambit::Printers::HDF5Printer::finalise(), Gambit::Printers::HDF5Printer2::finalise(), Gambit::ColliderBit::generatePythia8Event(), Gambit::DRes::DependencyResolver::generateTree(), Gambit::Printers::HDF5Printer::get_highest_PPID_from_HDF5(), Gambit::SpecBit::get_MSSM_spectrum_from_SLHAfile(), Gambit::Printers::get_param_id(), Gambit::DarkBit::get_ScalarSingletDM_DD_couplings(), Gambit::DRes::DependencyResolver::getObsLikeOrder(), Gambit::ColliderBit::getPythiaFileReader(), Gambit::Printers::HDF5Printer2::HDF5Printer2(), Gambit::Logging::LogMaster::initialise(), Gambit::SignalData::inside_multithreaded_region(), Gambit::DarkBit::intersect_parabola_line(), Gambit::Logging::LogMaster::leaving_backend(), Gambit::SpecBit::light_quark_test(), Gambit::DarkBit::lnL_CTAGC_gamLike(), Gambit::DarkBit::lnL_FermiGC_gamLike(), Gambit::DarkBit::lnL_FermiLATdwarfs_gamLike(), Gambit::DarkBit::lnL_HESSGC_gamLike(), Gambit::PrecisionBit::lnL_light_quark_masses_chi2(), Gambit::DarkBit::lnL_oh2_Simple(), Gambit::DarkBit::lnL_oh2_upperlimit(), Gambit::DarkBit::lnL_rho0_lognormal(), Gambit::DarkBit::lnL_sigmas_sigmal(), Gambit::DarkBit::lnL_v0_gaussian(), Gambit::DarkBit::lnL_vesc_gaussian(), Gambit::DarkBit::lnL_vrot_gaussian(), Gambit::exception::log_exception(), main(), Gambit::Likelihood_Container::main(), MSSM_mA_to_MSSM_mhud(), Gambit::MSSMea::MSSMea(), Gambit::Printers::HDF5::openFile(), Gambit::ColliderBit::operateLHCLoop(), Gambit::Printers::HDF5Printer::prepare_and_combine_tmp_files(), Gambit::module_functor< ModelParameters >::print(), Gambit::DarkBit::TH_Channel::printChannel(), Gambit::DRes::DependencyResolver::printFunctorEvalOrder(), Gambit::DRes::DependencyResolver::printFunctorList(), Gambit::DRes::DependencyResolver::printObsLike(), Gambit::DarkBit::RD_fraction_leq_one(), Gambit::DarkBit::RD_fraction_one(), Gambit::DarkBit::RD_fraction_rescaled(), Gambit::DarkBit::RD_oh2_DarkSUSY(), Gambit::DarkBit::RD_oh2_general(), Gambit::DarkBit::RD_oh2_Xf_MicrOmegas(), Gambit::DRes::DependencyResolver::resolveDependencyFromRules(), Gambit::DRes::DependencyResolver::resolveRequirement(), Gambit::DRes::DependencyResolver::resolveVertexBackend(), set_signal_handler(), Gambit::Likelihood_Container::setParameters(), Gambit::ColliderBit::smearEventATLAS(), Gambit::ColliderBit::smearEventATLASnoeff(), Gambit::ColliderBit::smearEventCMS(), Gambit::ColliderBit::smearEventCMSnoeff(), Gambit::SpecBit::specbit_test_func3(), Gambit::SpecBit::specbit_test_show_SMInputs(), Gambit::SpecBit::specbit_test_Spectrum(), Gambit::SpecBit::Spectrum_test(), Gambit::Printers::SQLitePrinter::SQLitePrinter(), Gambit::SpecBit::test_Singlet_spectrum(), Gambit::DarkBit::UnitTest_DarkBit(), Gambit::SignalData::update_looptime(), Gambit::Printers::VertexBufferNumeric1D_HDF5< T, CHUNKLENGTH >::VertexBufferNumeric1D_HDF5(), and Gambit::Logging::LogMaster::~LogMaster().

◆ eV2g

const double Gambit::eV2g = 1.782661907e-33

Definition at line 35 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::intersect_parabola_line().

◆ gambit_registry

Gambit::gambit_registry
Initial value:
{
typedef void* factory_type(const std::map<str, primary_model_functor *> &,
DRes::DependencyResolver &b, IniParser::IniFile &c, const str &purpose, Printers::BaseBasePrinter& p
)
std::string str
Shorthand for a standard string.

Definition at line 51 of file container_factory.hpp.

◆ gambit_version_int

const int Gambit::gambit_version_int = 10000*gambit_version_major + 100*gambit_version_minor + gambit_version_revision

Definition at line 50 of file version.hpp.

◆ gambit_version_major

const int Gambit::gambit_version_major = 0

Definition at line 29 of file version.hpp.

Referenced by get_gambit_version().

◆ gambit_version_minor

const int Gambit::gambit_version_minor = 0

Definition at line 35 of file version.hpp.

Referenced by get_gambit_version().

◆ gambit_version_patch

const str Gambit::gambit_version_patch = ""

Definition at line 47 of file version.hpp.

Referenced by get_gambit_version().

◆ gambit_version_revision

const int Gambit::gambit_version_revision = 0

Definition at line 41 of file version.hpp.

Referenced by get_gambit_version().

◆ gev2cm

◆ gev2cm2

◆ gev2pb

◆ gev2tocm3s1

const double Gambit::gev2tocm3s1 = 1.16733e-17

Definition at line 39 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::DEF_FUNKTRAIT().

◆ hbar

const double Gambit::hbar = 6.582119514e-25

◆ K2eV

const double Gambit::K2eV = 8.6173303e-5

◆ m_electron

const double Gambit::m_electron = 0.5109989461e-3

Definition at line 48 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::intersect_parabola_line().

◆ m_neutron

◆ m_neutron_amu

const double Gambit::m_neutron_amu = 1.0086649156

Definition at line 45 of file numerical_constants.hpp.

◆ m_planck

const double Gambit::m_planck = 1.220910e19

Definition at line 41 of file numerical_constants.hpp.

◆ m_planck_red

◆ m_proton

◆ m_proton_amu

const double Gambit::m_proton_amu = 1.00727646688

Definition at line 44 of file numerical_constants.hpp.

◆ mw_central_observed

const double Gambit::mw_central_observed = 80.385

M_W (Breit-Wigner mass parameter ~ pole) = 80.385 +/- 0.015 GeV (1 sigma), Gaussian.

Reference http://pdg.lbl.gov/2014/listings/rpp2014-list-w-boson.pdf = K.A. Olive et al. (Particle Data Group), Chin. Phys. C38, 090001 (2014)

Definition at line 103 of file numerical_constants.hpp.

Referenced by Gambit::PrecisionBit::FH_PrecisionObs(), Gambit::PrecisionBit::lnL_W_mass_chi2(), and Gambit::SMInputs::SMInputs().

◆ mw_err_observed

const double Gambit::mw_err_observed = 0.015

◆ pi

const double Gambit::pi = 3.141592653589793238462643383279502884197

Definition at line 31 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::ALPS1_signal_general(), Gambit::DarkBit::alt_erg_integrand(), Gambit::DarkBit::calc_AxionOscillationTemperature(), Gambit::DarkBit::calc_lnL_Haloscope_ADMX1(), Gambit::DecayBit::chargino_plus_1_decays_smallsplit(), Gambit::DecayBit::DiracSingletDM_Higgs_decays(), Gambit::FlavBit::Vertices::DL(), Gambit::FlavBit::Vertices::DR(), Gambit::FlavBit::Vertices::EL(), Gambit::DarkBit::equation_Tosc(), Gambit::FlavBit::Vertices::ER(), Gambit::DarkBit::erg_integrand(), Gambit::SpecBit::find_min_lambda_Helper(), Gambit::FlavBit::Vertices::Fw(), Gambit::Stats::gaussian_loglikelihood(), Gambit::Stats::gaussian_upper_limit(), Gambit::SpecBit::get_DiracSingletDM_Z2_spectrum(), Gambit::SpecBit::get_MajoranaSingletDM_Z2_spectrum(), Gambit::ColliderBit::get_sigma_ee_chi00(), Gambit::ColliderBit::get_sigma_ee_chipm(), Gambit::ColliderBit::get_sigma_ee_ll(), Gambit::SpecBit::get_SMINPUTS(), Gambit::SpecBit::get_VectorSingletDM_Z2_spectrum(), Gambit::DarkBit::intersect_parabola_line(), Gambit::FlavBit::FormFactors::K1R(), Gambit::FlavBit::FormFactors::K2L(), Gambit::FlavBit::FormFactors::K2R(), Gambit::Stats::lognormal_loglikelihood_relerror(), main(), Gambit::DecayBit::MajoranaSingletDM_Higgs_decays(), Gambit::SpecBit::MSSM_higgs_couplings_pwid(), Gambit::DecayBit::MSSM_inv_Higgs_BF(), Gambit::DarkBit::RD_oh2_Axions(), Gambit::FlavBit::RHN_l2lll(), Gambit::FlavBit::RHN_mueee(), Gambit::FlavBit::RHN_muePb(), Gambit::FlavBit::RHN_mueTi(), Gambit::FlavBit::RHN_taueee(), Gambit::FlavBit::RHN_taueemu(), Gambit::FlavBit::RHN_tauemumu(), Gambit::FlavBit::RHN_taumuee(), Gambit::FlavBit::RHN_taumumue(), Gambit::FlavBit::RHN_taumumumu(), Gambit::DecayBit::ScalarSingletDM_Higgs_decays(), Gambit::FlavBit::Penguins::ShsumLL(), Gambit::FlavBit::Penguins::ShsumLR(), Gambit::FlavBit::Penguins::ShsumRL(), Gambit::FlavBit::Penguins::ShsumRR(), Gambit::DarkBit::sigma_SD_n_simple(), Gambit::DarkBit::sigma_SD_p_simple(), Gambit::DarkBit::sigma_SI_n_simple(), Gambit::DarkBit::sigma_SI_p_simple(), Gambit::DarkBit::sigma_SI_vnqn(), Gambit::DecayBit::stau_1_decays_smallsplit(), Gambit::FlavBit::Vertices::UL(), Gambit::FlavBit::Vertices::UR(), Gambit::DecayBit::VectorSingletDM_Higgs_decays(), Gambit::FlavBit::Vertices::VL(), Gambit::FlavBit::Vertices::VR(), Gambit::FlavBit::Boxes::VsumdLL(), Gambit::FlavBit::Boxes::VsumlLL(), Gambit::FlavBit::Boxes::VsumuLL(), Gambit::FlavBit::Penguins::VZsumLL(), Gambit::FlavBit::Penguins::VZsumLR(), Gambit::FlavBit::Penguins::VZsumRL(), Gambit::FlavBit::Penguins::VZsumRR(), Gambit::ColliderBit::xsec_chaichaj(), Gambit::ColliderBit::xsec_neuineuj(), and Gambit::ColliderBit::xsec_sleislej().

◆ piped_errors

◆ piped_invalid_point

◆ piped_warnings

◆ root2

const double Gambit::root2 = sqrt(2.0)

◆ s2cm

const double Gambit::s2cm = 2.99792458e10

Definition at line 40 of file numerical_constants.hpp.

◆ T_CMB

const double Gambit::T_CMB = 2.7255

Definition at line 50 of file numerical_constants.hpp.

Referenced by Gambit::DarkBit::RD_oh2_Axions().