gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
ProcessCatalog.hpp
Go to the documentation of this file.
1 // GAMBIT: Global and Modular BSM Inference Tool
2 // *********************************************
25 
26 
27 #ifndef __ProcessCatalog_hpp__
28 #define __ProcessCatalog_hpp__
29 
30 #include <vector>
31 #include <map>
32 
34 #include "gambit/cmake/cmake_variables.hpp"
36 
37 namespace Gambit
38 {
39 
40  namespace DarkBit
41  {
43  struct TH_Resonance
44  {
45  TH_Resonance() : energy(0.), width (0.) {}
46 
47  TH_Resonance(double energy, double width) : energy(energy), width(width) {}
48 
49  double energy;
50  double width;
51  };
52 
55  {
57 
59  resonances(copy.resonances), threshold_energy(copy.threshold_energy) {}
60 
61  TH_resonances_thresholds(const std::vector<TH_Resonance> & resonances,
62  const std::vector<double> & thresholds) :
63  resonances(resonances), threshold_energy(thresholds) {}
64 
65  std::vector<TH_Resonance> resonances;
66  std::vector<double> threshold_energy;
67  };
68 
71  {
73  TH_ParticleProperty(double mass, unsigned int spin2);
74 
76  double mass;
77 
79  unsigned int spin2;
80  };
81 
84  struct TH_Channel
85  {
86  // Functions
87 
89  TH_Channel(std::vector<str> finalStateIDs, daFunk::Funk genRate);
90 
92  void printChannel() const;
93 
95  bool channelContains(str p) const;
96 
98  bool isChannel(str, str, str = "", str = "") const;
99 
101  bool isChannel(std::vector<str>) const;
102 
103 
104  // Variables
105 
107  std::vector<std::string> finalStateIDs;
108 
110  unsigned int nFinalStates;
111 
113  daFunk::Funk genRate = daFunk::zero("dummyArgument");
114  };
115 
121  struct TH_Process
122  {
123  // Functions
124 
126  TH_Process(const str & particle1ID);
127 
129  TH_Process(const str & particle1ID, const str & particle2ID);
130 
132  bool isProcess(const str &, const str & = std::string()) const;
133 
135  const TH_Channel* find(std::vector<str>) const;
136 
137 
138  // Variables
139 
142 
148 
151 
153  std::vector<TH_Channel> channelList;
154 
157 
160  };
161 
164  {
165  // Functions
166 
168  TH_Process getProcess(str, str = "") const;
169 
171  const TH_Process* find(str, str = "") const;
172 
174  TH_ParticleProperty getParticleProperty(str) const;
175 
177  bool hasParticleProperty(str) const;
178 
180  void validate();
181 
182 
183  // Variables
184 
186  std::vector<TH_Process> processList;
187 
189  std::map<std::string, TH_ParticleProperty> particleProperties;
190  };
191  }
192 }
193 
194 #endif // #defined __ProcessCatalog_hpp__
std::vector< TH_Channel > channelList
List of channels.
std::vector< TH_Resonance > resonances
General small utility classes, typedefs, etc.
TH_resonances_thresholds(const TH_resonances_thresholds &copy)
TH_resonances_thresholds(const std::vector< TH_Resonance > &resonances, const std::vector< double > &thresholds)
TH_Resonance(double energy, double width)
bool isSelfConj
Does the process contain self-conjugate DM? (accounting for correct factors of 1/2 in annihilation sp...
A single resonance of a given width at a given energy (both in GeV)
double mass
Particle mass (GeV)
unsigned int nFinalStates
Number of final state particles in this channel.
std::map< std::string, TH_ParticleProperty > particleProperties
Map from particles involved in the processes of this catalog, to their properties.
TH_resonances_thresholds resonances_thresholds
List of resonances and thresholds.
A container holding all annihilation and decay initial states relevant for DarkBit.
A container for the mass and spin of a particle.
unsigned int spin2
Twice the spin of the particle.
std::string str
Shorthand for a standard string.
Definition: Analysis.hpp:35
All data on a single annihilation or decay channel, e.g.
daFunk::Funk genRateMisc
Additional decay rate or sigmav (in addition to above channels)
bool isAnnihilation
Annihilation or decay?
std::vector< std::string > finalStateIDs
Final state identifiers.
Location of resonances and thresholds in energy (GeV)
Funk zero(Args... argss)
Definition: daFunk.hpp:604
A container for a single process.
shared_ptr< FunkBase > Funk
Definition: daFunk.hpp:113
std::vector< TH_Process > processList
Vector of all processes in this catalog.
TODO: see if we can use this one:
Definition: Analysis.hpp:33
str particle1ID
Decaying particle or particle pair.