Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
KFPTrack Class Reference

A scalar class for storage of the track in the cartesian parametrisation. More...

#include <KFParticle/blob/master/KFParticle/KFPTrack.h>

Public Member Functions

 KFPTrack ()
 
 ~KFPTrack ()
 
int GetID () const
 Returns Id of the track.
 
bool GetXYZPxPyPz (float *p) const
 
bool GetCovarianceXYZPxPyPz (float cv[21]) const
 
bool GetCovarianceXYZPxPyPz (double cv[21]) const
 
void GetXYZ (float *position) const
 
void GetPxPyPz (float *position) const
 
void XvYvZv (float *position) const
 
void PxPyPz (float *position) const
 
void XvYvZv (double *position) const
 
void PxPyPz (double *position) const
 
float GetX () const
 Returns X coordinate of the track.
 
float GetY () const
 Returns Y coordinate of the track.
 
float GetZ () const
 Returns Z coordinate of the track.
 
float GetPx () const
 Returns Px component of the momentum of the track.
 
float GetPy () const
 Returns Py component of the momentum of the track.
 
float GetPz () const
 Returns Pz component of the momentum of the track.
 
float GetPt () const
 Returns Pt - transverse momentum of the track.
 
float GetP () const
 Returns P - momentum of the track.
 
void GetCovarianceMatrix (float *covmatrix)
 
float GetParameter (int i) const
 Returns parameter "i" of the track.
 
float GetCovariance (int i) const
 Returns element of the covariance matrix "i" of the track.
 
int Charge () const
 Returns charge of the track.
 
float GetChi2perNDF () const
 Returns Chi2/NDF of the track, NDF is a number of degrees of freedom.
 
float GetChi2 () const
 Returns Chi2 of the track.
 
int GetNDF () const
 Returns number of degrees of freedom of the track.
 
const float * GetTrack () const
 Returns a pointer to the array of track parameters.
 
const float * GetCovMatrix () const
 Returns a pointer to the array of the covariance matrix elements stored in a lower triangular form.
 
void SetParameters (const float *position)
 
void SetParameters (double *position)
 
void SetParameters (float x, float y, float z, float px, float py, float pz)
 
void SetXYZ (float x, float y, float z)
 
void SetPxPyPz (float px, float py, float pz)
 
void SetID (int id)
 Sets Id of the track.
 
void SetX (float x)
 Sets X coordinate of the track.
 
void SetY (float y)
 Sets Y coordinate of the track.
 
void SetZ (float z)
 Sets Z coordinate of the track.
 
void SetPx (float px)
 Sets Px component of the track momentum.
 
void SetPy (float py)
 Sets Py component of the track momentum.
 
void SetPz (float pz)
 Sets Pz component of the track momentum.
 
void SetCharge (int q)
 Sets charge of the track.
 
void SetChi2 (float chi)
 Sets a value of the track Chi2.
 
void SetNDF (int ndf)
 Sets a value of the number of degrees of freedom.
 
void SetCovarianceMatrix (const float *C)
 
void SetCovarianceMatrix (const double *C)
 
void SetCovariance (const int i, const float c)
 
void RotateXY (float alpha)
 
int Id () const
 Returns Id of the track.
 
void SetId (int id)
 Sets Id of the track.
 

Private Attributes

float fP [6]
 Parameters of the track: { X, Y, Z, Px, Py, Pz }.
 
float fC [21]
 Covariance matrix of the track parameters. Stored in the lower triangular form.
 
float fChi2
 Chi-square of the track fit.
 
char fQ
 Charge of the track.
 
short fNDF
 Number of degree of freedom of the fit.
 
int fId
 Id of the track.
 

Detailed Description

A scalar class for storage of the track in the cartesian parametrisation.

Author
M.Zyzak, I.Kisel
Date
05.02.2019
Version
1.0

A track is described with the state vector { X, Y, Z, Px, Py, Pz } and the corresponding covariance matrix. Also contains charge of the track, chi2 of the track fit, the corresponding number of degrees of freedom, the unique Id of the track and the field approximation along the track trajectory.

Definition at line 39 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 39 of file KFPTrack.h

Constructor & Destructor Documentation

KFPTrack::KFPTrack ( )
inline

Definition at line 46 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 46 of file KFPTrack.h

KFPTrack::~KFPTrack ( )
inline

Definition at line 47 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 47 of file KFPTrack.h

Member Function Documentation

int KFPTrack::Charge ( ) const
inline

Returns charge of the track.

Definition at line 113 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 113 of file KFPTrack.h

References fQ.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

float KFPTrack::GetChi2 ( ) const
inline

Returns Chi2 of the track.

