gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
virtual_higgs.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
23 
24 #include <map>
25 #include <vector>
26 #include <sstream>
27 
30 #include "gambit/cmake/cmake_variables.hpp"
31 
32 namespace Gambit
33 {
34 
36  double virtual_SMHiggs_widths(str channel, double mh)
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  }
128 
129 }
Simple function for returning SM Higgs partial and total widths as a function of virtuality, as read from data files from CERN Yellow Paper arXiv:1101.0593.
EXPORT_SYMBOLS error & utils_error()
Utility errors.
void setcolnames(std::vector< std::string > names)
Simple reader for ASCII tables.
#define LOCAL_INFO
Definition: local_info.hpp:34
double virtual_SMHiggs_widths(str, double)
Higgs branching ratios and total width Gamma [GeV], as function of mass [GeV] (90 - 300 GeV) ...
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:1349
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
Spectrum Spectrum Spectrum Spectrum Spectrum Spectrum mh
TODO: see if we can use this one:
Definition: Analysis.hpp:33