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