herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
Herwig::RandomHelpers::Generator< Piecewise< Density1, Density2 > > Class Template Reference

Generate a piecewise defined density. More...

#include <RandomHelpers.h>

Public Member Functions

 Generator (const Generator< Density1 > &firstGen, const Generator< Density2 > &secondGen)
 Construct from generators.
 
const Generator< Density1 > & firstGenerator () const
 Return the first generator.
 
const Generator< Density2 > & secondGenerator () const
 Return the second generator.
 
double lower () const
 Return the lower bound of the density generated.
 
double intermediate () const
 Return the transition value.
 
double upper () const
 Return the upper bound of the density generated.
 
double fraction () const
 Return the fraction of the unit interval considered for the first generator.
 
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.
 
template<class Density3 >
Generator< Piecewise< Piecewise< Density1, Density2 >, Density3 > > operator, (const Generator< Density3 > &thirdGenerator)
 Construct piecewise generators.
 
template<class Density3 >
Generator< Piecewise< Piecewise< Density1, Density2 >, Rescale< Density3 > > > operator, (const matcher< Density3 > &thirdGenerator)
 Construct piecewise generators.
 

Private Attributes

Generator< Density1 > theFirstGenerator
 The first generator.
 
Generator< Density2 > theSecondGenerator
 The second generator.
 
double theLower
 The lower boundary.
 
double theIntermediate
 The transition value.
 
double theUpper
 The upper boundary.
 
double theFraction
 The fraction of the unit interval considered for the first generator.
 

Detailed Description

template<class Density1, class Density2>
class Herwig::RandomHelpers::Generator< Piecewise< Density1, Density2 > >

Generate a piecewise defined density.

Author
Simon Platzer

Definition at line 616 of file RandomHelpers.h.


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