gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
Gambit::DarkBit::TH_ProcessCatalog Struct Reference

A container holding all annihilation and decay initial states relevant for DarkBit. More...

#include <ProcessCatalog.hpp>

Collaboration diagram for Gambit::DarkBit::TH_ProcessCatalog:

Public Member Functions

TH_Process getProcess (str, str="") const
 Retrieve a specific process from the catalog. More...
 
const TH_Processfind (str, str="") const
 Check for a specific process in the catalog. More...
 
TH_ParticleProperty getParticleProperty (str) const
 Retrieve properties of a given particle involved in one or more processes in this catalog. More...
 
bool hasParticleProperty (str) const
 Check whether particle is in particle properties catalog. More...
 
void validate ()
 Validate kinematics and entries. More...
 

Public Attributes

std::vector< TH_ProcessprocessList
 Vector of all processes in this catalog. More...
 
std::map< std::string, TH_ParticlePropertyparticleProperties
 Map from particles involved in the processes of this catalog, to their properties. More...
 

Detailed Description

A container holding all annihilation and decay initial states relevant for DarkBit.

Definition at line 163 of file ProcessCatalog.hpp.

Member Function Documentation

◆ find()

const TH_Process * Gambit::DarkBit::TH_ProcessCatalog::find ( str  id1,
str  id2 = "" 
) const

Check for a specific process in the catalog.

Definition at line 148 of file ProcessCatalog.cpp.

References Gambit::DarkBit::TH_Process::isProcess().

149  {
150  for (std::vector<TH_Process>::const_iterator it = processList.begin();
151  it != processList.end(); ++it)
152  {
153  if ( it -> isProcess(id1, id2) ) return &(*it);
154  }
155  return NULL;
156  }
std::vector< TH_Process > processList
Vector of all processes in this catalog.
Here is the call graph for this function:

◆ getParticleProperty()

TH_ParticleProperty Gambit::DarkBit::TH_ProcessCatalog::getParticleProperty ( str  id) const

Retrieve properties of a given particle involved in one or more processes in this catalog.

Definition at line 161 of file ProcessCatalog.cpp.

References Gambit::DarkBit::DarkBit_error(), and LOCAL_INFO.

Referenced by Gambit::DarkBit::cascadeMC_sampleSimYield(), Gambit::DarkBit::DecayChain::DecayTable::DecayTable(), Gambit::DarkBit::getYield(), Gambit::DarkBit::DarkBit_utils::ImportDecays(), Gambit::DarkBit::TH_ProcessCatalog_DS5_MSSM(), Gambit::DarkBit::TH_ProcessCatalog_DS_MSSM(), and Gambit::DarkBit::TH_ProcessCatalog_WIMP().

162  {
163  auto it = particleProperties.find(id);
164  if ( it == particleProperties.end() )
165  {
166  DarkBit_error().raise(LOCAL_INFO,
167  "Cannot find entry for " + id +
168  " in particleProperties of TH_ProcessCatalog.");
169  }
170  return it->second;
171  }
error & DarkBit_error()
#define LOCAL_INFO
Definition: local_info.hpp:34
std::map< std::string, TH_ParticleProperty > particleProperties
Map from particles involved in the processes of this catalog, to their properties.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProcess()

TH_Process Gambit::DarkBit::TH_ProcessCatalog::getProcess ( str  id1,
str  id2 = "" 
) const

Retrieve a specific process from the catalog.

Definition at line 136 of file ProcessCatalog.cpp.

References Gambit::DarkBit::DarkBit_error(), Gambit::DarkBit::TH_Process::find(), and LOCAL_INFO.

137  {
138  const TH_Process* temp = find(id1, id2);
139  if (temp == NULL)
140  {
141  DarkBit_error().raise(LOCAL_INFO,
142  "Process with initial states " + id1 + " " + id2 + " missing.");
143  }
144  return *temp;
145  }
error & DarkBit_error()
#define LOCAL_INFO
Definition: local_info.hpp:34
const TH_Process * find(str, str="") const
Check for a specific process in the catalog.
Here is the call graph for this function:

◆ hasParticleProperty()

bool Gambit::DarkBit::TH_ProcessCatalog::hasParticleProperty ( str  id) const

Check whether particle is in particle properties catalog.

Definition at line 173 of file ProcessCatalog.cpp.

174  {
175  auto it = particleProperties.find(id);
176  return (it != particleProperties.end());
177  }
std::map< std::string, TH_ParticleProperty > particleProperties
Map from particles involved in the processes of this catalog, to their properties.

