EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmVertex.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmVertex.h
1 // -------------------------------------------------------------------------
2 // ----- CbmVertex header file -----
3 // ----- Created 28/11/05 by V. Friese -----
4 // -------------------------------------------------------------------------
5 
6 
15 #ifndef CBMVERTEX_H
16 #define CBMVERTEX_H 1
17 
18 
19 #include "TMatrixFSym.h"
20 #include "TNamed.h"
21 #include "TVector3.h"
22 
23 
24 class CbmVertex : public TNamed
25 {
26 
27  public:
28 
30  CbmVertex();
31 
32 
34  CbmVertex(const char* name, const char* title);
35 
36 
48  CbmVertex(const char* name, const char* title,
49  Double_t x, Double_t y, Double_t z, Double_t chi2,
50  Int_t ndf, Int_t nTracks, const TMatrixFSym& covMat);
51 
52 
54  virtual ~CbmVertex();
55 
56 
58  void Print();
59 
60 
62  Double_t GetX() const { return fX; }; // x position [cm]
63  Double_t GetY() const { return fY; }; // y position [cm]
64  Double_t GetZ() const { return fZ; }; // z posiiton [cm]
65  Double_t GetChi2() const { return fChi2; }; // chi2
66  Int_t GetNDF() const { return fNDF; }; // nof degrees of freedom
67  Int_t GetNTracks() const { return fNTracks; }; // nof tracks used
68  void Position(TVector3& pos) const { pos.SetXYZ(fX,fY,fZ); };
69  void CovMatrix(TMatrixFSym& covMat) const;
70  Double_t GetCovariance(Int_t i, Int_t j) const;
71 
72 
82  void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2,
83  Int_t ndf, Int_t nTracks, const TMatrixFSym& covMat);
84 
85 
87  void Reset();
88 
89 
90  private:
91 
93  Double32_t fX, fY, fZ;
94 
96  Double32_t fChi2;
97 
99  Int_t fNDF;
100 
102  Int_t fNTracks;
103 
107  Double32_t fCovMatrix[6];
108 
109 
110  ClassDef(CbmVertex,1);
111 
112 };
113 
114 
115 #endif