PandaRoot
KFPVertex.h
Go to the documentation of this file.
1 #ifndef KFPVertex_H
2 #define KFPVertex_H
3 
4 class KFPVertex {
5  public:
6  KFPVertex() {}
7  ~KFPVertex() {}
8 
9  /* KFPVertex(const KFPVertex& vVert);
10  KFPVertex& operator=(const KFPVertex& vVert);*/
11 
12  float GetX() const { return fP[0]; }
13  float GetY() const { return fP[1]; }
14  float GetZ() const { return fP[2]; }
15 
16  void GetXYZ(float *position) const
17  {
18  position[0] = fP[0];
19  position[1] = fP[1];
20  position[2] = fP[2];
21  }
22  void GetXYZ(double *position) const
23  {
24  position[0] = fP[0];
25  position[1] = fP[1];
26  position[2] = fP[2];
27  }
28  void GetCovarianceMatrix(float *covmatrix) const
29  {
30  for (int i = 0; i < 6; i++)
31  covmatrix[i] = fC[i];
32  }
33  void GetCovarianceMatrix(double *covmatrix) const
34  {
35  for (int i = 0; i < 6; i++)
36  covmatrix[i] = fC[i];
37  }
38 
39  float GetChi2perNDF() const { return fChi2 / fNDF; }
40  float GetChi2() const { return fChi2; }
41  int GetNDF() const { return fNDF; }
42  int GetNContributors() const { return fNContributors; }
43 
44  float GetParameter(int i) const { return fP[i]; }
45  float GetCovariance(int i) const { return fC[i]; }
46 
47  void SetXYZ(float *position)
48  {
49  fP[0] = position[0];
50  fP[1] = position[1];
51  fP[2] = position[2];
52  }
53  void SetXYZ(float x, float y, float z)
54  {
55  fP[0] = x;
56  fP[1] = y;
57  fP[2] = z;
58  }
59  void SetX(float x) { fP[0] = x; }
60  void SetY(float y) { fP[1] = y; }
61  void SetZ(float z) { fP[2] = z; }
62  void SetChi2(float chi) { fChi2 = chi; }
63  void SetNDF(int ndf) { fNDF = ndf; }
64  void SetNContributors(int nc) { fNContributors = nc; }
65 
66  void SetCovarianceMatrix(float *C)
67  {
68  for (int i = 0; i < 6; i++)
69  fC[i] = C[i];
70  }
71 
72  void SetCovarianceMatrix(float C00, float C10, float C11, float C20, float C21, float C22)
73  {
74  fC[0] = C00;
75  fC[1] = C10;
76  fC[2] = C11;
77  fC[3] = C20;
78  fC[4] = C21;
79  fC[5] = C22;
80  }
81 
82  private:
83  float fP[3]; // coordinates of the vertex
84  float fC[6]; // Covariance matrix of the vertex parameters
85  float fChi2; // chi-square of the vertex fitting
86  int fNContributors; // number of tracks, from which the vertex was builded
87  int fNDF; // degree of freedom number
88 };
89 
90 #endif
~KFPVertex()
Definition: KFPVertex.h:7
float GetCovariance(int i) const
Definition: KFPVertex.h:45
void GetCovarianceMatrix(double *covmatrix) const
Definition: KFPVertex.h:33
float GetY() const
Definition: KFPVertex.h:13
void GetXYZ(float *position) const
Definition: KFPVertex.h:16
void SetNDF(int ndf)
Definition: KFPVertex.h:63
float GetParameter(int i) const
Definition: KFPVertex.h:44
void SetChi2(float chi)
Definition: KFPVertex.h:62
void SetY(float y)
Definition: KFPVertex.h:60
void SetNContributors(int nc)
Definition: KFPVertex.h:64
unsigned int i
Definition: P4_F32vec4.h:21
KFPVertex()
Definition: KFPVertex.h:6
void SetCovarianceMatrix(float C00, float C10, float C11, float C20, float C21, float C22)
Definition: KFPVertex.h:72
void SetZ(float z)
Definition: KFPVertex.h:61
void GetXYZ(double *position) const
Definition: KFPVertex.h:22
void SetX(float x)
Definition: KFPVertex.h:59
void GetCovarianceMatrix(float *covmatrix) const
Definition: KFPVertex.h:28
void SetXYZ(float *position)
Definition: KFPVertex.h:47
void SetXYZ(float x, float y, float z)
Definition: KFPVertex.h:53
float GetChi2() const
Definition: KFPVertex.h:40
int GetNContributors() const
Definition: KFPVertex.h:42
int GetNDF() const
Definition: KFPVertex.h:41
float GetX() const
Definition: KFPVertex.h:12
void SetCovarianceMatrix(float *C)
Definition: KFPVertex.h:66
float GetChi2perNDF() const
Definition: KFPVertex.h:39
float GetZ() const
Definition: KFPVertex.h:14