25 #include <momemta/Module.h> 26 #include <momemta/ParameterSet.h> 27 #include <momemta/Particle.h> 28 #include <momemta/Pool.h> 29 #include <momemta/Types.h> 35 class ComputationGraph;
75 std::vector<std::pair<double, double>> computeWeights(
const std::vector<momemta::Particle>& particles,
76 const LorentzVector& met=LorentzVector());
85 void setEvent(
const std::vector<momemta::Particle>& particles,
const LorentzVector& met=LorentzVector());
97 std::vector<double> evaluateIntegrand(
const std::vector<double>& psPoints);
112 const Pool& getPool()
const;
115 class integrands_output_error:
public std::runtime_error {
116 using std::runtime_error::runtime_error;
118 class cuba_configuration_error:
public std::runtime_error {
119 using std::runtime_error::runtime_error;
121 class unphysical_lorentzvector_error:
public std::exception {
123 unphysical_lorentzvector_error(
const LorentzVector& p4);
124 virtual const char* what()
const noexcept
override;
128 class invalid_inputs:
public std::runtime_error {
129 using std::runtime_error::runtime_error;
131 class integrands_nonfinite_error:
public std::runtime_error {
132 using std::runtime_error::runtime_error;
142 void checkIfPhysical(
const LorentzVector& p4);
149 int integrand(
const double* psPoints,
double* results,
const double* weights=
nullptr);
151 static int CUBAIntegrand(
const int *nDim,
const double* psPoint,
const int *nComp,
double *value,
void *inputs,
const int *nVec,
const int *core);
152 static int CUBAIntegrandWeighted(
const int *nDim,
const double* psPoint,
const int *nComp,
double *value,
void *inputs,
const int *nVec,
const int *core,
const double *weight);
153 static void cuba_logging(
const char*);
156 std::shared_ptr<momemta::ComputationGraph> m_computation_graph;
158 using SharedLibraryPtr = std::shared_ptr<SharedLibrary>;
159 std::vector<SharedLibraryPtr> m_libraries;
161 std::size_t m_n_dimensions;
162 std::size_t m_n_components;
168 std::shared_ptr<std::vector<double>> m_ps_points;
169 std::shared_ptr<double> m_ps_weight;
171 std::unordered_map<std::string, std::shared_ptr<LorentzVector>> m_inputs_p4;
172 std::unordered_map<std::string, std::shared_ptr<int64_t>> m_inputs_type;
173 std::shared_ptr<LorentzVector> m_met;
174 std::vector<Value<double>> m_integrands;
A class encapsulating a lua table.
A frozen snapshot of the configuration file.
IntegrationStatus
Status of the integration.