14#include <CLHEP/Matrix/Matrix.h>
15#include <CLHEP/Matrix/SymMatrix.h>
16#include <CLHEP/Vector/LorentzVector.h>
17#include <CLHEP/Geometry/Point3D.h>
19#include <analysis/dataobjects/Particle.h>
20#include <analysis/VertexFitting/KFit/KFitConst.h>
21#include <analysis/VertexFitting/KFit/KFitError.h>
22#include <analysis/VertexFitting/KFit/KFitTrack.h>
24#ifndef ENABLE_BACKWARDS_COMPATIBILITY
95 virtual int getNDF(
void)
const;
135 virtual const CLHEP::HepMatrix
getCorrelation(
const int id1,
const int id2,
152 const CLHEP::HepSymMatrix
makeError1(
const CLHEP::HepLorentzVector& p,
const CLHEP::HepMatrix& e)
const;
159 const CLHEP::HepMatrix
makeError1(
const CLHEP::HepLorentzVector& p1,
const CLHEP::HepLorentzVector& p2,
160 const CLHEP::HepMatrix& e)
const;
166 const CLHEP::HepMatrix
makeError2(
const CLHEP::HepLorentzVector& p,
const CLHEP::HepMatrix& e)
const;
173 const CLHEP::HepSymMatrix
makeError3(
const CLHEP::HepLorentzVector& p,
const CLHEP::HepMatrix& e,
const bool is_fix_mass)
const;
182 const CLHEP::HepMatrix
makeError3(
const CLHEP::HepLorentzVector& p1,
const CLHEP::HepLorentzVector& p2,
183 const CLHEP::HepMatrix& e,
const bool is_fix_mass1,
const bool is_fix_mass2)
const;
189 const CLHEP::HepMatrix
makeError4(
const CLHEP::HepLorentzVector& p,
const CLHEP::HepMatrix& e)
const;
Class to store reconstructed particles.
KFitBase is a base class for kinematical fitters.
KFitBase(void)
Construct an object with no argument.
int m_NecessaryTrackCount
Number needed tracks to perform fit.
virtual enum KFitError::ECode prepareInputMatrix(void)=0
Build grand matrices for minimum search from input-track properties.
enum KFitError::ECode addTrack(const KFitTrack &kp)
Add a track to the fitter object.
virtual enum KFitError::ECode prepareOutputMatrix(void)=0
Build an output error matrix.
double m_MagneticField
Magnetic field.
const CLHEP::HepSymMatrix makeError1(const CLHEP::HepLorentzVector &p, const CLHEP::HepMatrix &e) const
Rebuild an error matrix from a Lorentz vector and an error matrix.
bool isNonZeroEnergy(const CLHEP::HepLorentzVector &p) const
Check if the energy is non-zero.
CLHEP::HepMatrix m_al_1
See J.Tanaka Ph.D (2001) p136 for definition.
CLHEP::HepMatrix m_V_Dt
See J.Tanaka Ph.D (2001) p138 for definition.
virtual enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix &c)
Set a correlation matrix.
const CLHEP::HepSymMatrix makeError3(const CLHEP::HepLorentzVector &p, const CLHEP::HepMatrix &e, const bool is_fix_mass) const
Rebuild an error matrix from a Lorentz vector and an error matrix.
const CLHEP::HepSymMatrix getTrackError(const int id) const
Get an error matrix of the track.
virtual double getCHIsq(void) const
Get a chi-square of the fit.
const CLHEP::HepLorentzVector getTrackMomentum(const int id) const
Get a Lorentz vector of the track.
CLHEP::HepMatrix m_lam
See J.Tanaka Ph.D (2001) p137 for definition.
double getMagneticField(void) const
Get a magnetic field.
enum KFitError::ECode doFit2(void)
Perform a fit (used in VertexFitKFit::doFit() and MassVertexFitKFit::doFit()).
CLHEP::HepMatrix m_E
See J.Tanaka Ph.D (2001) p137 for definition.
const HepPoint3D getTrackPosition(const int id) const
Get a position of the track.
bool m_FlagOverIteration
Flag whether the iteration count exceeds the limit.
CLHEP::HepMatrix m_property
Container of charges and masses.
virtual double getTrackCHIsq(const int id) const
Get a chi-square of the track.
enum KFitError::ECode m_ErrorCode
Error code.
virtual enum KFitError::ECode prepareInputSubMatrix(void)=0
Build sub-matrices for minimum search from input-track properties.
virtual enum KFitError::ECode setZeroCorrelation(void)
Indicate no correlation between tracks.
CLHEP::HepMatrix m_V_al_1
See J.Tanaka Ph.D (2001) p138 for definition.
virtual int getNDF(void) const
Get an NDF of the fit.
CLHEP::HepMatrix m_d
See J.Tanaka Ph.D (2001) p137 for definition.
CLHEP::HepMatrix m_lam0
See J.Tanaka Ph.D (2001) p138 for definition.
virtual ~KFitBase(void)
Destruct the object.
bool isFitted(void) const
Return false if fit is not performed yet or performed fit is failed; otherwise true.
CLHEP::HepMatrix m_al_a
See J.Tanaka Ph.D (2001) p137 for definition.
enum KFitError::ECode setMagneticField(const double mf)
Change a magnetic field from the default value KFitConst::kDefaultMagneticField.
CLHEP::HepMatrix m_D
See J.Tanaka Ph.D (2001) p137 for definition.
CLHEP::HepMatrix m_V_D
See J.Tanaka Ph.D (2001) p138 for definition.
bool isTrackIDInRange(const int id) const
Check if the id is in the range.
CLHEP::HepMatrix m_v_a
See J.Tanaka Ph.D (2001) p137 for definition.
virtual const CLHEP::HepMatrix getCorrelation(const int id1, const int id2, const int flag=KFitConst::kAfterFit) const
Get a correlation matrix between two tracks.
bool m_FlagCorrelation
Flag whether a correlation among tracks exists.
CLHEP::HepSymMatrix m_V_al_0
See J.Tanaka Ph.D (2001) p137 for definition.
CLHEP::HepMatrix m_V_E
See J.Tanaka Ph.D (2001) p138 for definition.
CLHEP::HepMatrix m_Cov_v_al_1
See J.Tanaka Ph.D (2001) p137 for definition.
const KFitTrack getTrack(const int id) const
Get a specified track object.
virtual enum KFitError::ECode prepareCorrelation(void)
Build a grand correlation matrix from input-track properties.
virtual enum KFitError::ECode makeCoreMatrix(void)=0
Build matrices using the kinematical constraint.
const CLHEP::HepMatrix makeError2(const CLHEP::HepLorentzVector &p, const CLHEP::HepMatrix &e) const
Rebuild an error matrix from a Lorentz vector and an error matrix.
enum KFitError::ECode addParticle(const Particle *particle)
Add a particle to the fitter.
std::vector< CLHEP::HepMatrix > m_BeforeCorrelation
Container of input correlation matrices.
bool m_FlagFitted
Flag to indicate if the fit is performed and succeeded.
double m_CHIsq
chi-square of the fit.
int getTrackCount(void) const
Get the number of added tracks.
std::vector< KFitTrack > m_Tracks
Container of input tracks.
CLHEP::HepMatrix m_v
See J.Tanaka Ph.D (2001) p137 for definition.
virtual enum KFitError::ECode calculateNDF(void)=0
Calculate an NDF of the fit.
const CLHEP::HepMatrix makeError4(const CLHEP::HepLorentzVector &p, const CLHEP::HepMatrix &e) const
Rebuild an error matrix from a Lorentz vector and an error matrix.
int m_TrackCount
Number of tracks.
CLHEP::HepMatrix m_al_0
See J.Tanaka Ph.D (2001) p136 for definition.
enum KFitError::ECode doFit1(void)
Perform a fit (used in MassFitKFit::doFit()).
enum KFitError::ECode getErrorCode(void) const
Get a code of the last error.
ECode
ECode is a error code enumerate.
KFitTrack is a container of the track information (Lorentz vector, position, and error matrix),...
Abstract base class for different kinds of events.
static const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.