gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
SpecBit_types.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
25 
26 
27 #ifndef __SpecBit_types_hpp__
28 #define __SpecBit_types_hpp__
29 
30 #include <string>
31 #include <vector>
33 
34 namespace Gambit
35 {
36 
37  namespace SpecBit
38  {
39 
40  // this vector of <int,double> pairs is the type the routine 'ReadLhaBlock' of vevacious uses to read
41  // in the passed parameters
42  typedef std::vector<std::pair<int,double>> vec_pair_int_dbl;
43 
44  // create a spectrum entry type storing all information necessary for the vevacious function 'ReadLhaBlock'
45  // => store name, parameters & dimension of an entry
47  {
48  std::string name;
49  vec_pair_int_dbl parameters;
50  int dimension;
51  };
52 
53  // typdef to avoid having to use 'struct SpectrumEntry' every time
54  typedef struct SpectrumEntry SpectrumEntry;
55 
61  typedef std::map<std::string,SpectrumEntry> map_str_SpectrumEntry;
62 
63 
69  {
70  public:
72 
73  // setter functions for scale, inputPath and input Filenames
74  void set_scale (double inScale) {scale = inScale;};
75  void set_inputPath (std::string inPath) {inputPath = inPath;};
76  void set_inputFilename (std::string inFile) {inputFilename = inFile;};
77 
78  // getter functions for scale, inputPath and input Filenames
79  double get_scale () {return scale;};
80  std::string get_inputFilename () {return inputFilename;};
81  std::string get_inputPath () {return inputPath;};
82 
83  // adds an entry to the spec_entry_map
84  void add_entry (std::string name, vec_pair_int_dbl vec, int dimension);
85 
86  // return spec_entry_map -> iterate through it to pass all entries to vevacious
87  map_str_SpectrumEntry get_spec_entry_map() {return spec_entry_map;};
88 
89  private:
90  double scale;
91  std::string inputFilename;
92  std::string inputPath;
93  map_str_SpectrumEntry spec_entry_map;
94  };
95 
96 
97  /* Class that stores the results computed by vevacious that will be
98  needed by other capabilites in GAMBIT */
100  {
101 
102  public:
103  // constructor initialises every member to -1 to avoid
104  // problems when printing results when vevacious did not run
106 
107  // clear all maps and set value of lifetime and thermalProbability to -1
108  void clear_results(const str panic_vaccum, int pathFinder_number);
109 
110  // setter functions for results lifetime, thermal probability & bounce action vectors
111  // straightPathGoodEnough checks wethere the action of drawing a straigh path between the
112  // physical & panic vacuum is already below the action threshold.
113  void set_results (str panic_vaccum, str name, double val);
114  void add_straightPathGoodEnough(str panic_vacuum);
115 
116  // return map containing results for nearest/global run
117  map_str_dbl get_nearest_results() {return result_map["nearest"];}
118  map_str_dbl get_global_results() {return result_map["global"];}
119 
120  // return width, lifetime for nearest/global minimum
121  double get_width(str panic_vacuum) { return result_map[panic_vacuum]["width"]; }
122  double get_lifetime(str panic_vaccum) {return result_map[panic_vaccum]["lifetime"]; }
123 
124  // return thermal probability and width for nearest/global minimum
125  double get_thermalProbability(str panic_vaccum) { return result_map[panic_vaccum]["thermalProbability"]; }
126  double get_thermalWidth(str panic_vacuum) { return result_map[panic_vacuum]["thermalWidth"]; }
127 
128  private:
130  };
131  }
132 }
133 
134 #endif // defined __SpecBit_types_hpp__
std::string name
std::map< std::string, std::map< std::string, double > > map_str_map_str_dbl
Shorthand for a string-to-string-to-double map.
Definition: util_types.hpp:76
General small utility classes, typedefs, etc.
double get_thermalProbability(str panic_vaccum)
std::map< std::string, SpectrumEntry > map_str_SpectrumEntry
map mapping the name of a spectrum entry to the SpectrumEntry type.
vec_pair_int_dbl parameters
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
std::vector< std::pair< int, double > > vec_pair_int_dbl
int dimension
std::map< std::string, double > map_str_dbl
Shorthand for a string-to-double map.
std::vector< T > vec(std::vector< T > vector)
Definition: daFunk.hpp:142
TODO: see if we can use this one:
Definition: Analysis.hpp:33
class for setting & storing all spectrum entries of type SpectrumEntry that need to be passed to veva...