Belle II Software light-2406-ragdoll
ConditionalGaussGenerator.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10#include <vector>
11#include <cmath>
12#include <Eigen/Dense>
13
14namespace Belle2 {
26
27 public:
28
31
33 ConditionalGaussGenerator(const Eigen::VectorXd& mu, const Eigen::MatrixXd& covMat);
34
40 Eigen::VectorXd generate(double x0) const;
41
43 double getX0spread() const { return std::sqrt(m_covMat(0, 0)); }
44
46 Eigen::VectorXd getMu() const { return m_mu; }
47
49 Eigen::MatrixXd getCovMat() const { return m_covMat; }
50 private:
51 Eigen::VectorXd m_mu;
52 Eigen::MatrixXd m_covMat;
53
54 Eigen::MatrixXd m_vBaseMat;
55 std::vector<Eigen::VectorXd> m_cOrt;
56 Eigen::VectorXd m_v0norm;
57 };
59}
Class implementing n-dimensional random number generator from Gaussian distribution where the first c...
Eigen::VectorXd getMu() const
get the vector including central values of the distribution
double getX0spread() const
get the spread of first component which can be used by external generator
Eigen::VectorXd generate(double x0) const
generate random vector based on the provided first component x0
Eigen::VectorXd m_mu
central values of the distribution
Eigen::MatrixXd m_vBaseMat
transformation matrix between eigen-system of m_covMat and nominal system
std::vector< Eigen::VectorXd > m_cOrt
array of vectors describing free degrees of freedom of random generator
ConditionalGaussGenerator(const Eigen::VectorXd &mu, const Eigen::MatrixXd &covMat)
constructor which takes vector of central values and covariance matrix as input
Eigen::VectorXd m_v0norm
vector which scales with dx0
Eigen::MatrixXd getCovMat() const
get the covariance matrix describing n-dimensional Gaussian distribution
ConditionalGaussGenerator()
dummy constructor without arguments
Eigen::MatrixXd m_covMat
covariance matrix of the distribution
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24