11#include <analysis/VertexFitting/KFit/MakeMotherKFit.h>
12#include <framework/gearbox/Const.h>
16using namespace Belle2::analysis;
20 m_Vertex(Hep3Vector()),
21 m_VertexError(HepSymMatrix(3, 0))
170const HepLorentzVector
219 HepSymMatrix Em(Ec.similarity(dMdC));
223 double px = 0, py = 0, pz = 0,
E = 0;
226 double a = 0, dx = 0, dy = 0;
259 for (
const auto& track :
m_Tracks) {
static const double speedOfLight
[cm/ns]
static void displayError(const char *file, const int line, const char *func, const enum ECode code)
Display a description of error and its location.
ECode
ECode is a error code enumerate.
@ kBadTrackSize
Track count too small to perform fit.
@ kBadMatrixSize
Wrong correlation matrix size.
KFitTrack is a container of the track information (Lorentz vector, position, and error matrix),...
void setCharge(const double q)
Set a charge of the track.
const CLHEP::HepLorentzVector getMomentum(const int flag=KFitConst::kAfterFit) const
Get a Lorentz vector of the track.
void setPosition(const HepPoint3D &x, const int flag=KFitConst::kBeforeFit)
Set a position of the track.
const CLHEP::HepSymMatrix getError(const int flag=KFitConst::kAfterFit) const
Get an error matrix of the track.
void setMomentum(const CLHEP::HepLorentzVector &p, const int flag=KFitConst::kBeforeFit)
Set a Lorentz vector of the track.
void setError(const CLHEP::HepSymMatrix &e, const int flag=KFitConst::kBeforeFit)
Set an error matrix of the track.
const HepPoint3D getPosition(const int flag=KFitConst::kAfterFit) const
Get a position of the track.
enum KFitError::ECode setFlagBeforeAfter(const int flag)
Set a flag to control computational parameters for the mother particle property before or after the f...
enum KFitError::ECode setVertex(const HepPoint3D &v)
Set a vertex position of the mother particle.
bool m_FlagTrackVertexError
Flag to indicate if the vertex error matrix of the child particle is preset.
double m_Charge
Charge of the mother particle.
bool m_FlagAtDecayPoint
Flag controlled by setFlagAtDecayPoint().
enum KFitError::ECode addTrack(const KFitTrack &kp)
Add a track to the make-mother object.
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.
double m_MagneticField
Magnetic field.
enum KFitError::ECode setTrackZeroVertexError(void)
Indicate no vertex uncertainty in the child particle in the addTrack'ed order.
enum KFitError::ECode doMake(void)
Perform a reconstruction of mother particle.
const CLHEP::HepSymMatrix getMotherError(void) const
Get an error matrix of the mother particle.
enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix &e)
Set a correlation matrix.
const HepPoint3D getMotherPosition(void) const
Get a position of the mother particle.
CLHEP::Hep3Vector m_Vertex
Vertex position of the mother particle.
const KFitTrack getMother(void) const
Get a track object of the mother particle.
enum KFitError::ECode m_ErrorCode
Error code.
CLHEP::HepSymMatrix m_VertexError
Vertex error matrix of the mother particle.
enum KFitError::ECode setZeroCorrelation(void)
Indicate no correlation between tracks.
KFitTrack m_Mother
Track object of the mother particle.
enum KFitError::ECode setVertexError(const CLHEP::HepSymMatrix &e)
Set a vertex error matrix of the mother particle.
enum KFitError::ECode setTrackVertexError(const CLHEP::HepMatrix &e)
Set a vertex error matrix of the child particle in the addTrack'ed order.
const CLHEP::HepLorentzVector getMotherMomentum(void) const
Get a Lorentz vector of the mother particle.
enum KFitError::ECode setMagneticField(const double mf)
Change a magnetic field from the default value KFitConst::kDefaultMagneticField.
bool m_FlagVertexError
Flag to indicate if the vertex error matrix of the mother particle is preset.
std::vector< CLHEP::HepMatrix > m_TrackVertexError
Array of vertex error matrices of the child particles.
bool m_FlagCorrelation
Flag to indicate if the correlation matrix among the child particles is preset.
~MakeMotherKFit(void)
Destruct the object.
void calculateError(CLHEP::HepSymMatrix *Ec) const
Make a matrix to calculate error matrix of the mother particle.
void calculateDELMDELC(CLHEP::HepMatrix *e) const
Make delMdelC to calculate error matrix of the mother particle.
std::vector< KFitTrack > m_Tracks
Array of track objects of the child particles.
MakeMotherKFit(void)
Construct an object with no argument.
int m_TrackCount
Number of tracks.
int m_FlagBeforeAfter
Flag controlled by setFlagBeforeAfter().
std::vector< CLHEP::HepMatrix > m_Correlation
Array of correlation matrices among the child particles.
enum KFitError::ECode getErrorCode(void) const
Get a code of the last error.
Abstract base class for different kinds of events.
static constexpr double kDefaultMagneticField
Default magnetic field when not set externally.
static const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.
static const int kBeforeFit
Input parameter to specify before-fit when setting/getting a track attribute.
static const int kNumber7
Constant 7 to check matrix size (internal use)