Core generator object allowing for process definition, cross-section computation, and event generation. More...
#include <include/CepGen/Generator.h>
Public Member Functions | |
Generator (bool safe_mode=false) | |
Initialise the Monte Carlo integrator and event generator. | |
Generator (RunParameters *) | |
Build an MC generator object. | |
~Generator () | |
void | parseRunParameters (const std::string &) |
Read a steering card to populate the run parameters block. | |
const RunParameters & | runParameters () const |
Pointer to the parameters block. | |
RunParameters & | runParameters () |
Run parameters block. | |
void | setRunParameters (std::unique_ptr< RunParameters > &) |
Feed the generator with a RunParameters object. | |
void | setIntegrator (std::unique_ptr< Integrator >) |
Specify an integrator algorithm configuration. | |
Integrator & | integrator () const |
Retrieve the integrator object. | |
void | integrate () |
Integrate the functional over the phase space of interest. | |
Value | computeXsection () |
Compute the cross-section and uncertainty, in pb, for the run parameters Compute the cross-section for the run parameters. | |
void | computeXsection (double &cross_section, double &err) |
double | crossSection () const |
Last cross-section computed by the generator. | |
double | crossSectionError () const |
Last error on the cross-section computed. | |
void | generate (size_t num_events, const std::function< void(const Event &, size_t)> &) |
Generate events. | |
void | generate (size_t num_events, const std::function< void(const proc::Process &)> &=nullptr) |
Generate events. | |
const Event & | next () |
Generate one single event. | |
double | computePoint (const std::vector< double > &coordinates) |
Compute one single point from the total phase space. | |
Definition at line 50 of file Generator.h.
|
explicit |
[in] | safe_mode | Load the generator without external libraries? |
|
explicit |
~Generator | ( | ) |
double computePoint | ( | const std::vector< double > & | coordinates | ) |
[in] | coordinates | the n-dimensional point to compute |
Value computeXsection | ( | ) |
[out] | cross_section | The computed cross-section, in pb |
[out] | err | The absolute integration error on the computed cross-section, in pb |
void computeXsection | ( | double & | cross_section, |
double & | err ) |
double crossSection | ( | ) | const |
Definition at line 72 of file Generator.h.
double crossSectionError | ( | ) | const |
Definition at line 73 of file Generator.h.
void generate | ( | size_t | num_events, |
const std::function< void(const Event &, size_t)> & | ) |
void generate | ( | size_t | num_events, |
const std::function< void(const proc::Process &)> & | = nullptr ) |
void integrate | ( | ) |
Integrator & integrator | ( | ) | const |
const Event & next | ( | ) |
void parseRunParameters | ( | const std::string & | ) |
RunParameters & runParameters | ( | ) |
const RunParameters & runParameters | ( | ) | const |
void setIntegrator | ( | std::unique_ptr< Integrator > | ) |
void setRunParameters | ( | std::unique_ptr< RunParameters > & | ) |