00001 #include <vector>
00002 #include "TMatrixD.h"
00003
00004 class TRandom;
00005
00006 class CorrGauss
00007 {
00008
00009 public:
00010 CorrGauss();
00011 CorrGauss(TMatrixD &covar);
00012 CorrGauss(Int_t nrows, Int_t ncols, const double* data);
00013 ~CorrGauss();
00014 void SetCovarMatrix(TMatrixD &covar);
00015 void SetCovarMatrix(Int_t nrows, Int_t ncols, const double* data);
00016
00017 void DoCholesky(int method=1);
00018
00019 TMatrixD *GetCovarMat() const;
00020 double GetCovarElement(int rindx, int cindx) const;
00021
00022 TMatrixD *GetDecompMat();
00023 double GetDecompElement(int rindx, int cindx);
00024
00025 void GetRandomParSet(std::vector<double> &pars,bool correlated=true);
00026 void SetSeed(int seed){ randseed = seed; }
00027
00028 private:
00029 TRandom *randgen;
00030
00031 TMatrixD *V;
00032 TMatrixD *C;
00033
00034 int randseed;
00035 };