cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.3
A generic central exclusive processes event generator
Loading...
Searching...
No Matches
Generator Class Reference

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 RunParametersrunParameters () const
 Pointer to the parameters block.
 
RunParametersrunParameters ()
 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 Eventnext ()
 Generate one single event.
 
double computePoint (const std::vector< double > &x)
 Compute one single point from the total phase space.
 

Detailed Description

Author
Laurent Forthomme laure.nosp@m.nt.f.nosp@m.ortho.nosp@m.mme@.nosp@m.cern..nosp@m.ch
Date
Feb 2013

Definition at line 48 of file Generator.h.

Constructor & Destructor Documentation

◆ Generator() [1/2]

Generator ( bool  safe_mode = false)
explicit
Parameters
[in]safe_modeLoad the generator without external libraries?

Definition at line 38 of file Generator.cpp.

◆ Generator() [2/2]

Generator ( RunParameters ip)
explicit

Definition at line 50 of file Generator.cpp.

◆ ~Generator()

~Generator ( )

Definition at line 52 of file Generator.cpp.

Member Function Documentation

◆ computePoint()

double computePoint ( const std::vector< double > &  x)
Parameters
[in]xthe n-dimensional point to compute
Returns
the function value for the given point

Definition at line 90 of file Generator.cpp.

◆ computeXsection() [1/2]

Value computeXsection ( )
Parameters
[out]xsecThe computed cross-section, in pb
[out]errThe absolute integration error on the computed cross-section, in pb

Definition at line 110 of file Generator.cpp.

◆ computeXsection() [2/2]

void computeXsection ( double &  cross_section,
double &  err 
)

Definition at line 104 of file Generator.cpp.

◆ crossSection()

double crossSection ( ) const

Definition at line 69 of file Generator.h.

◆ crossSectionError()

double crossSectionError ( ) const

Definition at line 70 of file Generator.h.

◆ generate() [1/2]

void generate ( size_t  num_events,
const std::function< void(const Event &, size_t)> &  callback 
)

Definition at line 235 of file Generator.cpp.

◆ generate() [2/2]

void generate ( size_t  num_events,
const std::function< void(const proc::Process &)> &  callback = nullptr 
)

Definition at line 202 of file Generator.cpp.

◆ integrate()

void integrate ( )

Definition at line 145 of file Generator.cpp.

◆ next()

const Event & next ( )

Definition at line 191 of file Generator.cpp.

◆ parseRunParameters()

void parseRunParameters ( const std::string &  filename)

Definition at line 72 of file Generator.cpp.

◆ runParameters() [1/2]

RunParameters & runParameters ( )

Definition at line 82 of file Generator.cpp.

◆ runParameters() [2/2]

const RunParameters & runParameters ( ) const

Definition at line 76 of file Generator.cpp.

◆ setIntegrator()

void setIntegrator ( std::unique_ptr< Integrator integ)

Definition at line 135 of file Generator.cpp.

◆ setRunParameters()

void setRunParameters ( std::unique_ptr< RunParameters > &  ip)

Definition at line 88 of file Generator.cpp.