CbmRoot
Loading...
Searching...
No Matches
CbmVertex Class Reference

#include <CbmVertex.h>

Inheritance diagram for CbmVertex:
[legend]
Collaboration diagram for CbmVertex:
[legend]

Public Member Functions

 CbmVertex ()
 
 CbmVertex (const char *name, const char *title)
 
 CbmVertex (const char *name, const char *title, double x, double y, double z, double chi2, int32_t ndf, int32_t nTracks, const TMatrixFSym &covMat)
 
virtual ~CbmVertex ()
 
virtual void Print (Option_t *opt="") const
 
double GetX () const
 
double GetY () const
 
double GetZ () const
 
double GetChi2 () const
 
int32_t GetNDF () const
 
int32_t GetNTracks () const
 
void Position (TVector3 &pos) const
 
void CovMatrix (TMatrixFSym &covMat) const
 
double GetCovariance (int32_t i, int32_t j) const
 
int32_t GetTrackIndex (int32_t iTrack) const
 Accessors to the Global track array. Retrieve the tracks being actually used for vertex fit by entry in the indices array.
 
bool FindTrackByIndex (uint32_t iTrack) const
 Accessors to the Global track array. Check if track with global index iTrack was actually used for vertex fit.
 
bool SetTracks (std::vector< uint32_t > &indexVector)
 
void Reset ()
 
void SetVertex (double x, double y, double z, double chi2, int32_t ndf, int32_t nTracks, const TMatrixFSym &covMat)
 
virtual std::string ToString () const
 

Private Member Functions

 ClassDef (CbmVertex, 2)
 

Private Attributes

Double32_t fX
 
Double32_t fY
 
Double32_t fZ
 
Double32_t fChi2
 
int32_t fNDF
 
int32_t fNTracks
 
Double32_t fCovMatrix [6]
 
std::vector< uint32_t > fTrkIdx = {}
 

Detailed Description

CbmVertex.h

Author
V.Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e

Data class for a vertex in CBM. Data level: RECO

Definition at line 32 of file CbmVertex.h.

Constructor & Destructor Documentation

◆ CbmVertex() [1/3]

CbmVertex::CbmVertex ( )

Default constructor

Definition at line 25 of file CbmVertex.cxx.

References fCovMatrix.

◆ CbmVertex() [2/3]

CbmVertex::CbmVertex ( const char * name,
const char * title )

Constructor with name and title

Definition at line 41 of file CbmVertex.cxx.

References fCovMatrix.

◆ CbmVertex() [3/3]

CbmVertex::CbmVertex ( const char * name,
const char * title,
double x,
double y,
double z,
double chi2,
int32_t ndf,
int32_t nTracks,
const TMatrixFSym & covMat )

Constructor with all member variables

Parameters
nameName of object
titleTitle of object
xx coordinate [cm]
yy coordinate [cm]
zz coordinate [cm]
chi2chi square of vertex fit
ndfNumber of degrees of freedom of vertex fit
nTracksNumber of tracks used for vertex fit
covMatCovariance Matrix (symmetric, 3x3)

Definition at line 58 of file CbmVertex.cxx.

◆ ~CbmVertex()

CbmVertex::~CbmVertex ( )
virtual

Destructor

Definition at line 87 of file CbmVertex.cxx.

Member Function Documentation

◆ ClassDef()

CbmVertex::ClassDef ( CbmVertex ,
2  )
private

◆ CovMatrix()

void CbmVertex::CovMatrix ( TMatrixFSym & covMat) const

Definition at line 105 of file CbmVertex.cxx.

References fCovMatrix.

Referenced by CbmStsKFTrackFitter::GetChiToVertex(), and GetCovariance().

◆ FindTrackByIndex()

bool CbmVertex::FindTrackByIndex ( uint32_t iTrack) const

Accessors to the Global track array. Check if track with global index iTrack was actually used for vertex fit.

Definition at line 194 of file CbmVertex.cxx.

References fTrkIdx.

Referenced by CbmRecoQaTask::Exec().

◆ GetChi2()

double CbmVertex::GetChi2 ( ) const
inline

◆ GetCovariance()

double CbmVertex::GetCovariance ( int32_t i,
int32_t j ) const

Definition at line 120 of file CbmVertex.cxx.

References CovMatrix().

Referenced by compareEventDataMembers(), compareVertexDataMembers(), and CbmRecoQaTask::Exec().

◆ GetNDF()

int32_t CbmVertex::GetNDF ( ) const
inline

◆ GetNTracks()

◆ GetTrackIndex()

int32_t CbmVertex::GetTrackIndex ( int32_t iTrack) const

Accessors to the Global track array. Retrieve the tracks being actually used for vertex fit by entry in the indices array.

Definition at line 182 of file CbmVertex.cxx.