◆ validate()

void Gambit::DarkBit::TH_ProcessCatalog::validate ( )

Validate kinematics and entries.

Definition at line 180 of file ProcessCatalog.cpp.

References Gambit::DarkBit::DarkBit_error(), LOCAL_INFO, generate_raster_scan_settings::m1, generate_raster_scan_settings::m2, and Gambit::Scanner::pow().

Referenced by Gambit::DarkBit::TH_ProcessCatalog_DS5_MSSM(), Gambit::DarkBit::TH_ProcessCatalog_DS_MSSM(), and Gambit::DarkBit::TH_ProcessCatalog_WIMP().

181  {
182 #ifdef DARKBIG_DEBUG
183  std::cout << std::endl;
184  std::cout << "********************************" << std::endl;
185  std::cout << "*** Validate Process catalog ***" << std::endl;
186  std::cout << "********************************" << std::endl;
187  std::cout << std::endl;
188 #endif
189 
190  for (auto it = processList.begin(); it != processList.end(); it++)
191  {
192  if (it->isAnnihilation) // Annihilation
193  {
194  std::string p1ID = it->particle1ID;
195  std::string p2ID = it->particle2ID;
196  double m1 = getParticleProperty(p1ID).mass;
197  double m2 = getParticleProperty(p2ID).mass;
198  double E_in = m1 + m2;
199 #ifdef DARKBIT_DEBUG
200  std::cout << "Annihilation process for: " << p1ID << " " << p2ID << std::endl;
201  std::cout << " Masses (GeV): " << m1 << " " << m2 << std::endl;
202 #endif
203 
204  if ((it->genRateMisc->getNArgs() != 1) or not(it->genRateMisc->hasArg("v")))
205  DarkBit_error().raise(LOCAL_INFO,
206  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
207  " genRateMisc must have relative velocity v as only argument.");
208 
209 #ifdef DARKBIT_DEBUG
210  std::cout << " genRateMisc(v=0) = " << it->genRateMisc->bind("v")->eval(0) << std::endl;
211 #endif
212 
213  for (auto it2 = it->channelList.begin(); it2 != it->channelList.end(); it2++)
214  {
215  double E_out = 0;
216  std::string outstring = "";
217  for (size_t i = 0; i < it2->finalStateIDs.size(); i++)
218  {
219  E_out += getParticleProperty(it2->finalStateIDs[i]).mass;
220  outstring += it2->finalStateIDs[i] + " ";
221  }
222 #ifdef DARKBIT_DEBUG
223  std::cout << " Channel: " << outstring << std::endl;
224  std::cout << " Total mass: " << E_out << std::endl;
225 #endif
226  if (it2->nFinalStates != it2->finalStateIDs.size())
227  DarkBit_error().raise(LOCAL_INFO,
228  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
229  " inconsistent nFinalStates entry for final states " + outstring);
230  if ((it2->finalStateIDs.size() < 2) or (it2->finalStateIDs.size() > 3))
231  DarkBit_error().raise(LOCAL_INFO,
232  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
233  " number of final states not supported for annihilation into " + outstring);
234  if (it2->finalStateIDs.size() == 2)
235  if ((it2->genRate->getNArgs() != 1) or not it2->genRate->hasArg("v"))
236  DarkBit_error().raise(LOCAL_INFO,
237  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
238  " genRate must have relative velocity v as only argument for annihilation into " + outstring);
239  if (it2->finalStateIDs.size() == 3)
240  if (it2->genRate->getNArgs() != 3 or not it2->genRate->hasArg("E") or not it2->genRate->hasArg("E1") or not it2->genRate->hasArg("v"))
241  DarkBit_error().raise(LOCAL_INFO,
242  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
243  " genRate must have three arguments (v, E and E1) for annihilation into " + outstring);
244  if ((it2->finalStateIDs.size() == 3) and E_out > E_in)
245  {
246  // TODO: This could be defined more generally (allowing three-body final states that are closed for v=0)
247  DarkBit_error().raise(LOCAL_INFO,
248  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
249  " three-body final states kinematically not allowed for v=0 for annihilation into " + outstring);
250  }
251  // Test whether channels kinematically closed for v=0 are indeed closed
252  if ((it2->finalStateIDs.size() == 2) and (E_out > E_in))
253  {
254  double v_min = sqrt(1-1/pow(E_out/E_in,2));
255  if ( it2->genRate->bind("v")->eval(v_min*0.999) != 0 )
256  DarkBit_error().raise(LOCAL_INFO,
257  "Invalid TH_ProcessCatalog annihilation entry for " + it->particle1ID + " " + it->particle2ID + "\n"
258  " genRate must be zero for values of v that are below kinematic threshold for annihilation into " + outstring);
259  }
260 #ifdef DARKBIT_DEBUG
261  if (it2->finalStateIDs.size() == 2)
262  std::cout << " genRate(v=0) = " << it2->genRate->bind("v")->eval() << std::endl;
263  else
264  std::cout << " genRate(v=0) = f(E, E1)" << std::endl;
265 #endif
266  }
267  }
268  else // Decay
269  {
270  double E_in = getParticleProperty(it->particle1ID).mass;
271 
272 #ifdef DARKBIT_DEBUG
273  std::cout << "Decay process for: " << it->particle1ID << std::endl;
274  std::cout << " Mass (GeV): " << E_in << std::endl;
275  std::cout << " genRateMisc = " << it->genRateMisc->bind()->eval() << std::endl;
276 #endif
277 
278  if (it->genRateMisc->getNArgs() != 0)
279  DarkBit_error().raise(LOCAL_INFO,
280  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
281  " genRateMisc must have zero arguments.");
282  for (auto it2 = it->channelList.begin(); it2 != it->channelList.end(); it2++)
283  {
284  double E_out = 0;
285  std::string outstring = "";
286  for (size_t i = 0; i < it2->finalStateIDs.size(); i++)
287  {
288  E_out += getParticleProperty(it2->finalStateIDs[i]).mass;
289  outstring += it2->finalStateIDs[i] + " ";
290  }
291 #ifdef DARKBIT_DEBUG
292  std::cout << " Channel: " << outstring << std::endl;
293  std::cout << " Total mass: " << E_out << std::endl;
294 #endif
295  if (it2->nFinalStates != it2->finalStateIDs.size())
296  DarkBit_error().raise(LOCAL_INFO,
297  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
298  " inconsistent nFinalStates entry for final states " + outstring);
299  if ((it2->finalStateIDs.size() < 2) or (it2->finalStateIDs.size() > 3))
300  DarkBit_error().raise(LOCAL_INFO,
301  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
302  " number of final states not supported for decay into " + outstring);
303  if (it2->finalStateIDs.size() == 2)
304  if (it2->genRate->getNArgs() != 0)
305  DarkBit_error().raise(LOCAL_INFO,
306  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
307  " genRate must have zero arguments for decay into " + outstring);
308  if (it2->finalStateIDs.size() == 3)
309  if (it2->genRate->getNArgs() != 2 or not it2->genRate->hasArg("E") or not it2->genRate->hasArg("E1"))
310  DarkBit_error().raise(LOCAL_INFO,
311  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
312  " genRate must have two arguments (E and E1) for decay into " + outstring);
313  if (E_out > E_in)
314  DarkBit_error().raise(LOCAL_INFO,
315  "Invalid TH_ProcessCatalog decay entry for " + it->particle1ID + "\n"
316  " kinematically forbidden decay into " + outstring);
317 #ifdef DARKBIT_DEBUG
318  if (it2->finalStateIDs.size() == 2)
319  std::cout << " genRate = " << it2->genRate->bind()->eval() << std::endl;
320  else
321  std::cout << " genRate = f(E, E1)" << std::endl;
322 #endif
323  }
324  }
325  }
326 #ifdef DARKBIT_DEBUG
327  std::cout << std::endl;
328  std::cout << "*****************" << std::endl;
329  std::cout << "*** Validated ***" << std::endl;
330  std::cout << "*****************" << std::endl;
331  std::cout << std::endl;
332 #endif
333  }
error & DarkBit_error()
TH_ParticleProperty getParticleProperty(str) const
Retrieve properties of a given particle involved in one or more processes in this catalog...
#define LOCAL_INFO
Definition: local_info.hpp:34
double mass
Particle mass (GeV)
double pow(const double &a)
Outputs a^i.
std::vector< TH_Process > processList
Vector of all processes in this catalog.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ particleProperties

std::map<std::string, TH_ParticleProperty> Gambit::DarkBit::TH_ProcessCatalog::particleProperties

Map from particles involved in the processes of this catalog, to their properties.

Definition at line 189 of file ProcessCatalog.hpp.

Referenced by Gambit::DarkBit::TH_ProcessCatalog_DS5_MSSM(), and Gambit::DarkBit::TH_ProcessCatalog_DS_MSSM().

◆ processList


The documentation for this struct was generated from the following files: