BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnVertex.h
Go to the documentation of this file.
1/** BmnVertex.h
2 ** @author V.Friese <v.friese@gsi.de>
3 ** @author D. Baranov
4 ** @author S. Merts
5 **
6 ** Data class for a vertex in BM@N/SRC.
7 ** Data level: RECO
8 **/
9
10#ifndef BMNVERTEX_H
11#define BMNVERTEX_H 1
12
13#include "TMatrixFSym.h"
14#include "TObject.h"
15#include "TVector3.h"
16
17#include <vector>
18
19using namespace std;
20
21class BmnVertex : public TObject
22{
23 public:
24 /** Default constructor **/
25 BmnVertex();
26
27 /** Constructor with all member variables
28 *@param x x coordinate [cm]
29 *@param y y coordinate [cm]
30 *@param z z coordinate [cm]
31 *@param chi2 chi square of vertex fit
32 *@param ndf Number of degrees of freedom of vertex fit
33 *@param nTracks Number of tracks used for vertex fit
34 *@param covMat Covariance Matrix (symmetric, 3x3)
35 *@param flag vertex type
36 *@param idxs Vector of indexes of tracks used to reconstruct current vertex
37 **/
39 Double_t y,
40 Double_t z,
41 Double_t chi2,
42 Int_t ndf,
43 Int_t nTracks,
44 const TMatrixFSym& covMat,
45 Int_t flag,
46 vector<Int_t> idxs);
47
48 /** Destructor **/
49 virtual ~BmnVertex();
50
51 /** Ouput to screen **/
52 void Print();
53
54 /** Accessors **/
55 Double_t GetX() const { return fX; }; // x position [cm]
56 Double_t GetY() const { return fY; }; // y position [cm]
57 Double_t GetZ() const { return fZ; }; // z posiiton [cm]
58 Double_t GetChi2() const { return fChi2; }; // chi2
59 Int_t GetNDF() const { return fNDF; }; // nof degrees of freedom
60 Int_t GetNTracks() const { return fNTracks; }; // nof tracks used
61 void Position(TVector3& pos) const { pos.SetXYZ(fX, fY, fZ); };
62 void CovMatrix(TMatrixFSym& covMat) const;
64 std::vector<Int_t>& GetTrackIdxs() { return fTrackIdxs; }
65 Int_t GetFlag() { return fFlag; }
66
67 /** Reset the member variables **/
68 void Reset();
69
70 /** Set the member variables
71 *@param x x coordinate [cm]
72 *@param y y coordinate [cm]
73 *@param z z coordinate [cm]
74 *@param chi2 chi square of vertex fit
75 *@param ndf Number of degrees of freedom of vertex fit
76 *@param nTracks Number of tracks used for vertex fit
77 *@param covMat Covariance Matrix (symmetric, 3x3)
78 *@param flag vertex type
79 *@param idxs Vector of indexes of tracks used to reconstruct current vertex
80 **/
81 void SetVertex(Double_t x,
82 Double_t y,
83 Double_t z,
84 Double_t chi2,
85 Int_t ndf,
86 Int_t nTracks,
87 const TMatrixFSym& covMat,
88 Int_t flag,
89 vector<Int_t> idxs);
90
91 /** String output **/
92 virtual std::string ToString() const;
93
94 private:
95 /** Position coordinates [cm] **/
97
98 /** Chi2 of vertex fit **/
100
101 /** Number of degrees of freedom of vertex fit **/
103
104 /** Number of tracks used for the vertex fit **/
106
107 /** Covariance matrix for x, y, and z stored in an array. The
108 ** sequence is a[0,0], a[0,1], a[0,2], a[1,1], a[1,2], a[2,2]
109 **/
111
112 /** Vector of indexes of tracks used to reconstruct current vertex **/
113 vector<Int_t> fTrackIdxs;
114
115 /** Flag to mark vertexes by types
116 * for SRC setup next types are used:
117 * -1 - default value, vertex not defined
118 * 10 - vertex reconstructed by left arm track + right arm track + global tracks with upstream part
119 * 11 - vertex reconstructed by left arm track + right arm track
120 * 12 - vertex reconstructed by left arm track + global tracks with upstream part
121 * 13 - vertex reconstructed by right arm track + global tracks with upstream part**/
123
125};
126
127#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
Int_t GetFlag()
Definition BmnVertex.h:65
Double32_t fZ
Definition BmnVertex.h:96
std::vector< Int_t > & GetTrackIdxs()
Definition BmnVertex.h:64
Int_t GetNTracks() const
Definition BmnVertex.h:60
Double_t GetX() const
Accessors.
Definition BmnVertex.h:55
Int_t GetNDF() const
Definition BmnVertex.h:59
Double32_t fX
Position coordinates [cm].
Definition BmnVertex.h:96
Int_t fNTracks
Number of tracks used for the vertex fit.
Definition BmnVertex.h:105
BmnVertex()
Default constructor.
Definition BmnVertex.cxx:10
void Position(TVector3 &pos) const
Definition BmnVertex.h:61
Double32_t fCovMatrix[6]
Covariance matrix for x, y, and z stored in an array.
Definition BmnVertex.h:110
Double32_t fChi2
Chi2 of vertex fit.
Definition BmnVertex.h:99
Int_t fFlag
Flag to mark vertexes by types for SRC setup next types are used: -1 - default value,...
Definition BmnVertex.h:122
virtual std::string ToString() const
String output.
Double_t GetChi2() const
Definition BmnVertex.h:58
Double_t GetZ() const
Definition BmnVertex.h:57
void Print()
Ouput to screen.
Definition BmnVertex.cxx:65
Double32_t fY
Definition BmnVertex.h:96
Double_t GetY() const
Definition BmnVertex.h:56
void CovMatrix(TMatrixFSym &covMat) const
Definition BmnVertex.cxx:78
virtual ~BmnVertex()
Destructor.
Definition BmnVertex.cxx:61
vector< Int_t > fTrackIdxs
Vector of indexes of tracks used to reconstruct current vertex.
Definition BmnVertex.h:113
Double_t GetCovariance(Int_t i, Int_t j) const
Definition BmnVertex.cxx:92
void Reset()
Reset the member variables.
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat, Int_t flag, vector< Int_t > idxs)
Set the member variables.
Int_t fNDF
Number of degrees of freedom of vertex fit.
Definition BmnVertex.h:102
void SetXYZ(Double_t x, Double_t y, Double_t z)