NormalToyMC

Description

Generates a random sample distributed according to multivariate normal distribution without correlations.

Uses boost::mt19937 random generator.

The sample becomes frozen upon generation. One has to manually taint the transformation for the next sample by calling nextSample method.

Inputs

  1. Average model vector μ1.

  2. First model uncertainties vector σ1.

  3. Average model vector μ2.

  4. Second model uncertainties vector σ2.

  5. etc.

  6. etc.

Inputs are added via add(theory, sigma) method.

Outputs

  1. 'toymc' — output vector x of size of concatination of μi.

Implementation

For the random variable vector x of size N, distributed around μ with uncertainties σ the p.d.f. is:

P(x|μ)=1(2π)Niσie12i(xiμi)2σi2.

One can define the vector z:

zi=xiμiσi,xi=σizi+μi.

Since the transition Jacobian |dx/dz|=|L|=iσi each zi is distributed normally with σ=1 with central value of 0.

The algorithm generates normal vector z and transforms it to xi=σizi+μi.

By μ we mean the concatenation of vectors μi.