Definition at line 115 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 115 of file KFPTrack.h

References fChi2.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

float KFPTrack::GetChi2perNDF ( ) const
inline

Returns Chi2/NDF of the track, NDF is a number of degrees of freedom.

Definition at line 114 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 114 of file KFPTrack.h

References fChi2, and fNDF.

float KFPTrack::GetCovariance ( int  i) const
inline

Returns element of the covariance matrix "i" of the track.

Parameters
[in]i- index of the element to be returned

Definition at line 111 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 111 of file KFPTrack.h

References fC, and i.

void KFPTrack::GetCovarianceMatrix ( float *  covmatrix)
inline

Copies the covariance matrix of the track to the array of floats.

Parameters
[out]covmatrix[21]- the output array, where the covariance matrix is copied

Definition at line 102 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 102 of file KFPTrack.h

References fC, and i.

bool KFPTrack::GetCovarianceXYZPxPyPz ( float  cv[21]) const
inline

Copies the covariance matrix of the track to the array of floats.

Parameters
[out]cv[21]- the output array, where the covariance matrix is copied

Definition at line 60 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 60 of file KFPTrack.h

References fC, and i.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

bool KFPTrack::GetCovarianceXYZPxPyPz ( double  cv[21]) const
inline

Copies the covariance matrix of the track to the array of doubles.

Parameters
[out]cv[21]- the output array, where the covariance matrix is copied

Definition at line 69 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 69 of file KFPTrack.h

References fC, and i.

const float* KFPTrack::GetCovMatrix ( ) const
inline

Returns a pointer to the array of the covariance matrix elements stored in a lower triangular form.

Definition at line 119 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 119 of file KFPTrack.h

References fC.

int KFPTrack::GetID ( ) const
inline

Returns Id of the track.

Definition at line 49 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 49 of file KFPTrack.h

References fId.

int KFPTrack::GetNDF ( ) const
inline

Returns number of degrees of freedom of the track.

Definition at line 116 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 116 of file KFPTrack.h

References fNDF.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

float KFPTrack::GetP ( ) const
inline

Returns P - momentum of the track.

Definition at line 100 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 100 of file KFPTrack.h

References fP.

float KFPTrack::GetParameter ( int  i) const
inline

Returns parameter "i" of the track.

Parameters
[in]i- index of the parameter to be returned

Definition at line 110 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 110 of file KFPTrack.h

References fP, and i.

float KFPTrack::GetPt ( ) const
inline

Returns Pt - transverse momentum of the track.

Definition at line 99 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 99 of file KFPTrack.h

References fP.

float KFPTrack::GetPx ( ) const
inline

Returns Px component of the momentum of the track.

Definition at line 95 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 95 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::GetPxPyPz ( float *  position) const
inline

Copies 3 momentum components of the track to the output array of floats.

Parameters
[out]position- the output array with the momentum of the track

Definition at line 82 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 82 of file KFPTrack.h

References fP.

float KFPTrack::GetPy ( ) const
inline

Returns Py component of the momentum of the track.

Definition at line 96 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 96 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

float KFPTrack::GetPz ( ) const
inline

Returns Pz component of the momentum of the track.

Definition at line 97 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 97 of file KFPTrack.h

References fP.

const float* KFPTrack::GetTrack ( ) const
inline

Returns a pointer to the array of track parameters.

Definition at line 118 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 118 of file KFPTrack.h

References fP.

float KFPTrack::GetX ( ) const
inline

Returns X coordinate of the track.

Definition at line 92 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 92 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::GetXYZ ( float *  position) const
inline

Copies position of the track to the output array of floats.

Parameters
[out]position- the output array with the position of the track

Definition at line 80 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 80 of file KFPTrack.h

References fP.

bool KFPTrack::GetXYZPxPyPz ( float *  p) const
inline

Fills an array p with the parameters of the track.

Parameters
[out]p- array where { X, Y, Z, Px, Py, Pz } are copied

Definition at line 51 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 51 of file KFPTrack.h

References fP, and i.

float KFPTrack::GetY ( ) const
inline

Returns Y coordinate of the track.

Definition at line 93 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 93 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

float KFPTrack::GetZ ( ) const
inline

Returns Z coordinate of the track.

Definition at line 94 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 94 of file KFPTrack.h

References fP.

int KFPTrack::Id ( ) const
inline

Returns Id of the track.

Definition at line 202 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 202 of file KFPTrack.h

References fId.

Referenced by KFParticleFinder::FindParticles(), and KFParticlePVReconstructor::Init().

+ Here is the caller graph for this function:

void KFPTrack::PxPyPz ( float *  position) const
inline

