herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
exsample::exponential_generator< Function, Random > Class Template Reference

The generator for sudakov-type distributions. More...

#include <exponential_generator.h>

Inheritance diagram for exsample::exponential_generator< Function, Random >:

Public Member Functions

 exponential_generator ()
 default constructor
 
void initialize ()
 initialize this generator
 
void finalize ()
 finalize this generator
 
double generate (double enhance=1.)
 generate an event, returning the sign of the weight or zero for an event below the evolution cutoff
 
double generate (double cutoff, double enhance)
 generate an event, returning the sign of the weight or zero for an event below the evolution cutoff
 
const std::vector< double > & last_point () const
 return the last sampled phase space point
 
double last_value () const
 return the last evaluated function
 
void reject ()
 indicate that the last generated point has been rejected
 
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
 
adaption_infosampling_parameters ()
 access the adaption_info object
 
void docompensate (bool yes=true)
 indicate, if compensation should be applied
 
void detuning (double val)
 set the detuning parameter
 
template<class OStream >
void put (OStream &os) const
 put to ostream
 
template<class IStream >
void get (IStream &is)
 get from istream
 

Private Member Functions

bool split ()
 check for and possibly split the last selected cell
 
void get_exponent ()
 get the projection of the density integrating over every variable to be sampled, except the evolution variable for the indicated parameter point.
 
void compensate ()
 compensate
 
std::set< std::vector< double > > parameter_points ()
 get all parameter points to build all possible sub tree hashes
 
void recursive_parameter_points (std::set< std::vector< double > > &, std::vector< double > &, size_t)
 get all parameter points to build all possible sub tree hashes
 

Private Attributes

Function * function_
 function to be sampled
 
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< cellroot_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
 
std::size_t evolution_variable_
 the position of the evolution variable
 
double evolution_cutoff_
 the cutoff on the evolution variable
 
std::vector< bool > sample_variables_
 flags of variables to be sampled including the evolution variable
 
std::vector< bool > sample_other_variables_
 flags of variables to be sampled excluding the evolution variable
 
std::map< std::size_t, std::vector< double > > parameter_splits_
 the splits in any parameter done so far (including the evolution variable)
 
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
 
bit_container< parameter_hash_bits > last_parameter_bin_
 the last parameter bin id
 
std::map< bit_container< parameter_hash_bits >, linear_interpolatorexponents_
 map parameter bin ids to exponent interpolations
 
std::vector< double > last_exponent_integrand_
 the last exponent integrand
 
std::map< bit_container< parameter_hash_bits >, linear_interpolator >::iterator last_exponent_
 the last exponent
 
bool compensating_
 wether or not we are compensating
 
integral_accessor integral_accessor_
 the integral accessor to be used
 
parametric_missing_accessor missing_accessor_
 the missing events accessor to be used
 
parametric_selector parametric_selector_
 the parametric selector to be used
 
parametric_selector exponent_selector_
 the parametric selector to be used for parameter bins
 
parametric_sampling_selector< rnd_generator< Random > > parametric_sampler_
 the parametric sampler to be used
 
unsigned long attempts_
 the number of trials in the veto loo so far
 
unsigned long accepts_
 the number of accepted events so far
 
unsigned long splits_
 number of splits done
 
bool docompensate_
 true, if compensation should be applied
 
double detuning_
 a detuning factor to be applied to the overestimate
 

Detailed Description

template<class Function, class Random>
class exsample::exponential_generator< Function, Random >

The generator for sudakov-type distributions.

Definition at line 28 of file exponential_generator.h.

Constructor & Destructor Documentation

◆ exponential_generator()

template<class Function , class Random >
exsample::exponential_generator< Function, Random >::exponential_generator ( )
inline

default constructor

Definition at line 33 of file exponential_generator.h.

Member Function Documentation

◆ detuning()

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::detuning ( double  val)
inline

set the detuning parameter

Definition at line 111 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::detuning_.

◆ did_split()

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::did_split ( ) const
inline

return true, if at least one split has been performed

Definition at line 96 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::did_split_.

◆ docompensate()

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::docompensate ( bool  yes = true)
inline

indicate, if compensation should be applied

Definition at line 108 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::docompensate_.

