00001
00002
00003
00004 #ifndef ROOT_TRandomVector
00005 #define ROOT_TRandomVector
00006
00007
00009
00010
00011
00012
00014 #include "TNamed.h"
00015 #include "TString.h"
00016 #include "TMatrixD.h"
00017 #include "TMatrixDSym.h"
00018 #include "TVectorD.h"
00019 #include "TRandom.h"
00020
00021 class TRandomVector: public TObject
00022 {
00023 public:
00024 TRandomVector();
00025 TRandomVector(const TMatrixDSym& errMtx,UInt_t seed = 0);
00026 TRandomVector(const TVectorD& diaMtx,UInt_t seed = 0);
00027 ~TRandomVector(){;}
00028 int Set(const TMatrixDSym& errMtx,UInt_t seed = 65539);
00029 static void RandRotate(TMatrixDSym& errMtx);
00030 static double Sign(const TMatrixDSym& errMtx);
00031
00032 const TMatrixDSym &GetMtx() const {return fErrMtx;}
00033 const TVectorD& Gaus();
00034 static void Test(int nevt = 10000);
00035
00036
00037 private:
00038 int fDim;
00039 TRandom fRandom;
00040 TMatrixDSym fErrMtx;
00041 TMatrixD fEigMtx;
00042 TVectorD fEigVal;
00043 TVectorD fResult;
00044 ClassDef(TRandomVector,0)
00045
00046 };
00047 #endif //ROOT_TRandomVector