Belle II Software  release-08-01-10
KFitTrack Class Reference

KFitTrack is a container of the track information (Lorentz vector, position, and error matrix), and a set of macro functions to set/get the contents. More...

#include <KFitTrack.h>

Collaboration diagram for KFitTrack:

Classes

struct  KFitPXE
 KFitPXE is a container of the track information (Lorentz vector, position, and error matrix). More...
 

Public Member Functions

 KFitTrack (void)
 Construct an object with no argument.
 
 KFitTrack (const KFitTrack &kp)
 Construct the object as a copy constructor.
 
 KFitTrack (const CLHEP::HepLorentzVector &p, const HepPoint3D &x, const CLHEP::HepSymMatrix &e, const double q, const int flag=KFitConst::kBeforeFit)
 Construct the object with track properties. More...
 
 ~KFitTrack (void)
 Destruct the object.
 
KFitTrackoperator= (const KFitTrack &)
 Operator: assignment operator.
 
void setMomentum (const CLHEP::HepLorentzVector &p, const int flag=KFitConst::kBeforeFit)
 Set a Lorentz vector of the track. More...
 
void setPosition (const HepPoint3D &x, const int flag=KFitConst::kBeforeFit)
 Set a position of the track. More...
 
void setError (const CLHEP::HepSymMatrix &e, const int flag=KFitConst::kBeforeFit)
 Set an error matrix of the track. More...
 
void setCharge (const double q)
 Set a charge of the track. More...
 
void setVertex (const HepPoint3D &v)
 Set a vertex position associated to the track. More...
 
void setVertexError (const CLHEP::HepSymMatrix &ve)
 Set a vertex error matrix associated to the track. More...
 
const CLHEP::HepLorentzVector getMomentum (const int flag=KFitConst::kAfterFit) const
 Get a Lorentz vector of the track. More...
 
const HepPoint3D getPosition (const int flag=KFitConst::kAfterFit) const
 Get a position of the track. More...
 
const CLHEP::HepSymMatrix getError (const int flag=KFitConst::kAfterFit) const
 Get an error matrix of the track. More...
 
double getCharge (void) const
 Get a charge of the track.
 
double getMass (void) const
 Get a mass of the track.
 
const HepPoint3D getVertex (void) const
 Get a vertex position associated to the track.
 
const CLHEP::HepSymMatrix getVertexError (void) const
 Get a vertex error matrix associated to the track.
 
double getFitParameter (const int which, const int flag) const
 Get a parameter of the track. More...
 
const CLHEP::HepMatrix getFitParameter (const int flag) const
 Get a parameter set of the track. More...
 
const CLHEP::HepSymMatrix getFitError (const int flag) const
 Get an error matrix of the track. More...
 
const CLHEP::HepMatrix getMomPos (const int flag) const
 Get a combination of Lorentz vector and position of the track. More...
 

Private Member Functions

void checkFlag (const int flag) const
 Check if the flag is one of KFitConst::kBeforeFit or KFitConst::kAfterFit. More...
 
void checkMatrixDimension (const CLHEP::HepSymMatrix &m, const int dim) const
 Check if the matrix size is intended one. More...
 

Private Attributes

struct KFitPXE m_PXEBefore
 Lorentz vector, position, and error matrix of the track before the fit.
 
struct KFitPXE m_PXEAfter
 Lorentz vector, position, and error matrix of the track after the fit.
 
double m_Charge
 Charge of the track.
 
double m_Mass
 Mass of the track.
 
HepPoint3D m_Vertex
 Vertex position associated to the track.
 
CLHEP::HepSymMatrix m_VertexError
 Vertex error matrix associated to the track.
 

Detailed Description

KFitTrack is a container of the track information (Lorentz vector, position, and error matrix), and a set of macro functions to set/get the contents.

Definition at line 38 of file KFitTrack.h.

Constructor & Destructor Documentation

◆ KFitTrack()

KFitTrack ( const CLHEP::HepLorentzVector &  p,
const HepPoint3D x,
const CLHEP::HepSymMatrix &  e,
const double  q,
const int  flag = KFitConst::kBeforeFit 
)

Construct the object with track properties.

Parameters
pLorentz vector of the track
xposition of the track
e(7x7) error matrix of the track
qcharge of the track
flagKFitConst::kBeforeFit or KFitConst::kAfterFit

Member Function Documentation

◆ checkFlag()

void checkFlag ( const int  flag) const
inlineprivate

Check if the flag is one of KFitConst::kBeforeFit or KFitConst::kAfterFit.

If check fails, abort the program.

Parameters
flag

Definition at line 164 of file KFitTrack.h.

