StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MVertex.h
1 #ifndef MVertex_H
2 #define MVertex_H
3 
4 class MVertex
5 {
6  public:
7  MVertex() { }
8  ~MVertex() { }
9 
10 /* MVertex(const MVertex& vVert);
11  MVertex& operator=(const MVertex& vVert);*/
12 
13  double GetX() const { return fP[0]; }
14  double GetY() const { return fP[1]; }
15  double GetZ() const { return fP[2]; }
16 
17  void GetXYZ(double *position) const {position[0] = fP[0]; position[1] = fP[1]; position[2] = fP[2];}
18  void GetCovarianceMatrix(double *covmatrix) const
19  {
20  for (int i=0; i<6; i++)
21  covmatrix[i] = fC[i];
22  }
23 
24  double GetChi2perNDF() const { return fChi2/fNDF; }
25  double GetChi2() const { return fChi2; }
26  int GetNDF() const { return fNDF; }
27  int GetNContributors() const { return fNContributors; }
28 
29  double GetParameter(int i) const { return fP[i]; }
30  double GetCovariance(int i) const { return fC[i]; }
31 
32 
33  void SetXYZ(double *position) { fP[0] = position[0]; fP[1] = position[1]; fP[2] = position[2]; }
34  void SetXYZ(double x, double y, double z) { fP[0] = x; fP[1] = y; fP[2] = z; }
35  void SetX(double x) { fP[0] = x; }
36  void SetY(double y) { fP[1] = y; }
37  void SetZ(double z) { fP[2] = z; }
38  void SetChi2(double chi) { fChi2 = chi; }
39  void SetNDF(int ndf) { fNDF = ndf; }
40  void SetNContributors(int nc) { fNContributors = nc; }
41 
42  void SetCovarianceMatrix(double *C)
43  {
44  for (int i=0; i<6; i++)
45  fC[i] = C[i];
46  }
47 
48  void SetCovarianceMatrix(double C00,double C10,double C11,double C20,double C21,double C22)
49  {
50  fC[0] = C00;
51  fC[1] = C10;
52  fC[2] = C11;
53  fC[3] = C20;
54  fC[4] = C21;
55  fC[5] = C22;
56  }
57 
58  private:
59 
60  double fP[3]; //coordinates of the vertex
61  double fC[6]; //Covariance matrix of the vertex parameters
62  double fChi2; //chi-square of the vertex fitting
63  int fNContributors; // number of tracks, from which the vertex was builded
64  int fNDF; //degree of freedom number
65 };
66 
67 #endif
Definition: MVertex.h:4