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

MakeMotherKFit is a class to build mother particle from kinematically fitted daughters. More...

#include <MakeMotherKFit.h>

Collaboration diagram for MakeMotherKFit:

Public Member Functions

 MakeMotherKFit (void)
 Construct an object with no argument.
 
 ~MakeMotherKFit (void)
 Destruct the object.
 
enum KFitError::ECode addTrack (const KFitTrack &kp)
 Add a track to the make-mother object. More...
 
enum KFitError::ECode addTrack (const CLHEP::HepLorentzVector &p, const HepPoint3D &x, const CLHEP::HepSymMatrix &e, const double q, const int flag=KFitConst::kAfterFit)
 Add a track to the make-mother object with specifying its momentum, position, error matrix, and charge. More...
 
enum KFitError::ECode setMagneticField (const double mf)
 Change a magnetic field from the default value KFitConst::kDefaultMagneticField. More...
 
enum KFitError::ECode setVertex (const HepPoint3D &v)
 Set a vertex position of the mother particle. More...
 
enum KFitError::ECode setVertexError (const CLHEP::HepSymMatrix &e)
 Set a vertex error matrix of the mother particle. More...
 
enum KFitError::ECode setTrackVertexError (const CLHEP::HepMatrix &e)
 Set a vertex error matrix of the child particle in the addTrack'ed order. More...
 
enum KFitError::ECode setTrackZeroVertexError (void)
 Indicate no vertex uncertainty in the child particle in the addTrack'ed order. More...
 
enum KFitError::ECode setCorrelation (const CLHEP::HepMatrix &e)
 Set a correlation matrix. More...
 
enum KFitError::ECode setZeroCorrelation (void)
 Indicate no correlation between tracks. More...
 
enum KFitError::ECode setFlagAtDecayPoint (const bool flag)
 Set a flag to control computational point for the mother particle property at the decay point or not. More...
 
enum KFitError::ECode setFlagBeforeAfter (const int flag)
 Set a flag to control computational parameters for the mother particle property before or after the fit. More...
 
enum KFitError::ECode getErrorCode (void) const
 Get a code of the last error. More...
 
const KFitTrack getMother (void) const
 Get a track object of the mother particle. More...
 
const CLHEP::HepLorentzVector getMotherMomentum (void) const
 Get a Lorentz vector of the mother particle. More...
 
const HepPoint3D getMotherPosition (void) const
 Get a position of the mother particle. More...
 
const CLHEP::HepSymMatrix getMotherError (void) const
 Get an error matrix of the mother particle. More...
 
enum KFitError::ECode doMake (void)
 Perform a reconstruction of mother particle. More...
 

Private Member Functions

void calculateError (CLHEP::HepSymMatrix *Ec) const
 Make a matrix to calculate error matrix of the mother particle. More...
 
void calculateDELMDELC (CLHEP::HepMatrix *e) const
 Make delMdelC to calculate error matrix of the mother particle. More...
 

Private Attributes

enum KFitError::ECode m_ErrorCode
 Error code.
 
bool m_FlagAtDecayPoint
 Flag controlled by setFlagAtDecayPoint().
 
int m_FlagBeforeAfter
 Flag controlled by setFlagBeforeAfter().
 
bool m_FlagVertexError
 Flag to indicate if the vertex error matrix of the mother particle is preset.
 
bool m_FlagCorrelation
 Flag to indicate if the correlation matrix among the child particles is preset.
 
bool m_FlagTrackVertexError
 Flag to indicate if the vertex error matrix of the child particle is preset.
 
double m_MagneticField
 Magnetic field.
 
int m_TrackCount
 Number of tracks.
 
std::vector< KFitTrackm_Tracks
 Array of track objects of the child particles.
 
std::vector< CLHEP::HepMatrix > m_TrackVertexError
 Array of vertex error matrices of the child particles.
 
std::vector< CLHEP::HepMatrix > m_Correlation
 Array of correlation matrices among the child particles.
 
CLHEP::Hep3Vector m_Vertex
 Vertex position of the mother particle.
 
CLHEP::HepSymMatrix m_VertexError
 Vertex error matrix of the mother particle.
 
double m_Charge
 Charge of the mother particle.
 
KFitTrack m_Mother
 Track object of the mother particle.
 

Detailed Description

MakeMotherKFit is a class to build mother particle from kinematically fitted daughters.

Definition at line 40 of file MakeMotherKFit.h.

Member Function Documentation

◆ addTrack() [1/2]

