00001 #ifndef MVertex_H
00002 #define MVertex_H
00003
00004 class MVertex
00005 {
00006 public:
00007 MVertex() { }
00008 ~MVertex() { }
00009
00010
00011
00012
00013 double GetX() const { return fP[0]; }
00014 double GetY() const { return fP[1]; }
00015 double GetZ() const { return fP[2]; }
00016
00017 void GetXYZ(double *position) const {position[0] = fP[0]; position[1] = fP[1]; position[2] = fP[2];}
00018 void GetCovarianceMatrix(double *covmatrix) const
00019 {
00020 for (int i=0; i<6; i++)
00021 covmatrix[i] = fC[i];
00022 }
00023
00024 double GetChi2perNDF() const { return fChi2/fNDF; }
00025 double GetChi2() const { return fChi2; }
00026 int GetNDF() const { return fNDF; }
00027 int GetNContributors() const { return fNContributors; }
00028
00029 double GetParameter(int i) const { return fP[i]; }
00030 double GetCovariance(int i) const { return fC[i]; }
00031
00032
00033 void SetXYZ(double *position) { fP[0] = position[0]; fP[1] = position[1]; fP[2] = position[2]; }
00034 void SetXYZ(double x, double y, double z) { fP[0] = x; fP[1] = y; fP[2] = z; }
00035 void SetX(double x) { fP[0] = x; }
00036 void SetY(double y) { fP[1] = y; }
00037 void SetZ(double z) { fP[2] = z; }
00038 void SetChi2(double chi) { fChi2 = chi; }
00039 void SetNDF(int ndf) { fNDF = ndf; }
00040 void SetNContributors(int nc) { fNContributors = nc; }
00041
00042 void SetCovarianceMatrix(double *C)
00043 {
00044 for (int i=0; i<6; i++)
00045 fC[i] = C[i];
00046 }
00047
00048 void SetCovarianceMatrix(double C00,double C10,double C11,double C20,double C21,double C22)
00049 {
00050 fC[0] = C00;
00051 fC[1] = C10;
00052 fC[2] = C11;
00053 fC[3] = C20;
00054 fC[4] = C21;
00055 fC[5] = C22;
00056 }
00057
00058 private:
00059
00060 double fP[3];
00061 double fC[6];
00062 double fChi2;
00063 int fNContributors;
00064 int fNDF;
00065 };
00066
00067 #endif