ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::landau_distribution< scalar_t > Class Template Reference

Landau distribution based on CERNLIB G110 Computer Physics Communications 31(1984) 97—111). More...

#include <detray/test/utils/landau_distribution.hpp>

Public Types

using scalar_type = scalar_t
 Scalar type used for the distribution parameters and result.

Public Member Functions

template<typename generator_t>
scalar_type operator() (generator_t &generator, const scalar_type location, const scalar_type scale) const
 Generate a random number following a Landau distribution with location parameter mu and scale parameter sigma: Landau( (x-mu)/sigma ) Note that mu is not the mpv(most probable value) of the Landa distribution and sigma is not the standard deviation of the distribution which is not defined.

Detailed Description

template<concepts::scalar scalar_t>
class detray::landau_distribution< scalar_t >

Landau distribution based on CERNLIB G110 Computer Physics Communications 31(1984) 97—111).

Member Function Documentation

◆ operator()()

template<concepts::scalar scalar_t>
template<typename generator_t>
scalar_type detray::landau_distribution< scalar_t >::operator() ( generator_t & generator,
const scalar_type location,
const scalar_type scale ) const

Generate a random number following a Landau distribution with location parameter mu and scale parameter sigma: Landau( (x-mu)/sigma ) Note that mu is not the mpv(most probable value) of the Landa distribution and sigma is not the standard deviation of the distribution which is not defined.

For mu =0 and sigma=1, the mpv = -0.22278

The Landau random number generation is implemented using the function landau_quantile(x,sigma), which provides the inverse of the landau cumulative distribution. landau_quantile has been converted from CERNLIB ranlan(G110).

Reference[1]: ROOT TRandom.cxx Reference[2]: ACTS LandauDistribution.cxx

Parameters
generatorRandom number generator.
locationLocation parameter of the distribution.
scaleScale parameter of the distribution.
Returns
A random value following the Landau distribution.