CbmRoot
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 
15 #ifndef CBMVERTEX_H
16 #define CBMVERTEX_H 1
17 
18 #include <Rtypes.h> // for ClassDef
19 #include <RtypesCore.h> // for Double_t, Int_t, Double32_t, Option_t
20 #include <TMatrixFSymfwd.h> // for TMatrixFSym
21 #include <TNamed.h> // for TNamed
22 #include <TVector3.h> // for TVector3
23 
24 #include <string> // for string
25 
26 class CbmVertex : public TNamed {
27 
28 public:
30  CbmVertex();
31 
32 
34  CbmVertex(const char* name, const char* title);
35 
36 
48  CbmVertex(const char* name,
49  const char* title,
50  Double_t x,
51  Double_t y,
52  Double_t z,
53  Double_t chi2,
54  Int_t ndf,
55  Int_t nTracks,
56  const TMatrixFSym& covMat);
57 
58 
60  virtual ~CbmVertex();
61 
62 
64  virtual void Print(Option_t* opt = "") const;
65 
66 
68  Double_t GetX() const { return fX; }; // x position [cm]
69  Double_t GetY() const { return fY; }; // y position [cm]
70  Double_t GetZ() const { return fZ; }; // z posiiton [cm]
71  Double_t GetChi2() const { return fChi2; }; // chi2
72  Int_t GetNDF() const { return fNDF; }; // nof degrees of freedom
73  Int_t GetNTracks() const { return fNTracks; }; // nof tracks used
74  void Position(TVector3& pos) const { pos.SetXYZ(fX, fY, fZ); };
75  void CovMatrix(TMatrixFSym& covMat) const;
76  Double_t GetCovariance(Int_t i, Int_t j) const;
77 
78 
80  void Reset();
81 
82 
92  void SetVertex(Double_t x,
93  Double_t y,
94  Double_t z,
95  Double_t chi2,
96  Int_t ndf,
97  Int_t nTracks,
98  const TMatrixFSym& covMat);
99 
100 
102  virtual std::string ToString() const;
103 
104 
105 private:
107  Double32_t fX, fY, fZ;
108 
110  Double32_t fChi2;
111 
113  Int_t fNDF;
114 
116  Int_t fNTracks;
117 
121  Double32_t fCovMatrix[6];
122 
123 
125 };
126 
127 
128 #endif
CbmVertex::Print
virtual void Print(Option_t *opt="") const
Definition: CbmVertex.cxx:91
CbmVertex::GetNTracks
Int_t GetNTracks() const
Definition: CbmVertex.h:73
CbmVertex::SetVertex
void SetVertex(Double_t x, Double_t y, Double_t z, Double_t chi2, Int_t ndf, Int_t nTracks, const TMatrixFSym &covMat)
Definition: CbmVertex.cxx:129
CbmVertex::fNDF
Int_t fNDF
Definition: CbmVertex.h:113
CbmVertex::ClassDef
ClassDef(CbmVertex, 1)
CbmVertex::fZ
Double32_t fZ
Definition: CbmVertex.h:107
CbmVertex::Reset
void Reset()
Definition: CbmVertex.cxx:159
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmVertex::GetCovariance
Double_t GetCovariance(Int_t i, Int_t j) const
Definition: CbmVertex.cxx:118
CbmVertex::CbmVertex
CbmVertex()
Definition: CbmVertex.cxx:21
CbmVertex::fNTracks
Int_t fNTracks
Definition: CbmVertex.h:116
CbmVertex::GetX
Double_t GetX() const
Definition: CbmVertex.h:68
CbmVertex::GetChi2
Double_t GetChi2() const
Definition: CbmVertex.h:71
CbmVertex::fX
Double32_t fX
Definition: CbmVertex.h:107
CbmVertex::fCovMatrix
Double32_t fCovMatrix[6]
Definition: CbmVertex.h:121
CbmVertex::fChi2
Double32_t fChi2
Definition: CbmVertex.h:110
CbmVertex::Position
void Position(TVector3 &pos) const
Definition: CbmVertex.h:74
CbmVertex::~CbmVertex
virtual ~CbmVertex()
Definition: CbmVertex.cxx:86
CbmVertex
Definition: CbmVertex.h:26
CbmVertex::GetZ
Double_t GetZ() const
Definition: CbmVertex.h:70
CbmVertex::fY
Double32_t fY
Definition: CbmVertex.h:107
CbmVertex::GetY
Double_t GetY() const
Definition: CbmVertex.h:69
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
CbmVertex::ToString
virtual std::string ToString() const
Definition: CbmVertex.cxx:169
CbmVertex::GetNDF
Int_t GetNDF() const
Definition: CbmVertex.h:72
CbmVertex::CovMatrix
void CovMatrix(TMatrixFSym &covMat) const
Definition: CbmVertex.cxx:104