165  {
166  if (flag != KFitConst::kBeforeFit && flag != KFitConst::kAfterFit) B2FATAL("checkFlag");
167  }
static const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.
Definition: KFitConst.h:37
static const int kBeforeFit
Input parameter to specify before-fit when setting/getting a track attribute.
Definition: KFitConst.h:35

◆ checkMatrixDimension()

void checkMatrixDimension ( const CLHEP::HepSymMatrix &  m,
const int  dim 
) const
inlineprivate

Check if the matrix size is intended one.

If check fails, abort the program.

Parameters
mmatrix to be tested
dimsize of the matrix

Definition at line 173 of file KFitTrack.h.

◆ getError()

const HepSymMatrix getError ( const int  flag = KFitConst::kAfterFit) const

Get an error matrix of the track.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
error matrix of the track

Definition at line 172 of file KFitTrack.cc.

173 {
174  checkFlag(flag);
176 }
void checkFlag(const int flag) const
Check if the flag is one of KFitConst::kBeforeFit or KFitConst::kAfterFit.
Definition: KFitTrack.h:164
struct KFitPXE m_PXEBefore
Lorentz vector, position, and error matrix of the track before the fit.
Definition: KFitTrack.h:181
struct KFitPXE m_PXEAfter
Lorentz vector, position, and error matrix of the track after the fit.
Definition: KFitTrack.h:184
CLHEP::HepSymMatrix m_E
(7x7) error matrix of the track
Definition: KFitTrack.h:49

◆ getFitError()

const HepSymMatrix getFitError ( const int  flag) const

Get an error matrix of the track.

Not intended for end user's use.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
fitted error matrix

Definition at line 246 of file KFitTrack.cc.

◆ getFitParameter() [1/2]

const HepMatrix getFitParameter ( const int  flag) const

Get a parameter set of the track.

Not intended for end user's use.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
array of getFitParameter(0,flag) ... getFitParameter(5,flag)

Definition at line 234 of file KFitTrack.cc.

◆ getFitParameter() [2/2]

double getFitParameter ( const int  which,
const int  flag 
) const

Get a parameter of the track.

Not intended for end user's use.

Parameters
which(0,1,2,3,4,5) = (Px,Py,Pz,Xx,Xy,Xz)
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
corresponding parameter

Definition at line 208 of file KFitTrack.cc.

◆ getMomentum()

const HepLorentzVector getMomentum ( const int  flag = KFitConst::kAfterFit) const

Get a Lorentz vector of the track.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
Lorentz vector of the track

Definition at line 156 of file KFitTrack.cc.

◆ getMomPos()

const HepMatrix getMomPos ( const int  flag) const

Get a combination of Lorentz vector and position of the track.

Not intended for end user's use.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
combination of Lorentz vector and position

Definition at line 272 of file KFitTrack.cc.

◆ getPosition()

const HepPoint3D getPosition ( const int  flag = KFitConst::kAfterFit) const

Get a position of the track.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
position of the track

Definition at line 164 of file KFitTrack.cc.

◆ setCharge()

void setCharge ( const double  q)

Set a charge of the track.

Parameters
qcharge of the track

Definition at line 134 of file KFitTrack.cc.

◆ setError()

void setError ( const CLHEP::HepSymMatrix &  e,
const int  flag = KFitConst::kBeforeFit 
)

Set an error matrix of the track.

Parameters
eerror matrix of the track
flagKFitConst::kBeforeFit or KFitConst::kAfterFit

Definition at line 121 of file KFitTrack.cc.

◆ setMomentum()

void setMomentum ( const CLHEP::HepLorentzVector &  p,
const int  flag = KFitConst::kBeforeFit 
)

Set a Lorentz vector of the track.

Parameters
pLorentz vector of the track
flagKFitConst::kBeforeFit or KFitConst::kAfterFit

Definition at line 95 of file KFitTrack.cc.

◆ setPosition()

void setPosition ( const HepPoint3D x,
const int  flag = KFitConst::kBeforeFit 
)

Set a position of the track.

Parameters
xposition of the track
flagKFitConst::kBeforeFit or KFitConst::kAfterFit

Definition at line 109 of file KFitTrack.cc.

◆ setVertex()

void setVertex ( const HepPoint3D v)

Set a vertex position associated to the track.

Parameters
vvertex position associated to the track

Definition at line 141 of file KFitTrack.cc.

◆ setVertexError()

void setVertexError ( const CLHEP::HepSymMatrix &  ve)

Set a vertex error matrix associated to the track.

Parameters
vevertex error matrix associated to the track

Definition at line 148 of file KFitTrack.cc.


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