Copies 3 momentum components of the track to the output array of floats.

Parameters
[out]position- the output array with the momentum of the track

Definition at line 86 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 86 of file KFPTrack.h

References fP.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

void KFPTrack::PxPyPz ( double position) const
inline

Copies 3 momentum components of the track to the output array of doubles.

Parameters
[out]position- the output array with the momentum of the track

Definition at line 90 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 90 of file KFPTrack.h

References fP.

void KFPTrack::RotateXY ( float  alpha)

Rotates the parameters of the track on an angle alpha in the XY plane. Can be used in case of the transforamtion of the coordinate system. The rotation matrix is:

{  cos(A), -sin(A),  0,        0,        0,   0 }
{  sin(A),  cos(A),  0,        0,        0,   0 }
{       0,       0,  1,        0,        0,   0 }
{       0,       0,  0,   cos(A),  -sin(A),   0 }
{       0,       0,  0,   sin(A),   cos(A),   0 }
{       0,       0,  0,        0,        0,   1 } 
Parameters
[in]alpha- rotation angle

Definition at line 28 of file KFPTrack.cxx.

View newest version in sPHENIX GitHub at line 28 of file KFPTrack.cxx

References Acts::Test::cov, fC, GetPx(), GetPy(), GetX(), GetY(), SetPx(), SetPy(), SetX(), SetY(), ambiguity_solver_full_chain::x, and y.

+ Here is the call graph for this function:

void KFPTrack::SetCharge ( int  q)
inline

Sets charge of the track.

Definition at line 176 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 176 of file KFPTrack.h

References fQ.

Referenced by KFPTrackVector::GetTrack(), and KFParticleTest::RunTestSingle().

+ Here is the caller graph for this function:

void KFPTrack::SetChi2 ( float  chi)
inline

Sets a value of the track Chi2.

Definition at line 177 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 177 of file KFPTrack.h

References fChi2.

Referenced by KFParticleTest::RunTestSingle().

+ Here is the caller graph for this function:

void KFPTrack::SetCovariance ( const int  i,
const float  c 
)
inline

Sets an element of the covariance matrix with index "i".

Parameters
[in]c- value to be set
[in]i- index of the element

Definition at line 198 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 198 of file KFPTrack.h

References Acts::PhysicalConstants::c, fC, and i.

Referenced by KFPTrackVector::GetTrack().

+ Here is the caller graph for this function:

void KFPTrack::SetCovarianceMatrix ( const float *  C)
inline

Sets the covariance matrix from the input array of floats.

Parameters
[in]C[21]- array with the input elements of the covariance matrix stored in the lower triangular form

Definition at line 180 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 180 of file KFPTrack.h

References fC, and i.

Referenced by KFParticleTest::RunTestSingle().

+ Here is the caller graph for this function:

void KFPTrack::SetCovarianceMatrix ( const double C)
inline

Sets the covariance matrix from the input array of doubles.

Parameters
[in]C[21]- array with the input elements of the covariance matrix stored in the lower triangular form

Definition at line 188 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 188 of file KFPTrack.h

References fC, and i.

void KFPTrack::SetID ( int  id)
inline

Sets Id of the track.

Definition at line 168 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 168 of file KFPTrack.h

References fId, and train_ambiguity_solver::id.

void KFPTrack::SetId ( int  id)
inline

Sets Id of the track.

Definition at line 203 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 203 of file KFPTrack.h

References fId, and train_ambiguity_solver::id.

Referenced by KFPTrackVector::GetTrack().

+ Here is the caller graph for this function:

void KFPTrack::SetNDF ( int  ndf)
inline

Sets a value of the number of degrees of freedom.

Definition at line 178 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 178 of file KFPTrack.h

References fNDF.

Referenced by KFParticleTest::RunTestSingle().

+ Here is the caller graph for this function:

void KFPTrack::SetParameters ( const float *  position)
inline

Sets parameters { X, Y, Z, Px, Py, Pz } of the track from the input array of floats.

Parameters
[in]position- input array with the track parameters

Definition at line 121 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 121 of file KFPTrack.h

References fP, and i.

Referenced by KFPTrackVector::GetTrack(), and KFParticleTest::RunTestSingle().

+ Here is the caller graph for this function:

void KFPTrack::SetParameters ( double position)
inline

Sets parameters { X, Y, Z, Px, Py, Pz } of the track from the input array of doubles.

Parameters
[in]position- input array with the track parameters

Definition at line 129 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 129 of file KFPTrack.h

References fP, and i.

void KFPTrack::SetParameters ( float  x,
float  y,
float  z,
float  px,
float  py,
float  pz 
)
inline

