adds noise to the given frame. More...
#include <EcalCoder.h>
Public Types | |
typedef std::vector< double > | VecDou |
Public Member Functions | |
const M & | cholMat () const |
CorrelatedNoisifier (const M &symCorMat, CLHEP::HepRandomEngine *engine=0) | |
CorrelatedNoisifier (CLHEP::HepRandomEngine *engine, const M &cholDecMat) | |
template<class T > | |
void | noisify (T &frame, const VecDou *rangau=0) const |
void | resetCholDecompMatrix (const M &cholMat) |
void | resetCorrelationMatrix (const M &symCorMat) |
const VecDou & | vecgau () const |
virtual | ~CorrelatedNoisifier () |
Private Member Functions | |
bool | checkDecomposition (const M &symCorMat, M &HHtDiff) const |
void | checkOffDiagonal (const M &symCorMat) |
bool | computeDecomposition (const M &symCorMat) |
void | init (const M &symCorMat) |
void | initChol () |
Private Attributes | |
M | m_H |
bool | m_isDiagonal |
bool | m_isIdentity |
CLHEP::RandGaussQ * | m_rangau |
VecDou | m_vecgau |
Static Private Attributes | |
static const double | k_precision |
adds noise to the given frame.
Takes input correlation matrix C and from it creates an upper-triangular matrix H such that H*Htranspose = C.
Algorithm taken from http://cg.scs.carleton.ca/~luc/chapter_eleven.pdf, p 564-567 Uses a Cholesky decomposition
Any input array f is "noisified" with f += H*r where r is an array of random numbers
The above matrix multiplication is expedited in the trivial cases of a purely diagonal or identity correlation matrix.
Definition at line 11 of file EcalCoder.h.
typedef std::vector<double> CorrelatedNoisifier< M >::VecDou |
Definition at line 32 of file CorrelatedNoisifier.h.
CorrelatedNoisifier< M >::CorrelatedNoisifier | ( | const M & | symCorMat, |
CLHEP::HepRandomEngine * | engine = 0 |
||
) |
CorrelatedNoisifier< M >::CorrelatedNoisifier | ( | CLHEP::HepRandomEngine * | engine, |
const M & | cholDecMat | ||
) |
|
virtual |
|
private |
|
private |
const M& CorrelatedNoisifier< M >::cholMat | ( | ) | const |
|
private |
|
private |
|
private |
template void CorrelatedNoisifier< M >::noisify | ( | T & | frame, |
const VecDou * | rangau = 0 |
||
) | const |
Referenced by EcalCoder::encode(), and CSCStripConditions::noisify().
void CorrelatedNoisifier< M >::resetCholDecompMatrix | ( | const M & | cholMat | ) |
void CorrelatedNoisifier< M >::resetCorrelationMatrix | ( | const M & | symCorMat | ) |
const VecDou& CorrelatedNoisifier< M >::vecgau | ( | ) | const |
|
staticprivate |
Definition at line 56 of file CorrelatedNoisifier.h.
|
private |
Definition at line 76 of file CorrelatedNoisifier.h.
|
private |
Definition at line 73 of file CorrelatedNoisifier.h.
|
private |
Definition at line 74 of file CorrelatedNoisifier.h.
|
private |
Definition at line 71 of file CorrelatedNoisifier.h.
|
mutableprivate |
Definition at line 69 of file CorrelatedNoisifier.h.