CbmRoot
Loading...
Searching...
No Matches
CbmVertex.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Volker Friese, Florian Uhlig, Alex Bercuci, Denis Bertini [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmVertex header file -----
7// ----- Created 28/11/05 by V. Friese -----
8// -------------------------------------------------------------------------
9
10
19#ifndef CBMVERTEX_H
20#define CBMVERTEX_H 1
21
22#include <Rtypes.h> // for ClassDef
23#include <RtypesCore.h> // for Double32_t
24#include <TMatrixFSymfwd.h> // for TMatrixFSym
25#include <TNamed.h> // for TNamed
26#include <TVector3.h> // for TVector3
27
28#include <cstdint>
29#include <string> // for string
30#include <vector> // for global track indices
31
32class CbmVertex : public TNamed {
33
34public:
36 CbmVertex();
37
38
40 CbmVertex(const char* name, const char* title);
41
42
54 CbmVertex(const char* name, const char* title, double x, double y, double z, double chi2, int32_t ndf,
55 int32_t nTracks, const TMatrixFSym& covMat);
56
57
59 virtual ~CbmVertex();
60
61
63 virtual void Print(Option_t* opt = "") const;
64
65
67 double GetX() const { return fX; }; // x position [cm]
68 double GetY() const { return fY; }; // y position [cm]
69 double GetZ() const { return fZ; }; // z posiiton [cm]
70 double GetChi2() const { return fChi2; }; // chi2
71 int32_t GetNDF() const { return fNDF; }; // nof degrees of freedom
72 int32_t GetNTracks() const { return fNTracks; }; // nof tracks used
73 void Position(TVector3& pos) const { pos.SetXYZ(fX, fY, fZ); };
74 void CovMatrix(TMatrixFSym& covMat) const;
75 double GetCovariance(int32_t i, int32_t j) const;
76
78 int32_t GetTrackIndex(int32_t iTrack) const;
80 bool FindTrackByIndex(uint32_t iTrack) const;
81 bool SetTracks(std::vector<uint32_t>& indexVector);
82
84 void Reset();
85
86
96 void SetVertex(double x, double y, double z, double chi2, int32_t ndf, int32_t nTracks, const TMatrixFSym& covMat);
97
98
100 virtual std::string ToString() const;
101
102
103private:
105 Double32_t fX, fY, fZ;
106
108 Double32_t fChi2;
109
111 int32_t fNDF;
112
114 int32_t fNTracks;
115
119 Double32_t fCovMatrix[6];
120
122 std::vector<uint32_t> fTrkIdx = {};
123
125};
126
127
128#endif
bool SetTracks(std::vector< uint32_t > &indexVector)
double GetZ() const
Definition CbmVertex.h:69
Double32_t fY
Definition CbmVertex.h:105
Double32_t fCovMatrix[6]
Definition CbmVertex.h:119
std::vector< uint32_t > fTrkIdx
Definition CbmVertex.h:122
ClassDef(CbmVertex, 2)
void Position(TVector3 &pos) const
Definition CbmVertex.h:73
virtual std::string ToString() const
bool FindTrackByIndex(uint32_t iTrack) const
Accessors to the Global track array. Check if track with global index iTrack was actually used for ve...
void Reset()
void CovMatrix(TMatrixFSym &covMat) const
double GetChi2() const
Definition CbmVertex.h:70
Double32_t fZ
Definition CbmVertex.h:105
int32_t GetTrackIndex(int32_t iTrack) const
Accessors to the Global track array. Retrieve the tracks being actually used for vertex fit by entry ...
Double32_t fX
Definition CbmVertex.h:105
double GetCovariance(int32_t i, int32_t j) const
int32_t GetNDF() const
Definition CbmVertex.h:71
int32_t GetNTracks() const
Definition CbmVertex.h:72
int32_t fNDF
Definition CbmVertex.h:111
virtual ~CbmVertex()
Definition CbmVertex.cxx:87
Double32_t fChi2
Definition CbmVertex.h:108
void SetVertex(double x, double y, double z, double chi2, int32_t ndf, int32_t nTracks, const TMatrixFSym &covMat)
double GetY() const
Definition CbmVertex.h:68
virtual void Print(Option_t *opt="") const
Definition CbmVertex.cxx:92
int32_t fNTracks
Definition CbmVertex.h:114
double GetX() const
Definition CbmVertex.h:67