00001 #ifndef VTrack_H
00002 #define VTrack_H
00003
00004 class MTrack
00005 {
00006
00007 public:
00008 MTrack() { }
00009 ~MTrack() { }
00010
00011
00012
00013 int GetID() const { return ID; }
00014
00015 bool GetXYZ(double *p) const
00016 {
00017 for(int i=0; i<6; i++)
00018 p[i] = fP[i];
00019 return 1;
00020 }
00021 bool GetCovarianceXYZPxPyPz(double cv[21]) const
00022 {
00023 for (int i=0; i<21; i++)
00024 cv[i] = fC[i];
00025 return 1;
00026 }
00027
00028
00029 void XvYvZv(double *position) const {position[0] = fP[0]; position[1] = fP[1]; position[2] = fP[2];}
00030 void PxPyPz(double *position) const {position[0] = fP[3]; position[1] = fP[4]; position[2] = fP[5];}
00031
00032 double GetX() const { return fP[0]; }
00033 double GetY() const { return fP[1]; }
00034 double GetZ() const { return fP[2]; }
00035 double GetPx() const { return fP[3]; }
00036 double GetPy() const { return fP[4]; }
00037 double GetPz() const { return fP[5]; }
00038 void GetCovarianceMatrix(double *covmatrix)
00039 {
00040 for (int i=0; i<21; i++)
00041 covmatrix[i] = fC[i];
00042 }
00043 double GetParameter(int i) const { return fP[i]; }
00044 double GetCovariance(int i) const { return fC[i]; }
00045
00046 int Charge() const { return fQ; }
00047 double GetChi2perNDF() const { return fChi2/fNDF; }
00048 double GetChi2() const { return fChi2; }
00049 int GetNDF() const { return fNDF; }
00050
00051 void SetParameters(double *position)
00052 {
00053 for(int i=0; i<6; i++)
00054 fP[i] = position[i];
00055 }
00056 void SetParameters(double x, double y, double z, double px, double py, double pz)
00057 {
00058 fP[0] = x; fP[1] = y; fP[2] = z;
00059 fP[3] = px; fP[4] = py; fP[5] = pz;
00060 }
00061 void SetXYZ(double x, double y, double z)
00062 {
00063 fP[0] = x; fP[1] = y; fP[2] = z;
00064 }
00065 void SetPxPyPz(double px, double py, double pz)
00066 {
00067 fP[3] = px; fP[4] = py; fP[5] = pz;
00068 }
00069 void SetID(int id) {ID = id;}
00070
00071 void SetX(double x) { fP[0] = x; }
00072 void SetY(double y) { fP[1] = y; }
00073 void SetZ(double z) { fP[2] = z; }
00074 void SetCharge(int q) { fQ = q; }
00075 void SetChi2(double chi) { fChi2 = chi; }
00076 void SetNDF(int ndf) { fNDF = ndf; }
00077
00078 void SetCovarianceMatrix(double *C)
00079 {
00080 for (int i=0; i<21; i++)
00081 fC[i] = C[i];
00082 }
00083
00084 private:
00085
00086 int ID;
00087 double fP[6];
00088 double fC[21];
00089 double fChi2;
00090 int fQ;
00091 int fNDF;
00092 };
00093
00094 #endif