herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
Herwig::RandomHelpers::Generator< Power > Class Reference

Generate x with density |(x-z)|^p. More...

#include <RandomHelpers.h>

Public Member Functions

 Generator (double z, double p, double l, double u)
 Construct from pole, power and boundaries.
 
double lower () const
 Return the lower bound of the density generated.
 
double upper () const
 Return the upper bound of the density generated.
 
double pole () const
 Return the position of the pole.
 
double power () const
 Return the power.
 
double scale () const
 Return the scale for random numbers.
 
double offset () const
 Return the offset for random mnumbers.
 
double value (double x) const
 Return the density's value.
 
double normalization () const
 Return the density's normalization.
 
double operator() (double r) const
 Generate the return value according to the implemented density, given a flat random number on the unit interval.
 

Private Attributes

double thePole
 The position of the pole.
 
double thePower
 The power.
 
double theLower
 The lower bound.
 
double theUpper
 The upper bound.
 
double theScale
 Scale for random numbers.
 
double theOffset
 Offset for random mnumbers.
 

Detailed Description

Generate x with density |(x-z)|^p.

Author
Simon Platzer

Definition at line 1103 of file RandomHelpers.h.

Constructor & Destructor Documentation

◆ Generator()

Herwig::RandomHelpers::Generator< Power >::Generator ( double  z,
double  p,
double  l,
double  u 
)
inline

Construct from pole, power and boundaries.

Definition at line 1140 of file RandomHelpers.h.

Member Function Documentation

◆ lower()

double Herwig::RandomHelpers::Generator< Power >::lower ( ) const
inline

Return the lower bound of the density generated.

Definition at line 1157 of file RandomHelpers.h.

◆ normalization()

double Herwig::RandomHelpers::Generator< Power >::normalization ( ) const
inline

Return the density's normalization.

Definition at line 1194 of file RandomHelpers.h.

◆ offset()

double Herwig::RandomHelpers::Generator< Power >::offset ( ) const
inline

Return the offset for random mnumbers.

Definition at line 1182 of file RandomHelpers.h.

◆ operator()()

double Herwig::RandomHelpers::Generator< Power >::operator() ( double  r) const
inline

Generate the return value according to the implemented density, given a flat random number on the unit interval.

Definition at line 1202 of file RandomHelpers.h.

References ThePEG::pow(), Herwig::RandomHelpers::power(), Herwig::RandomHelpers::sign(), and Herwig::RandomHelpers::Generator< Density >::upper().

◆ pole()

double Herwig::RandomHelpers::Generator< Power >::pole ( ) const
inline

Return the position of the pole.

Definition at line 1167 of file RandomHelpers.h.

◆ power()

double Herwig::RandomHelpers::Generator< Power >::power ( ) const
inline

Return the power.

Definition at line 1172 of file RandomHelpers.h.

◆ scale()

double Herwig::RandomHelpers::Generator< Power >::scale ( ) const
inline

Return the scale for random numbers.

Definition at line 1177 of file RandomHelpers.h.

◆ upper()

double Herwig::RandomHelpers::Generator< Power >::upper ( ) const
inline

Return the upper bound of the density generated.

Definition at line 1162 of file RandomHelpers.h.

◆ value()

Member Data Documentation

◆ theLower

double Herwig::RandomHelpers::Generator< Power >::theLower
private

The lower bound.

Definition at line 1118 of file RandomHelpers.h.

◆ theOffset

double Herwig::RandomHelpers::Generator< Power >::theOffset
private

Offset for random mnumbers.

Definition at line 1133 of file RandomHelpers.h.

◆ thePole

double Herwig::RandomHelpers::Generator< Power >::thePole
private

The position of the pole.

Definition at line 1108 of file RandomHelpers.h.

◆ thePower

double Herwig::RandomHelpers::Generator< Power >::thePower
private

The power.

Definition at line 1113 of file RandomHelpers.h.

◆ theScale

double Herwig::RandomHelpers::Generator< Power >::theScale
private

Scale for random numbers.

Definition at line 1128 of file RandomHelpers.h.

◆ theUpper

double Herwig::RandomHelpers::Generator< Power >::theUpper
private

The upper bound.

Definition at line 1123 of file RandomHelpers.h.


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