gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
SpecBit.cpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
23 
24 #include <string>
25 #include <sstream>
26 
29 
30 // QedQcd header from SoftSUSY (via FlexibleSUSY)
31 #include "flexiblesusy/src/lowe.h"
32 
33 namespace Gambit
34 {
35 
36  namespace SpecBit
37  {
38  using namespace LogTags;
39 
40  // To check if a model is currently being scanned:
41  // bool Pipes::<fname>::ModelInUse(str model_name)
42 
43 
45  // =======================================================================
46  // These are not known to Gambit, but they do basically all the real work.
47  // The Gambit module functions merely wrap the functions here and hook
48  // them up to their dependencies, and input parameters.
49 
51  void setup_QedQcd(softsusy::QedQcd& oneset /*output*/, const SMInputs& sminputs /*input*/)
52  {
53  // Set pole masses (to be treated specially)
54  oneset.setPoleMt(sminputs.mT);
55  //oneset.setPoleMb(...);
56  oneset.setPoleMtau(sminputs.mTau);
57  oneset.setMbMb(sminputs.mBmB);
59  oneset.setMass(softsusy::mDown, sminputs.mD);
60  oneset.setMass(softsusy::mUp, sminputs.mU);
61  oneset.setMass(softsusy::mStrange, sminputs.mS);
62  oneset.setMass(softsusy::mCharm, sminputs.mCmC);
64  oneset.setAlpha(softsusy::ALPHA, 1./sminputs.alphainv);
65  oneset.setAlpha(softsusy::ALPHAS, sminputs.alphaS);
69  oneset.setMass(softsusy::mElectron, sminputs.mE);
70  oneset.setMass(softsusy::mMuon, sminputs.mMu);
71  oneset.setPoleMZ(sminputs.mZ);
72  }
73 
75  bool has_neutralino_LSP(const Spectrum& result)
76  {
77  double msqd = result.get(Par::Pole_Mass, 1000001, 0);
78  double msqu = result.get(Par::Pole_Mass, 1000002, 0);
79  double msl = result.get(Par::Pole_Mass, 1000011, 0);
80  double msneu = result.get(Par::Pole_Mass, 1000012, 0);
81  double mglui = result.get(Par::Pole_Mass, 1000021, 0);
82  double mchi0 = std::abs(result.get(Par::Pole_Mass, 1000022, 0));
83  double mchip = std::abs(result.get(Par::Pole_Mass, 1000024, 0));
84 
85  return mchi0 < mchip &&
86  mchi0 < mglui &&
87  mchi0 < msl &&
88  mchi0 < msneu &&
89  mchi0 < msqu &&
90  mchi0 < msqd;
91  }
93  bool has_neutralino_LSP(const Spectrum* result)
94  {
95  return has_neutralino_LSP(*result);
96  }
97 
99 
100 
102  // =======================================================================
103  // These are wrapped up in Gambit functor objects according to the
104  // instructions in the rollcall header
105 
107  // Effectively just changes these model parameters into a more convenient form.
108  // But also opens up the possibility of rebuilding this struct from some other
109  // parameterisation.
110  void get_SMINPUTS(SMInputs &result)
111  {
112  namespace myPipe = Pipes::get_SMINPUTS;
113  SMInputs sminputs;
114 
115  // Get values from Params pipe
116  // (as defined in SLHA2)
117  if(myPipe::ModelInUse("StandardModel_SLHA2"))
118  {
119  sminputs.alphainv = *myPipe::Param["alphainv"];
120  sminputs.GF = *myPipe::Param["GF" ];
121  sminputs.alphaS = *myPipe::Param["alphaS" ];
122 
123  sminputs.mZ = *myPipe::Param["mZ" ];
124 
125  sminputs.mE = *myPipe::Param["mE" ];
126  sminputs.mMu = *myPipe::Param["mMu" ];
127  sminputs.mTau = *myPipe::Param["mTau" ];
128 
129  sminputs.mNu1 = *myPipe::Param["mNu1" ];
130  sminputs.mNu2 = *myPipe::Param["mNu2" ];
131  sminputs.mNu3 = *myPipe::Param["mNu3" ];
132 
133  sminputs.mD = *myPipe::Param["mD" ];
134  sminputs.mU = *myPipe::Param["mU" ];
135  sminputs.mS = *myPipe::Param["mS" ];
136  sminputs.mCmC = *myPipe::Param["mCmC" ];
137  sminputs.mBmB = *myPipe::Param["mBmB" ];
138  sminputs.mT = *myPipe::Param["mT" ];
139 
140  sminputs.mNu1 = *myPipe::Param["mNu1" ];
141  sminputs.mNu2 = *myPipe::Param["mNu2" ];
142  sminputs.mNu3 = *myPipe::Param["mNu3" ];
143 
144  // CKM
145  sminputs.CKM.lambda = *myPipe::Param["CKM_lambda" ];
146  sminputs.CKM.A = *myPipe::Param["CKM_A" ];
147  sminputs.CKM.rhobar = *myPipe::Param["CKM_rhobar" ];
148  sminputs.CKM.etabar = *myPipe::Param["CKM_etabar" ];
149 
150  // PMNS
151  sminputs.PMNS.theta12 = *myPipe::Param["theta12"];
152  sminputs.PMNS.theta23 = *myPipe::Param["theta23"];
153  sminputs.PMNS.theta13 = *myPipe::Param["theta13"];
154  sminputs.PMNS.delta13 = *myPipe::Param["delta13"];
155  sminputs.PMNS.alpha1 = *myPipe::Param["alpha1"];
156  sminputs.PMNS.alpha2 = *myPipe::Param["alpha2"];
157 
158  // W mass. Stick with the observed value (set in the default constructor) unless instructed otherwise.
159  if (myPipe::runOptions->getValueOrDef<bool>(false,"enforce_tree_level_MW"))
160  {
161  // Calculate MW from alpha, mZ and G_F, assuming the tree-level relation.
162  const double pionroot2 = pi * pow(2,-0.5);
163  double cosW2 = 0.5 + pow(0.25 - pionroot2 / (sminputs.alphainv * sminputs.GF * pow(sminputs.mZ,2.0)), 0.5);
164  sminputs.mW = sminputs.mZ * pow(cosW2,0.5);
165  }
166 
167  }
168  else
169  {
170  std::ostringstream errmsg;
171  errmsg << "Error mapping Standard Model parameters to SMINPUTS capabilities!";
172  errmsg << "Perhaps you have added a new model to the ALLOWED_MODELS of this ";
173  errmsg << "module function but have not added a corresponding case in the ";
174  errmsg << "function source (here)." << std::endl;
175  SpecBit_error().raise(LOCAL_INFO,errmsg.str());
176  }
177  // Return filled struct
178  result = sminputs;
179  }
180 
182 
183  } // end namespace SpecBit
184 } // end namespace Gambit
185 
double get(const Par::Tags partype, const std::string &mass) const
Definition: spectrum.cpp:249
Rollcall header for module SpecBit.
#define LOCAL_INFO
Definition: local_info.hpp:34
void get_SMINPUTS(SMInputs &result)
Gambit module functions.
Definition: SpecBit.cpp:110
void setup_QedQcd(softsusy::QedQcd &oneset, const SMInputs &sminputs)
Non-Gambit helper functions.
Definition: SpecBit.cpp:51
const double pi
bool has_neutralino_LSP(const Spectrum &result)
Check that the spectrum has a neutralino LSP.
Definition: SpecBit.cpp:75
Header file that includes all GAMBIT headers required for a module source file.
double pow(const double &a)
Outputs a^i.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
"Standard Model" (low-energy) plus high-energy model container class
Definition: spectrum.hpp:110
Container class for Standard Model input information (defined as in SLHA2)
Definition: sminputs.hpp:29