References fNTracks, and fTrkIdx.

◆ GetX()

◆ GetY()

◆ GetZ()

◆ Position()

void CbmVertex::Position ( TVector3 & pos) const
inline

Definition at line 73 of file CbmVertex.h.

References fX, fY, fZ, and pos.

Referenced by CbmRecoQaTask::Exec(), PairAnalysisPair::GetCosPointingAngle(), and TEST().

◆ Print()

void CbmVertex::Print ( Option_t * opt = "") const
virtual

Ouput to screen

Definition at line 92 of file CbmVertex.cxx.

References fChi2, fNDF, fNTracks, fX, fY, and fZ.

◆ Reset()

void CbmVertex::Reset ( )

Reset the member variables

Definition at line 159 of file CbmVertex.cxx.

References fChi2, fCovMatrix, fNDF, fNTracks, fX, fY, and fZ.

Referenced by CbmFindPrimaryVertex::Exec(), PairAnalysisVarManager::FillVarMCHeader(), and PairAnalysisVarManager::SetEvent().

◆ SetTracks()

bool CbmVertex::SetTracks ( std::vector< uint32_t > & indexVector)

Definition at line 203 of file CbmVertex.cxx.

References fNTracks, and fTrkIdx.

Referenced by CbmPVFinderKFGlobal::FindEventVertex().

◆ SetVertex()

void CbmVertex::SetVertex ( double x,
double y,
double z,
double chi2,
int32_t ndf,
int32_t nTracks,
const TMatrixFSym & covMat )

Set the member variables

Parameters
xx coordinate [cm]
yy coordinate [cm]
zz coordinate [cm]
chi2chi square of vertex fit
ndfNumber of degrees of freedom of vertex fit
nTracksNumber of tracks used for vertex fit
covMatCovariance Matrix (symmetric, 3x3)

Definition at line 132 of file CbmVertex.cxx.

References fChi2, fCovMatrix, fNDF, fNTracks, fX, fY, fZ, x, and y.

Referenced by CbmKresFunctions::ChiToVertex(), PairAnalysisVarManager::FillVarMCHeader(), CbmPVFinderIdeal::FindPrimaryVertex(), CbmKresFunctions::FitToVertex(), CbmKresFunctions::FitToVertexAndGetChi(), CbmEvent::SetVertex(), and TEST().

◆ ToString()

string CbmVertex::ToString ( ) const
virtual

String output

Definition at line 170 of file CbmVertex.cxx.

References fChi2, fNDF, fNTracks, fX, fY, and fZ.

Referenced by CbmFindPrimaryVertexEvents::Exec().

Member Data Documentation

◆ fChi2

Double32_t CbmVertex::fChi2
private

Chi2 of vertex fit

Definition at line 108 of file CbmVertex.h.

Referenced by GetChi2(), Print(), Reset(), SetVertex(), and ToString().

◆ fCovMatrix

Double32_t CbmVertex::fCovMatrix[6]
private

Covariance matrix for x, y, and z stored in an array. The sequence is a[0,0], a[0,1], a[0,2], a[1,1], a[1,2], a[2,2]

Definition at line 119 of file CbmVertex.h.

Referenced by CbmVertex(), CbmVertex(), CovMatrix(), Reset(), and SetVertex().

◆ fNDF

int32_t CbmVertex::fNDF
private

Number of degrees of freedom of vertex fit

Definition at line 111 of file CbmVertex.h.

Referenced by GetNDF(), Print(), Reset(), SetVertex(), and ToString().

◆ fNTracks

int32_t CbmVertex::fNTracks
private

Number of tracks used for the vertex fit

Definition at line 114 of file CbmVertex.h.

Referenced by GetNTracks(), GetTrackIndex(), Print(), Reset(), SetTracks(), SetVertex(), and ToString().

◆ fTrkIdx

std::vector<uint32_t> CbmVertex::fTrkIdx = {}
private

indices of [global] tracks being used for the vertex fit AB 24.07.17 for mCBM 2024

Definition at line 122 of file CbmVertex.h.

Referenced by FindTrackByIndex(), GetTrackIndex(), and SetTracks().

◆ fX

Double32_t CbmVertex::fX
private

Position coordinates [cm]

Definition at line 105 of file CbmVertex.h.

Referenced by GetX(), Position(), Print(), Reset(), SetVertex(), and ToString().

◆ fY

Double32_t CbmVertex::fY
private

Definition at line 105 of file CbmVertex.h.

Referenced by GetY(), Position(), Print(), Reset(), SetVertex(), and ToString().

◆ fZ

Double32_t CbmVertex::fZ
private

Definition at line 105 of file CbmVertex.h.

Referenced by GetZ(), Position(), Print(), Reset(), SetVertex(), and ToString().


The documentation for this class was generated from the following files: