ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsFatras::LandauDistribution Class Reference

Draw random numbers from a Landau distribution. More...

#include <ActsFatras/Utilities/LandauDistribution.hpp>

Classes

struct  param_type
 Parameter struct that contains all distribution parameters. More...

Public Types

using result_type = double
 The type of the generated values.

Public Member Functions

 LandauDistribution ()=default
 LandauDistribution (const LandauDistribution &)=default
 Copy constructor.
 LandauDistribution (const param_type &cfg)
 Construct from a parameter object.
 LandauDistribution (double location, double scale)
 Construct directly from the distribution parameters.
 LandauDistribution (LandauDistribution &&)=default
 Move constructor.
result_type max () const
 The maximum value the distribution generates.
result_type min () const
 The minimum value the distribution generates.
template<typename Generator>
result_type operator() (Generator &generator)
 Generate a random number from the configured Landau distribution.
template<typename Generator>
result_type operator() (Generator &generator, const param_type &params)
 Generate a random number from the given Landau distribution.
LandauDistributionoperator= (const LandauDistribution &)=default
 Copy assignment operator.
LandauDistributionoperator= (LandauDistribution &&)=default
 Move assignment operator.
param_type param () const
 Return the currently configured distribution parameters.
void param (const param_type &cfg)
 Set the distribution parameters.
void reset ()
 Reset any possible internal state. Noop, since there is no internal state.

Detailed Description

Draw random numbers from a Landau distribution.

Implements the same interface as the standard library distributions.

Member Typedef Documentation

◆ result_type

The type of the generated values.

Constructor & Destructor Documentation

◆ LandauDistribution() [1/5]

ActsFatras::LandauDistribution::LandauDistribution ( double location,
double scale )

Construct directly from the distribution parameters.

Parameters
locationLocation parameter of the distribution
scaleScale parameter of the distribution

◆ LandauDistribution() [2/5]

ActsFatras::LandauDistribution::LandauDistribution ( const param_type & cfg)
explicit

Construct from a parameter object.

Parameters
cfgParameter configuration object

◆ LandauDistribution() [3/5]

ActsFatras::LandauDistribution::LandauDistribution ( )
default

◆ LandauDistribution() [4/5]

ActsFatras::LandauDistribution::LandauDistribution ( const LandauDistribution & )
default

Copy constructor.

◆ LandauDistribution() [5/5]

ActsFatras::LandauDistribution::LandauDistribution ( LandauDistribution && )
default

Move constructor.

Member Function Documentation

◆ max()

result_type ActsFatras::LandauDistribution::max ( ) const

The maximum value the distribution generates.

Returns
Maximum possible value (positive infinity)

◆ min()

result_type ActsFatras::LandauDistribution::min ( ) const

The minimum value the distribution generates.

Returns
Minimum possible value (negative infinity)

◆ operator()() [1/2]

template<typename Generator>
result_type ActsFatras::LandauDistribution::operator() ( Generator & generator)

Generate a random number from the configured Landau distribution.

Parameters
generatorRandom number generator to use
Returns
Random value from the Landau distribution

◆ operator()() [2/2]

template<typename Generator>
result_type ActsFatras::LandauDistribution::operator() ( Generator & generator,
const param_type & params )

Generate a random number from the given Landau distribution.

Parameters
generatorRandom number generator to use
paramsDistribution parameters to use for this generation
Returns
Random value from the Landau distribution with given parameters

◆ operator=() [1/2]

LandauDistribution & ActsFatras::LandauDistribution::operator= ( const LandauDistribution & )
default

Copy assignment operator.

Returns
Reference to this distribution object

◆ operator=() [2/2]

LandauDistribution & ActsFatras::LandauDistribution::operator= ( LandauDistribution && )
default

Move assignment operator.

Returns
Reference to this distribution object

◆ param() [1/2]

param_type ActsFatras::LandauDistribution::param ( ) const

Return the currently configured distribution parameters.

Returns
Current parameter configuration

◆ param() [2/2]

void ActsFatras::LandauDistribution::param ( const param_type & cfg)

Set the distribution parameters.

Parameters
cfgNew parameter configuration to use

◆ reset()

void ActsFatras::LandauDistribution::reset ( )

Reset any possible internal state. Noop, since there is no internal state.