CepGen 1.2.5
Central exclusive processes event generator
|
Core generator object allowing for process definition, cross section computation, and event generation. More...
#include <CepGen/Generator.h>
Public Member Functions | |
Generator (bool safe_mode=false) | |
Initialise the Monte Carlo integrator and event generator. | |
Generator (RunParameters *) | |
Build a 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. | |
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 > &x) |
Compute one single point from the total phase space. | |
Definition at line 48 of file Generator.h.
|
explicit |
[in] | safe_mode | Load the generator without external libraries? |
Definition at line 38 of file Generator.cpp.
|
explicit |
Definition at line 50 of file Generator.cpp.
~Generator | ( | ) |
Definition at line 52 of file Generator.cpp.
double computePoint | ( | const std::vector< double > & | x | ) |
[in] | x | the n-dimensional point to compute |
Definition at line 90 of file Generator.cpp.
Value computeXsection | ( | ) |
[out] | xsec | The computed cross-section, in pb |
[out] | err | The absolute integration error on the computed cross-section, in pb |
Definition at line 110 of file Generator.cpp.
void computeXsection | ( | double & | cross_section, |
double & | err | ||
) |
Definition at line 104 of file Generator.cpp.
double crossSection | ( | ) | const |
Definition at line 69 of file Generator.h.
double crossSectionError | ( | ) | const |
Definition at line 70 of file Generator.h.
void generate | ( | size_t | num_events, |
const std::function< void(const Event &, size_t)> & | callback | ||
) |
Definition at line 235 of file Generator.cpp.
void generate | ( | size_t | num_events, |
const std::function< void(const proc::Process &)> & | callback = nullptr |
||
) |
Definition at line 202 of file Generator.cpp.
void integrate | ( | ) |
Definition at line 145 of file Generator.cpp.
const Event & next | ( | ) |
Definition at line 191 of file Generator.cpp.
void parseRunParameters | ( | const std::string & | filename | ) |
Definition at line 72 of file Generator.cpp.
RunParameters & runParameters | ( | ) |
Definition at line 82 of file Generator.cpp.
const RunParameters & runParameters | ( | ) | const |
Definition at line 76 of file Generator.cpp.
void setIntegrator | ( | std::unique_ptr< Integrator > | integ | ) |
Definition at line 135 of file Generator.cpp.
void setRunParameters | ( | std::unique_ptr< RunParameters > & | ip | ) |
Definition at line 88 of file Generator.cpp.