Herwig 7.3.0
|
Information contained in a leaf cell. More...
#include <cell.h>
Public Member Functions | |
cell_info () | |
the default constructor | |
cell_info (const std::vector< double > &ll, const std::vector< double > &ur, const adaption_info &ainfo) | |
construct from boundaries and adaption info | |
cell_info (const std::vector< double > &ll, const std::vector< double > &ur, const std::vector< bool > &sampled_variables, const adaption_info &ainfo) | |
construct from boundaries, flags for variables to be sampled, and adaption info | |
template<class Random > | |
void | select (Random &, std::vector< double > &) |
generate a flat trial point in this cell | |
template<class Random > | |
void | select (Random &, std::vector< double > &, const std::vector< bool > &) |
generate a flat trial point in this cell only for the variables falgged as true | |
void | selected (const std::vector< double > &, double, const adaption_info &) |
indicate a function value for the given point | |
void | accept () |
indicate that a point has been accepted in this cell | |
void | reject () |
reject a previously accepted event | |
bool | bad (const adaption_info &ainfo) const |
return true, if below efficiency threshold | |
std::pair< std::size_t, double > | get_split (const adaption_info &, bool &) const |
suggest a split and indicate wether it is worth to be performed | |
template<class Random , class Function , class SlaveStatistics > | |
void | explore (Random &, const adaption_info &, Function *, statistics *, SlaveStatistics &opt) |
explore this cell performing a flat sampling, updating the given statistics object and pre-filling the efficiency histogram by a trial unweighting | |
template<class Random , class Function > | |
void | explore (Random &, const adaption_info &, Function *) |
explore this cell in a more refined way, which is however not suited for already calculating integrals and stuff | |
double | overestimate () const |
get the current overestimate | |
const std::vector< double > & | last_max_position () const |
return the position of the last maximum | |
void | overestimate (double v, const std::vector< double > &pos) |
set the current overestimate and maximum position | |
double | volume () const |
get the volume | |
const std::vector< double > & | lower_left () const |
get the lower left corner | |
const std::vector< double > & | upper_right () const |
get the upper right corner | |
unsigned long | attempted () const |
get the number of attempted events | |
unsigned long | accepted () const |
get the number of accepted events | |
int | parametric_missing (const bit_container< parameter_hash_bits > &id) const |
return the number of missing events for the given parameter bin id | |
void | parametric_missing (const bit_container< parameter_hash_bits > &id, int n) |
set the number of missing events for the given parameter bin id | |
void | increase_parametric_missing (const bit_container< parameter_hash_bits > &id) |
increase to the number of missing events for the given parameter bin id | |
void | decrease_parametric_missing (const bit_container< parameter_hash_bits > &id) |
decrease to the number of missing events for the given parameter bin id | |
bool | parametric_compensating () const |
return true, if the cell is compensating in at least one parameter bin | |
bool | contains_parameter (const std::vector< double > &point, const std::vector< bool > &sampled) const |
return true, if the cell contains the indicated parameter point | |
template<class OStream > | |
void | put (OStream &os) const |
put to ostream | |
template<class IStream > | |
void | get (IStream &is) |
get from istream | |
Private Attributes | |
double | overestimate_ |
the value of the overestimate in this cell | |
double | volume_ |
the volume of this cell | |
std::vector< double > | lower_left_ |
the lower left corner of this cell | |
std::vector< double > | upper_right_ |
the upper right corner of this cell | |
std::vector< double > | mid_point_ |
midpoint of this cell | |
std::vector< double > | last_max_position_ |
the position of the last encountered maximum in this cell | |
std::vector< std::pair< double, double > > | avg_weight_ |
left-right statistics of average weight | |
unsigned long | attempted_ |
the number of attempts in this cell | |
unsigned long | accepted_ |
the number of accepted events in this cell | |
std::map< bit_container< parameter_hash_bits >, int > | parametric_missing_map_ |
an optional map of parameter bin ids to the number of missing events | |
|
inline |
|
inline |
|
inline |
|
inline |
return true, if below efficiency threshold
Definition at line 69 of file cell.h.
References accepted_, attempted_, and exsample::adaption_info::efficiency_threshold.
|
inline |
return the position of the last maximum
Definition at line 98 of file cell.h.
References last_max_position_.
|
inline |
|
inline |
|
inline |
set the current overestimate and maximum position
Definition at line 101 of file cell.h.
References last_max_position_, overestimate_, and v.
|
inline |
return true, if the cell is compensating in at least one parameter bin
Definition at line 141 of file cell.h.
References parametric_missing_map_.
|
inline |
|
inline |
|
inline |
|
private |
|
private |
the number of attempts in this cell
Definition at line 185 of file cell.h.
Referenced by attempted(), and bad().
|
private |
|
private |
the position of the last encountered maximum in this cell
Definition at line 179 of file cell.h.
Referenced by last_max_position(), and overestimate().
|
private |
the lower left corner of this cell
Definition at line 169 of file cell.h.
Referenced by lower_left().
|
private |
|
private |
the value of the overestimate in this cell
Definition at line 163 of file cell.h.
Referenced by overestimate().
|
private |
an optional map of parameter bin ids to the number of missing events
Definition at line 192 of file cell.h.
Referenced by parametric_compensating().
|
private |
the upper right corner of this cell
Definition at line 172 of file cell.h.
Referenced by upper_right().
|
private |