enum KFitError::ECode addTrack ( const CLHEP::HepLorentzVector &  p,
const HepPoint3D x,
const CLHEP::HepSymMatrix &  e,
const double  q,
const int  flag = KFitConst::kAfterFit 
)

Add a track to the make-mother object with specifying its momentum, position, error matrix, and charge.

This function internally calls addTrack(const KFitTrack &kp).

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
Returns
error code (zero if success)

◆ addTrack() [2/2]

enum KFitError::ECode addTrack ( const KFitTrack kp)

Add a track to the make-mother object.

Parameters
kpobject of the track
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

39  {
40  m_Tracks.push_back(p);
41  m_Charge += p.getCharge();
42  m_TrackCount = m_Tracks.size();
43 
45 }
double m_Charge
Charge of the mother particle.
enum KFitError::ECode m_ErrorCode
Error code.
std::vector< KFitTrack > m_Tracks
Array of track objects of the child particles.
int m_TrackCount
Number of tracks.

◆ calculateDELMDELC()

void calculateDELMDELC ( CLHEP::HepMatrix *  e) const
private

Make delMdelC to calculate error matrix of the mother particle.

Parameters
edelMdelC container

Definition at line 305 of file MakeMotherKFit.cc.

◆ calculateError()

void calculateError ( CLHEP::HepSymMatrix *  Ec) const
private

Make a matrix to calculate error matrix of the mother particle.

Parameters
Ecerror matrix container

Definition at line 253 of file MakeMotherKFit.cc.

◆ doMake()

enum KFitError::ECode doMake ( void  )

Perform a reconstruction of mother particle.

Returns
error code (zero if success)

Definition at line 184 of file MakeMotherKFit.cc.

◆ getErrorCode()

enum KFitError::ECode getErrorCode ( void  ) const

Get a code of the last error.

Returns
error code

Definition at line 35 of file MakeMotherKFit.cc.

◆ getMother()

const KFitTrack getMother ( void  ) const

Get a track object of the mother particle.

Returns
track object of the mother particle

Definition at line 163 of file MakeMotherKFit.cc.

◆ getMotherError()

const HepSymMatrix getMotherError ( void  ) const

Get an error matrix of the mother particle.

Returns
error matrix of the mother particle

Definition at line 184 of file MakeMotherKFit.cc.

◆ getMotherMomentum()

const HepLorentzVector getMotherMomentum ( void  ) const

Get a Lorentz vector of the mother particle.

Returns
Lorentz vector of the mother particle

Definition at line 170 of file MakeMotherKFit.cc.

◆ getMotherPosition()

const HepPoint3D getMotherPosition ( void  ) const

Get a position of the mother particle.

Returns
position of the mother particle

Definition at line 177 of file MakeMotherKFit.cc.

◆ setCorrelation()

enum KFitError::ECode setCorrelation ( const CLHEP::HepMatrix &  e)

Set a correlation matrix.

Parameters
e(7x7) correlation matrix
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setFlagAtDecayPoint()

enum KFitError::ECode setFlagAtDecayPoint ( const bool  flag)

Set a flag to control computational point for the mother particle property at the decay point or not.

Parameters
flagtrue for yes, false for no
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setFlagBeforeAfter()

enum KFitError::ECode setFlagBeforeAfter ( const int  flag)

Set a flag to control computational parameters for the mother particle property before or after the fit.

Parameters
flagKFitConst::kBeforeFit or KFitConst::kAfterFit
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setMagneticField()

enum KFitError::ECode setMagneticField ( const double  mf)

Change a magnetic field from the default value KFitConst::kDefaultMagneticField.

Parameters
mfmagnetic field to set
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setTrackVertexError()

enum KFitError::ECode setTrackVertexError ( const CLHEP::HepMatrix &  e)

Set a vertex error matrix of the child particle in the addTrack'ed order.

Parameters
e(3x7) vertex error matrix
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setTrackZeroVertexError()

enum KFitError::ECode setTrackZeroVertexError ( void  )

Indicate no vertex uncertainty in the child particle in the addTrack'ed order.

Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setVertex()

enum KFitError::ECode setVertex ( const HepPoint3D v)

Set a vertex position of the mother particle.

Parameters
vvertex position
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setVertexError()

enum KFitError::ECode setVertexError ( const CLHEP::HepSymMatrix &  e)

Set a vertex error matrix of the mother particle.

Parameters
e(3x3) vertex error matrix
Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.

◆ setZeroCorrelation()

enum KFitError::ECode setZeroCorrelation ( void  )

Indicate no correlation between tracks.

Returns
error code (zero if success)

Definition at line 35 of file MakeMotherKFit.cc.


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