Herwig 7.3.0
|
A generator for plain sampling and integrating. More...
#include <generator.h>
Public Member Functions | |
generator () | |
default constructor | |
template<class SlaveStatistics > | |
void | initialize (SlaveStatistics &) |
initialize this generator | |
template<class SlaveStatistics > | |
double | generate (SlaveStatistics &) |
generate an event, returning the sign of the weight | |
const std::vector< double > & | last_point () const |
return the last sampled phase space point | |
void | reject () |
indicate that the last generated point has been rejected | |
void | finalize () |
finalize this generator | |
bool | initialized () const |
return true, if this generator has been initialized | |
bool | did_split () const |
return true, if at least one split has been performed | |
Function & | function () |
access the function | |
void | function (Function *f) |
set the function | |
const statistics & | stats () const |
return the statistics object | |
double | volume () const |
return the sampled volume | |
double | integral () const |
return the integral | |
double | integral_uncertainty () const |
return the error on the integral | |
double | current_integral () const |
return the integral | |
double | current_integral_uncertainty () const |
return the error on the integral | |
double | integral_variance () const |
return the variance of the integral estimate | |
adaption_info & | sampling_parameters () |
access the adaption_info object | |
bool | compensating () const |
return true, if still compensating | |
template<class OStream > | |
void | put (OStream &os) const |
put to ostream | |
template<class IStream > | |
void | get (IStream &is) |
get from istream | |
Private Attributes | |
Function * | function_ |
function to be sampled | |
statistics | statistics_ |
the global statistics object | |
unsigned long | check_events_ |
the number of events after which a cell is checked for splits | |
adaption_info | adaption_info_ |
the adaption info object | |
binary_tree< cell > | root_cell_ |
the root cell | |
rnd_generator< Random > | rnd_gen_ |
the random number generator to be used | |
bool | did_split_ |
wether a split has already been performed | |
bool | initialized_ |
wether this generator has been initialized | |
binary_tree< cell >::iterator | last_cell_ |
the last selected cell | |
std::vector< double > | last_point_ |
the last sampled phasespace point | |
double | last_value_ |
the last function value | |
bool | compensating_ |
wether or not we are compensating | |
A generator for plain sampling and integrating.
Definition at line 27 of file generator.h.
|
inline |
default constructor
Definition at line 32 of file generator.h.
|
inline |
return true, if still compensating
Definition at line 115 of file generator.h.
References exsample::generator< Function, Random >::compensating_.
|
inline |
return the integral
Definition at line 97 of file generator.h.
References exsample::statistics::current(), exsample::generator< Function, Random >::statistics_, and exsample::generator< Function, Random >::volume().
|
inline |
return the error on the integral
Definition at line 102 of file generator.h.
References exsample::statistics::current(), exsample::generator< Function, Random >::statistics_, and exsample::generator< Function, Random >::volume().
|
inline |
return true, if at least one split has been performed
Definition at line 70 of file generator.h.
References exsample::generator< Function, Random >::did_split_.
|
inline |
finalize this generator
Definition at line 60 of file generator.h.
References exsample::statistics::reset(), and exsample::generator< Function, Random >::statistics_.
|
inline |
access the function
Definition at line 73 of file generator.h.
References exsample::generator< Function, Random >::function_.
|
inline |
set the function
Definition at line 76 of file generator.h.
References exsample::generator< Function, Random >::function_.
|
inline |
return true, if this generator has been initialized
Definition at line 67 of file generator.h.
References exsample::generator< Function, Random >::initialized_.
|
inline |
return the integral
Definition at line 87 of file generator.h.
References exsample::statistics::average_weight(), exsample::generator< Function, Random >::statistics_, and exsample::generator< Function, Random >::volume().
|
inline |
return the error on the integral
Definition at line 92 of file generator.h.
References exsample::statistics::average_weight_variance(), exsample::generator< Function, Random >::statistics_, and exsample::generator< Function, Random >::volume().
|
inline |
return the variance of the integral estimate
Definition at line 107 of file generator.h.
References exsample::statistics::average_weight_variance(), sqr(), exsample::generator< Function, Random >::statistics_, and exsample::generator< Function, Random >::volume().
|
inline |
return the last sampled phase space point
Definition at line 51 of file generator.h.
References exsample::generator< Function, Random >::last_point_.
|
inline |
indicate that the last generated point has been rejected
Definition at line 54 of file generator.h.
References exsample::generator< Function, Random >::last_cell_, exsample::generator< Function, Random >::last_value_, exsample::statistics::reject(), and exsample::generator< Function, Random >::statistics_.
|
inline |
access the adaption_info object
Definition at line 112 of file generator.h.
References exsample::generator< Function, Random >::adaption_info_.
|
inline |
return the statistics object
Definition at line 79 of file generator.h.
References exsample::generator< Function, Random >::statistics_.
|
inline |
return the sampled volume
Definition at line 82 of file generator.h.
References exsample::generator< Function, Random >::adaption_info_, exsample::adaption_info::lower_left, and exsample::adaption_info::upper_right.
Referenced by exsample::generator< Function, Random >::current_integral(), exsample::generator< Function, Random >::current_integral_uncertainty(), exsample::generator< Function, Random >::integral(), exsample::generator< Function, Random >::integral_uncertainty(), and exsample::generator< Function, Random >::integral_variance().
|
private |
the adaption info object
Definition at line 148 of file generator.h.
Referenced by exsample::generator< Function, Random >::sampling_parameters(), and exsample::generator< Function, Random >::volume().
|
private |
the number of events after which a cell is checked for splits
Definition at line 145 of file generator.h.
|
private |
wether or not we are compensating
Definition at line 172 of file generator.h.
Referenced by exsample::generator< Function, Random >::compensating().
|
private |
wether a split has already been performed
Definition at line 157 of file generator.h.
Referenced by exsample::generator< Function, Random >::did_split().
|
private |
function to be sampled
Definition at line 138 of file generator.h.
Referenced by exsample::generator< Function, Random >::function().
|
private |
wether this generator has been initialized
Definition at line 160 of file generator.h.
Referenced by exsample::generator< Function, Random >::initialized().
|
private |
the last selected cell
Definition at line 163 of file generator.h.
Referenced by exsample::generator< Function, Random >::reject().
|
private |
the last sampled phasespace point
Definition at line 166 of file generator.h.
Referenced by exsample::generator< Function, Random >::last_point().
|
private |
the last function value
Definition at line 169 of file generator.h.
Referenced by exsample::generator< Function, Random >::reject().
|
private |
the random number generator to be used
Definition at line 154 of file generator.h.
|
private |
the root cell
Definition at line 151 of file generator.h.
|
private |
the global statistics object
Definition at line 141 of file generator.h.
Referenced by exsample::generator< Function, Random >::current_integral(), exsample::generator< Function, Random >::current_integral_uncertainty(), exsample::generator< Function, Random >::finalize(), exsample::generator< Function, Random >::integral(), exsample::generator< Function, Random >::integral_uncertainty(), exsample::generator< Function, Random >::integral_variance(), exsample::generator< Function, Random >::reject(), and exsample::generator< Function, Random >::stats().