BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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
6/** CbmVertex.h
7 *@author V.Friese <v.friese@gsi.de>
8 **
9 ** Data class for a vertex in CBM.
10 ** Data level: RECO
11 **/
12
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:
24 /** Default constructor **/
25 CbmVertex();
26
27 /** Constructor with name and title **/
28 CbmVertex(const char* name, const char* title);
29
30 /** Constructor with all member variables
31 *@param name Name of object
32 *@param title Title of object
33 *@param x x coordinate [cm]
34 *@param y y coordinate [cm]
35 *@param z z coordinate [cm]
36 *@param chi2 chi square of vertex fit
37 *@param ndf Number of degrees of freedom of vertex fit
38 *@param nTracks Number of tracks used for vertex fit
39 *@param covMat Covariance Matrix (symmetric, 3x3)
40 **/
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
51 /** Destructor **/
52 virtual ~CbmVertex();
53
54 /** Ouput to screen **/
55 void Print();
56
57 /** Accessors **/
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;
67 std::vector<Int_t> trkID;
68
69 std::vector<Int_t> GetTrackInds() { return trkID; }
70
71 /** Set the member variables
72 *@param x x coordinate [cm]
73 *@param y y coordinate [cm]
74 *@param z z coordinate [cm]
75 *@param chi2 chi square of vertex fit
76 *@param ndf Number of degrees of freedom of vertex fit
77 *@param nTracks Number of tracks used for vertex fit
78 *@param covMat Covariance Matrix (symmetric, 3x3)
79 **/
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
89 {
90 fX = x;
91 fY = y;
92 fZ = z;
93 };
94
95 /** Reset the member variables **/
96 void Reset();
97
99
100 void CopyFrom(CbmVertex* hdr);
101
102 // void Copy(CbmVertex * hdr);
103
104 private:
105 /** Position coordinates [cm] **/
107
108 /** Chi2 of vertex fit **/
110
111 /** Number of degrees of freedom of vertex fit **/
113
114 /** Number of tracks used for the vertex fit **/
116
117 /** Covariance matrix for x, y, and z stored in an array. The
118 ** sequence is a[0,0], a[0,1], a[0,2], a[1,1], a[1,2], a[2,2]
119 **/
121
123};
124
125#endif
int i
Definition P4_F32vec4.h:22
int Int_t
double Double32_t
double Double_t
#define ClassDef(name, id)
TMatrixTSym< Float_t > TMatrixFSym
CbmVertex.h.
Definition CbmVertex.h:21
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat)
Set the member variables.
Double_t GetZ() const
Definition CbmVertex.h:60
Double32_t fY
Definition CbmVertex.h:106
void CopyFrom(CbmVertex *hdr)
std::vector< Int_t > trkID
Definition CbmVertex.h:67
void Position(TVector3 &pos) const
Definition CbmVertex.h:64
CbmVertex()
Default constructor.
Definition CbmVertex.cxx:15
Double32_t fCovMatrix[6]
Covariance matrix for x, y, and z stored in an array.
Definition CbmVertex.h:120
Int_t fNTracks
Number of tracks used for the vertex fit.
Definition CbmVertex.h:115
void Reset()
Reset the member variables.
void Print()
Ouput to screen.
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
Accessors.
Definition CbmVertex.h:58
Double32_t fZ
Definition CbmVertex.h:106
Double32_t fX
Position coordinates [cm].
Definition CbmVertex.h:106
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()
Destructor.
Definition CbmVertex.cxx:77
Double_t GetChi2() const
Definition CbmVertex.h:61
Double32_t fChi2
Chi2 of vertex fit.
Definition CbmVertex.h:109
Double_t GetCovariance(Int_t i, Int_t j) const
Double_t GetY() const
Definition CbmVertex.h:59
Int_t fNDF
Number of degrees of freedom of vertex fit.
Definition CbmVertex.h:112
Int_t GetNDF() const
Definition CbmVertex.h:62
void SetXYZ(Double_t x, Double_t y, Double_t z)