BmnRoot
Loading...
Searching...
No Matches
CbmVertex.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmVertex header file -----
3// ----- Created 28/11/05 by V. Friese -----
4// -------------------------------------------------------------------------
5
13#ifndef CBMVERTEX_H
14#define CBMVERTEX_H 1
15
16#include "TMatrixFSym.h"
17#include "TNamed.h"
18#include "TVector3.h"
19
20class CbmVertex : public TNamed
21{
22
23 public:
25 CbmVertex();
26
28 CbmVertex(const char* name, const char* title);
29
41 CbmVertex(const char* name,
42 const char* title,
43 Double_t x,
44 Double_t y,
45 Double_t z,
46 Double_t chi2,
47 Int_t ndf,
48 Int_t nTracks,
49 const TMatrixFSym& covMat);
50
52 virtual ~CbmVertex();
53
55 void Print();
56
58 Double_t GetX() const { return fX; }; // x position [cm]
59 Double_t GetY() const { return fY; }; // y position [cm]
60 Double_t GetZ() const { return fZ; }; // z posiiton [cm]
61 Double_t GetChi2() const { return fChi2; }; // chi2
62 Int_t GetNDF() const { return fNDF; }; // nof degrees of freedom
63 Int_t GetNTracks() const { return fNTracks; }; // nof tracks used
64 void Position(TVector3& pos) const { pos.SetXYZ(fX, fY, fZ); };
65 void CovMatrix(TMatrixFSym& covMat) const;
66 Double_t GetCovariance(Int_t i, Int_t j) const;
67 std::vector<Int_t> trkID;
68
69 std::vector<Int_t> GetTrackInds() { return trkID; }
70
80 void SetVertex(Double_t x,
81 Double_t y,
82 Double_t z,
83 Double_t chi2,
84 Int_t ndf,
85 Int_t nTracks,
86 const TMatrixFSym& covMat);
87
88 void SetVertexXYZ(Double_t x, Double_t y, Double_t z)
89 {
90 fX = x;
91 fY = y;
92 fZ = z;
93 };
94
96 void Reset();
97
98 Double32_t (&GetCovMatrix())[6] { return fCovMatrix; }
99
100 void CopyFrom(CbmVertex* hdr);
101
102 // void Copy(CbmVertex * hdr);
103
104 private:
106 Double32_t fX, fY, fZ;
107
109 Double32_t fChi2;
110
112 Int_t fNDF;
113
115 Int_t fNTracks;
116
120 Double32_t fCovMatrix[6];
121
122 ClassDef(CbmVertex, 1);
123};
124
125#endif
int i
Definition P4_F32vec4.h:22
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat)
Double_t GetZ() const
Definition CbmVertex.h:60
void CopyFrom(CbmVertex *hdr)
std::vector< Int_t > trkID
Definition CbmVertex.h:67
void Position(TVector3 &pos) const
Definition CbmVertex.h:64
void Reset()
void Print()
Definition CbmVertex.cxx:82
void SetVertexXYZ(Double_t x, Double_t y, Double_t z)
Definition CbmVertex.h:88
void CovMatrix(TMatrixFSym &covMat) const
Double_t GetX() const
Definition CbmVertex.h:58
Double32_t(& GetCovMatrix())[6]
Definition CbmVertex.h:98
Int_t GetNTracks() const
Definition CbmVertex.h:63
std::vector< Int_t > GetTrackInds()
Definition CbmVertex.h:69
virtual ~CbmVertex()
Definition CbmVertex.cxx:77
Double_t GetChi2() const
Definition CbmVertex.h:61
Double_t GetCovariance(Int_t i, Int_t j) const
Double_t GetY() const
Definition CbmVertex.h:59
Int_t GetNDF() const
Definition CbmVertex.h:62