Sets parameters { X, Y, Z, Px, Py, Pz } of the track.

Parameters
[in]x- X coordinate to be set
[in]y- Y coordinate to be set
[in]z- Z coordinate to be set
[in]Px- Px momentum component to be set
[in]Py- Py momentum component to be set
[in]Pz- Pz momentum component to be set

Definition at line 137 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 137 of file KFPTrack.h

References fP, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

void KFPTrack::SetPx ( float  px)
inline

Sets Px component of the track momentum.

Definition at line 173 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 173 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::SetPxPyPz ( float  px,
float  py,
float  pz 
)
inline

Sets momentum { Px, Py, Pz } of the track.

Parameters
[in]Px- Px momentum component to be set
[in]Py- Py momentum component to be set
[in]Pz- Pz momentum component to be set

Definition at line 159 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 159 of file KFPTrack.h

References fP.

void KFPTrack::SetPy ( float  py)
inline

Sets Py component of the track momentum.

Definition at line 174 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 174 of file KFPTrack.h

References fP.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::SetPz ( float  pz)
inline

Sets Pz component of the track momentum.

Definition at line 175 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 175 of file KFPTrack.h

References fP.

void KFPTrack::SetX ( float  x)
inline

Sets X coordinate of the track.

Definition at line 170 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 170 of file KFPTrack.h

References fP, and ambiguity_solver_full_chain::x.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::SetXYZ ( float  x,
float  y,
float  z 
)
inline

Sets position { X, Y, Z } of the track.

Parameters
[in]x- X coordinate to be set
[in]y- Y coordinate to be set
[in]z- Z coordinate to be set

Definition at line 150 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 150 of file KFPTrack.h

References fP, ambiguity_solver_full_chain::x, y, and physmon_track_finding_ttbar::z.

void KFPTrack::SetY ( float  y)
inline

Sets Y coordinate of the track.

Definition at line 171 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 171 of file KFPTrack.h

References fP, and y.

Referenced by RotateXY().

+ Here is the caller graph for this function:

void KFPTrack::SetZ ( float  z)
inline

Sets Z coordinate of the track.

Definition at line 172 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 172 of file KFPTrack.h

References fP, and physmon_track_finding_ttbar::z.

void KFPTrack::XvYvZv ( float *  position) const
inline

Copies position of the track to the output array of floats.

Parameters
[out]position- the output array with the position of the track

Definition at line 84 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 84 of file KFPTrack.h

References fP.

Referenced by KFParticleSIMD::Create(), KFParticle::KFParticle(), and KFParticleSIMD::KFParticleSIMD().

+ Here is the caller graph for this function:

void KFPTrack::XvYvZv ( double position) const
inline

Copies position of the track to the output array of doubles.

Parameters
[out]position- the output array with the position of the track

Definition at line 88 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 88 of file KFPTrack.h

References fP.

Member Data Documentation

float KFPTrack::fC[21]
private

Covariance matrix of the track parameters. Stored in the lower triangular form.

Definition at line 213 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 213 of file KFPTrack.h

Referenced by GetCovariance(), GetCovarianceMatrix(), GetCovarianceXYZPxPyPz(), GetCovMatrix(), RotateXY(), SetCovariance(), and SetCovarianceMatrix().

float KFPTrack::fChi2
private

Chi-square of the track fit.

Definition at line 214 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 214 of file KFPTrack.h

Referenced by GetChi2(), GetChi2perNDF(), and SetChi2().

int KFPTrack::fId
private

Id of the track.

Definition at line 217 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 217 of file KFPTrack.h

Referenced by GetID(), Id(), SetID(), and SetId().

short KFPTrack::fNDF
private

Number of degree of freedom of the fit.

Definition at line 216 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 216 of file KFPTrack.h

Referenced by GetChi2perNDF(), GetNDF(), and SetNDF().

float KFPTrack::fP[6]
private

Parameters of the track: { X, Y, Z, Px, Py, Pz }.

Definition at line 212 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 212 of file KFPTrack.h

Referenced by GetP(), GetParameter(), GetPt(), GetPx(), GetPxPyPz(), GetPy(), GetPz(), GetTrack(), GetX(), GetXYZ(), GetXYZPxPyPz(), GetY(), GetZ(), PxPyPz(), SetParameters(), SetPx(), SetPxPyPz(), SetPy(), SetPz(), SetX(), SetXYZ(), SetY(), SetZ(), and XvYvZv().

char KFPTrack::fQ
private

Charge of the track.

Definition at line 215 of file KFPTrack.h.

View newest version in sPHENIX GitHub at line 215 of file KFPTrack.h

Referenced by Charge(), and SetCharge().


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