◆ finalize()

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::finalize ( )
inline

finalize this generator

Definition at line 54 of file exponential_generator.h.

◆ function() [1/2]

template<class Function , class Random >
Function & exsample::exponential_generator< Function, Random >::function ( )
inline

access the function

Definition at line 99 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::function_.

◆ function() [2/2]

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::function ( Function *  f)
inline

set the function

Definition at line 102 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::function_.

◆ generate()

template<class Function , class Random >
double exsample::exponential_generator< Function, Random >::generate ( double  cutoff,
double  enhance 
)
inline

generate an event, returning the sign of the weight or zero for an event below the evolution cutoff

Definition at line 64 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::evolution_cutoff_, and exsample::exponential_generator< Function, Random >::generate().

◆ get_exponent()

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::get_exponent ( )
private

get the projection of the density integrating over every variable to be sampled, except the evolution variable for the indicated parameter point.

the k'th entry in last_exponent_integrand_ is the value in the evolution variable bin from evolution_splits_[k] to evolution_splits_[k+1]

◆ initialized()

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::initialized ( ) const
inline

return true, if this generator has been initialized

Definition at line 93 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::initialized_.

◆ last_point()

template<class Function , class Random >
const std::vector< double > & exsample::exponential_generator< Function, Random >::last_point ( ) const
inline

return the last sampled phase space point

Definition at line 80 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::last_point_.

◆ last_value()

template<class Function , class Random >
double exsample::exponential_generator< Function, Random >::last_value ( ) const
inline

return the last evaluated function

Definition at line 83 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::last_value_.

◆ reject()

template<class Function , class Random >
void exsample::exponential_generator< Function, Random >::reject ( )
inline

indicate that the last generated point has been rejected

Definition at line 86 of file exponential_generator.h.

References exsample::exponential_generator< Function, Random >::last_cell_.

◆ sampling_parameters()

template<class Function , class Random >
adaption_info & exsample::exponential_generator< Function, Random >::sampling_parameters ( )
inline

Member Data Documentation

◆ accepts_

template<class Function , class Random >
unsigned long exsample::exponential_generator< Function, Random >::accepts_
private

the number of accepted events so far

Definition at line 233 of file exponential_generator.h.

◆ adaption_info_

template<class Function , class Random >
adaption_info exsample::exponential_generator< Function, Random >::adaption_info_
private

the adaption info object

Definition at line 158 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::sampling_parameters().

◆ attempts_

template<class Function , class Random >
unsigned long exsample::exponential_generator< Function, Random >::attempts_
private

the number of trials in the veto loo so far

Definition at line 230 of file exponential_generator.h.

◆ check_events_

template<class Function , class Random >
unsigned long exsample::exponential_generator< Function, Random >::check_events_
private

the number of events after which a cell is checked for splits

Definition at line 155 of file exponential_generator.h.

◆ compensating_

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::compensating_
private

wether or not we are compensating

Definition at line 212 of file exponential_generator.h.

◆ detuning_

template<class Function , class Random >
double exsample::exponential_generator< Function, Random >::detuning_
private

a detuning factor to be applied to the overestimate

Definition at line 242 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::detuning().

◆ did_split_

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::did_split_
private

wether a split has already been performed

Definition at line 167 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::did_split().

◆ docompensate_

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::docompensate_
private

true, if compensation should be applied

Definition at line 239 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::docompensate().

◆ evolution_cutoff_

template<class Function , class Random >
double exsample::exponential_generator< Function, Random >::evolution_cutoff_
private

the cutoff on the evolution variable

Definition at line 176 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::generate().

◆ evolution_variable_

template<class Function , class Random >
std::size_t exsample::exponential_generator< Function, Random >::evolution_variable_
private

the position of the evolution variable

Definition at line 173 of file exponential_generator.h.

◆ exponent_selector_

template<class Function , class Random >
parametric_selector exsample::exponential_generator< Function, Random >::exponent_selector_
private

the parametric selector to be used for parameter bins

Definition at line 224 of file exponential_generator.h.

◆ exponents_

template<class Function , class Random >
std::map<bit_container<parameter_hash_bits>,linear_interpolator > exsample::exponential_generator< Function, Random >::exponents_
private

map parameter bin ids to exponent interpolations

Definition at line 203 of file exponential_generator.h.

◆ function_

template<class Function , class Random >
Function* exsample::exponential_generator< Function, Random >::function_
private

function to be sampled

Definition at line 151 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::function().

◆ initialized_

template<class Function , class Random >
bool exsample::exponential_generator< Function, Random >::initialized_
private

wether this generator has been initialized

Definition at line 170 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::initialized().

◆ integral_accessor_

template<class Function , class Random >
integral_accessor exsample::exponential_generator< Function, Random >::integral_accessor_
private

the integral accessor to be used

Definition at line 215 of file exponential_generator.h.

◆ last_cell_

template<class Function , class Random >
binary_tree<cell>::iterator exsample::exponential_generator< Function, Random >::last_cell_
private

the last selected cell

Definition at line 191 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::reject().

◆ last_exponent_

template<class Function , class Random >
std::map<bit_container<parameter_hash_bits>,linear_interpolator>::iterator exsample::exponential_generator< Function, Random >::last_exponent_
private

the last exponent

Definition at line 209 of file exponential_generator.h.

◆ last_exponent_integrand_

template<class Function , class Random >
std::vector<double> exsample::exponential_generator< Function, Random >::last_exponent_integrand_
private

the last exponent integrand

Definition at line 206 of file exponential_generator.h.

◆ last_parameter_bin_

template<class Function , class Random >
bit_container<parameter_hash_bits> exsample::exponential_generator< Function, Random >::last_parameter_bin_
private

the last parameter bin id

Definition at line 200 of file exponential_generator.h.

◆ last_point_

template<class Function , class Random >
std::vector<double> exsample::exponential_generator< Function, Random >::last_point_
private

the last sampled phasespace point

Definition at line 194 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::last_point().

◆ last_value_

template<class Function , class Random >
double exsample::exponential_generator< Function, Random >::last_value_
private

the last function value

Definition at line 197 of file exponential_generator.h.

Referenced by exsample::exponential_generator< Function, Random >::last_value().

◆ missing_accessor_

template<class Function , class Random >
parametric_missing_accessor exsample::exponential_generator< Function, Random >::missing_accessor_
private

the missing events accessor to be used

Definition at line 218 of file exponential_generator.h.

◆ parameter_splits_

template<class Function , class Random >
std::map<std::size_t,std::vector<double> > exsample::exponential_generator< Function, Random >::parameter_splits_
private

the splits in any parameter done so far (including the evolution variable)

Definition at line 188 of file exponential_generator.h.

◆ parametric_sampler_

template<class Function , class Random >
parametric_sampling_selector<rnd_generator<Random> > exsample::exponential_generator< Function, Random >::parametric_sampler_
private

the parametric sampler to be used

Definition at line 227 of file exponential_generator.h.

◆ parametric_selector_

template<class Function , class Random >
parametric_selector exsample::exponential_generator< Function, Random >::parametric_selector_
private

the parametric selector to be used

Definition at line 221 of file exponential_generator.h.

◆ rnd_gen_

template<class Function , class Random >
rnd_generator<Random> exsample::exponential_generator< Function, Random >::rnd_gen_
private

the random number generator to be used

Definition at line 164 of file exponential_generator.h.

◆ root_cell_

template<class Function , class Random >
binary_tree<cell> exsample::exponential_generator< Function, Random >::root_cell_
private

the root cell

Definition at line 161 of file exponential_generator.h.

◆ sample_other_variables_

template<class Function , class Random >
std::vector<bool> exsample::exponential_generator< Function, Random >::sample_other_variables_
private

flags of variables to be sampled excluding the evolution variable

Definition at line 184 of file exponential_generator.h.

◆ sample_variables_

template<class Function , class Random >
std::vector<bool> exsample::exponential_generator< Function, Random >::sample_variables_
private

flags of variables to be sampled including the evolution variable

Definition at line 180 of file exponential_generator.h.

◆ splits_

template<class Function , class Random >
unsigned long exsample::exponential_generator< Function, Random >::splits_
private

number of splits done

Definition at line 236 of file exponential_generator.h.


The documentation for this class was generated from the following file: