Belle II Software development
|
MassVertexFitKFit is a derived class from KFitBase to perform mass-vertex-constraint kinematical fit. More...
#include <MassVertexFitKFit.h>
Public Member Functions | |
MassVertexFitKFit (void) | |
Construct an object with no argument. | |
~MassVertexFitKFit (void) | |
Destruct the object. | |
enum KFitError::ECode | setInitialVertex (const HepPoint3D &v) |
Set an initial vertex point for the mass-vertex constraint fit. | |
enum KFitError::ECode | setInitialVertex (const B2Vector3D &v) |
Set an initial vertex point for the mass-vertex constraint fit. | |
enum KFitError::ECode | setInvariantMass (const double m) |
Set an invariant mass for the mass-vertex constraint fit. | |
enum KFitError::ECode | fixMass (void) |
Tell the object to fix the last added track property at the invariant mass. | |
enum KFitError::ECode | unfixMass (void) |
Tell the object to unfix the last added track property at the invariant mass. | |
enum KFitError::ECode | setCorrelation (const CLHEP::HepMatrix &m) override |
Set a correlation matrix. | |
enum KFitError::ECode | setZeroCorrelation (void) override |
Indicate no correlation between tracks. | |
const HepPoint3D | getVertex (const int flag=KFitConst::kAfterFit) const |
Get a vertex position. | |
const CLHEP::HepSymMatrix | getVertexError (void) const |
Get a fitted vertex error matrix. | |
double | getInvariantMass (void) const |
Get an invariant mass. | |
double | getCHIsq (void) const override |
Get a chi-square of the fit. | |
const CLHEP::HepMatrix | getTrackVertexError (const int id) const |
Get a vertex error matrix of the track. | |
double | getTrackCHIsq (const int id) const override |
Get a chi-square of the track. | |
const CLHEP::HepMatrix | getCorrelation (const int id1, const int id2, const int flag=KFitConst::kAfterFit) const override |
Get a correlation matrix between two tracks. | |
enum KFitError::ECode | doFit (void) |
Perform a mass-vertex-constraint fit. | |
enum KFitError::ECode | updateMother (Particle *mother) |
Update mother particle. | |
enum KFitError::ECode | addTrack (const KFitTrack &kp) |
Add a track to the fitter object. | |
enum KFitError::ECode | addTrack (const CLHEP::HepLorentzVector &p, const HepPoint3D &x, const CLHEP::HepSymMatrix &e, const double q) |
Add a track to the fitter object with specifying its momentum, position, error matrix, and charge. | |
enum KFitError::ECode | addParticle (const Particle *particle) |
Add a particle to the fitter. | |
enum KFitError::ECode | setMagneticField (const double mf) |
Change a magnetic field from the default value KFitConst::kDefaultMagneticField. | |
enum KFitError::ECode | getErrorCode (void) const |
Get a code of the last error. | |
int | getTrackCount (void) const |
Get the number of added tracks. | |
virtual int | getNDF (void) const |
Get an NDF of the fit. | |
double | getMagneticField (void) const |
Get a magnetic field. | |
const CLHEP::HepLorentzVector | getTrackMomentum (const int id) const |
Get a Lorentz vector of the track. | |
const HepPoint3D | getTrackPosition (const int id) const |
Get a position of the track. | |
const CLHEP::HepSymMatrix | getTrackError (const int id) const |
Get an error matrix of the track. | |
const KFitTrack | getTrack (const int id) const |
Get a specified track object. | |
bool | isFitted (void) const |
Return false if fit is not performed yet or performed fit is failed; otherwise true. | |
Protected Member Functions | |
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. | |
const CLHEP::HepMatrix | makeError1 (const CLHEP::HepLorentzVector &p1, const CLHEP::HepLorentzVector &p2, const CLHEP::HepMatrix &e) const |
Rebuild an error matrix from a pair of Lorentz vectors and an error matrix. | |
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. | |
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::HepMatrix | makeError3 (const CLHEP::HepLorentzVector &p1, const CLHEP::HepLorentzVector &p2, const CLHEP::HepMatrix &e, const bool is_fix_mass1, const bool is_fix_mass2) const |
Rebuild an error matrix from a pair of Lorentz vectors and an error matrix. | |
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. | |
enum KFitError::ECode | doFit1 (void) |
Perform a fit (used in MassFitKFit::doFit()). | |
enum KFitError::ECode | doFit2 (void) |
Perform a fit (used in VertexFitKFit::doFit() and MassVertexFitKFit::doFit()). | |
bool | isTrackIDInRange (const int id) const |
Check if the id is in the range. | |
bool | isNonZeroEnergy (const CLHEP::HepLorentzVector &p) const |
Check if the energy is non-zero. | |
Protected Attributes | |
enum KFitError::ECode | m_ErrorCode |
Error code. | |
bool | m_FlagFitted |
Flag to indicate if the fit is performed and succeeded. | |
std::vector< KFitTrack > | m_Tracks |
Container of input tracks. | |
std::vector< CLHEP::HepMatrix > | m_BeforeCorrelation |
Container of input correlation matrices. | |
CLHEP::HepSymMatrix | m_V_al_0 |
See J.Tanaka Ph.D (2001) p137 for definition. | |
CLHEP::HepMatrix | m_al_0 |
See J.Tanaka Ph.D (2001) p136 for definition. | |
CLHEP::HepMatrix | m_al_1 |
See J.Tanaka Ph.D (2001) p136 for definition. | |
CLHEP::HepMatrix | m_al_a |
See J.Tanaka Ph.D (2001) p137 for definition. | |
CLHEP::HepMatrix | m_property |
Container of charges and masses. | |
CLHEP::HepMatrix | m_D |
See J.Tanaka Ph.D (2001) p137 for definition. | |
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. | |
CLHEP::HepMatrix | m_V_al_1 |
See J.Tanaka Ph.D (2001) p138 for definition. | |
CLHEP::HepMatrix | m_lam |
See J.Tanaka Ph.D (2001) p137 for definition. | |
CLHEP::HepMatrix | m_E |
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_lam0 |
See J.Tanaka Ph.D (2001) p138 for definition. | |
CLHEP::HepMatrix | m_v |
See J.Tanaka Ph.D (2001) p137 for definition. | |
CLHEP::HepMatrix | m_v_a |
See J.Tanaka Ph.D (2001) p137 for definition. | |
CLHEP::HepMatrix | m_V_Dt |
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. | |
int | m_NDF |
NDF of the fit. | |
double | m_CHIsq |
chi-square of the fit. | |
int | m_TrackCount |
Number of tracks. | |
int | m_NecessaryTrackCount |
Number needed tracks to perform fit. | |
bool | m_FlagCorrelation |
Flag whether a correlation among tracks exists. | |
bool | m_FlagOverIteration |
Flag whether the iteration count exceeds the limit. | |
double | m_MagneticField |
Magnetic field. | |
Private Member Functions | |
enum KFitError::ECode | prepareInputMatrix (void) override |
Build grand matrices for minimum search from input-track properties. | |
enum KFitError::ECode | prepareInputSubMatrix (void) override |
Build sub-matrices for minimum search from input-track properties. | |
enum KFitError::ECode | prepareCorrelation (void) override |
Build a grand correlation matrix from input-track properties. | |
enum KFitError::ECode | prepareOutputMatrix (void) override |
Build an output error matrix. | |
enum KFitError::ECode | makeCoreMatrix (void) override |
Build matrices using the kinematical constraint. | |
enum KFitError::ECode | calculateNDF (void) override |
Calculate an NDF of the fit. | |
Private Attributes | |
HepPoint3D | m_BeforeVertex |
Vertex position before the fit. | |
HepPoint3D | m_AfterVertex |
Vertex position after the fit. | |
CLHEP::HepSymMatrix | m_AfterVertexError |
Vertex error matrix after the fit. | |
std::vector< CLHEP::HepMatrix > | m_AfterTrackVertexError |
array of vertex error matrices after the fit. | |
double | m_InvariantMass |
Invariant mass. | |
std::vector< int > | m_IsFixMass |
Array of flags whether the track property is fixed at the mass. | |
MassVertexFitKFit is a derived class from KFitBase to perform mass-vertex-constraint kinematical fit.
Definition at line 34 of file MassVertexFitKFit.h.
MassVertexFitKFit | ( | void | ) |
Construct an object with no argument.
Definition at line 22 of file MassVertexFitKFit.cc.
|
inherited |
Add a particle to the fitter.
The function gets track parameters from the Particle dataobject and calls addTrack().
[in] | particle | Particle. |
Definition at line 59 of file KFitBase.cc.
|
inherited |
Add a track to the fitter object with specifying its momentum, position, error matrix, and charge.
This function internally calls addTrack(const KFitTrack &kp).
p | Lorentz vector of the track |
x | position of the track |
e | (7x7) error matrix of the track |
q | charge of the track |
Definition at line 47 of file KFitBase.cc.
|
inherited |
Add a track to the fitter object.
kp | object of the track |
Definition at line 38 of file KFitBase.cc.
|
overrideprivatevirtual |
Calculate an NDF of the fit.
Implements KFitBase.
Definition at line 560 of file MassVertexFitKFit.cc.
enum KFitError::ECode doFit | ( | void | ) |
Perform a mass-vertex-constraint fit.
Definition at line 200 of file MassVertexFitKFit.cc.
|
protectedinherited |
Perform a fit (used in MassFitKFit::doFit()).
Definition at line 502 of file KFitBase.cc.
|
protectedinherited |
Perform a fit (used in VertexFitKFit::doFit() and MassVertexFitKFit::doFit()).
Definition at line 578 of file KFitBase.cc.
enum KFitError::ECode fixMass | ( | void | ) |
Tell the object to fix the last added track property at the invariant mass.
Not intended for end user's use.
Definition at line 61 of file MassVertexFitKFit.cc.
|
overridevirtual |
Get a chi-square of the fit.
Reimplemented from KFitBase.
Definition at line 122 of file MassVertexFitKFit.cc.
|
overridevirtual |
Get a correlation matrix between two tracks.
id1 | first track id |
id2 | second track id |
flag | KFitConst::kBeforeFit or KFitConst::kAfterFit |
Reimplemented from KFitBase.
Definition at line 173 of file MassVertexFitKFit.cc.
|
inherited |
Get a code of the last error.
Definition at line 101 of file KFitBase.cc.
double getInvariantMass | ( | void | ) | const |
|
inherited |
Get a magnetic field.
Definition at line 128 of file KFitBase.cc.
|
virtualinherited |
|
inherited |
Get a specified track object.
id | track id |
Definition at line 175 of file KFitBase.cc.
|
overridevirtual |
Get a chi-square of the track.
id | track id |
Reimplemented from KFitBase.
Definition at line 138 of file MassVertexFitKFit.cc.
|
inherited |
Get the number of added tracks.
Definition at line 107 of file KFitBase.cc.
|
inherited |
Get an error matrix of the track.
id | track id |
Definition at line 168 of file KFitBase.cc.
|
inherited |
Get a Lorentz vector of the track.
id | track id |
Definition at line 154 of file KFitBase.cc.
|
inherited |
Get a position of the track.
id | track id |
Definition at line 161 of file KFitBase.cc.
const HepMatrix getTrackVertexError | ( | const int | id | ) | const |
Get a vertex error matrix of the track.
id | track id |
Definition at line 129 of file MassVertexFitKFit.cc.
const HepPoint3D getVertex | ( | const int | flag = KFitConst::kAfterFit | ) | const |
Get a vertex position.
flag | KFitConst::kBeforeFit or KFitConst::kAfterFit |
Definition at line 89 of file MassVertexFitKFit.cc.
const HepSymMatrix getVertexError | ( | void | ) | const |
Get a fitted vertex error matrix.
Definition at line 108 of file MassVertexFitKFit.cc.
|
inherited |
Return false if fit is not performed yet or performed fit is failed; otherwise true.
Definition at line 728 of file KFitBase.cc.
|
protectedinherited |
Check if the energy is non-zero.
p | Lorentz vector |
Definition at line 750 of file KFitBase.cc.
|
protectedinherited |
Check if the id is in the range.
id | track id |
Definition at line 739 of file KFitBase.cc.
|
overrideprivatevirtual |
Build matrices using the kinematical constraint.
Implements KFitBase.
Definition at line 388 of file MassVertexFitKFit.cc.
|
protectedinherited |
Rebuild an error matrix from a Lorentz vector and an error matrix.
p | Lorentz vector |
e | (6x6) error matrix |
Definition at line 221 of file KFitBase.cc.
|
protectedinherited |
Rebuild an error matrix from a pair of Lorentz vectors and an error matrix.
p1 | first Lorentz vector |
p2 | second Lorentz vector |
e | (6x6) error matrix |
Definition at line 255 of file KFitBase.cc.
|
protectedinherited |
Rebuild an error matrix from a Lorentz vector and an error matrix.
p | Lorentz vector |
e | (3x6) error matrix |
Definition at line 296 of file KFitBase.cc.
|
protectedinherited |
Rebuild an error matrix from a Lorentz vector and an error matrix.
p | Lorentz vector |
e | (7x7) error matrix |
is_fix_mass | true to recalculate energy term from other parameters, false to do nothing |
Definition at line 320 of file KFitBase.cc.
|
protectedinherited |
Rebuild an error matrix from a pair of Lorentz vectors and an error matrix.
p1 | first Lorentz vector |
p2 | second Lorentz vector |
e | (7x7) error matrix |
is_fix_mass1 | true to recalculate energy term from other parameters, false to do nothing |
is_fix_mass2 | true to recalculate energy term from other parameters, false to do nothing |
Definition at line 361 of file KFitBase.cc.
|
protectedinherited |
Rebuild an error matrix from a Lorentz vector and an error matrix.
p | Lorentz vector |
e | (3x7) error matrix |
Definition at line 439 of file KFitBase.cc.
|
overrideprivatevirtual |
Build a grand correlation matrix from input-track properties.
Reimplemented from KFitBase.
Definition at line 295 of file MassVertexFitKFit.cc.
|
overrideprivatevirtual |
Build grand matrices for minimum search from input-track properties.
Implements KFitBase.
Definition at line 206 of file MassVertexFitKFit.cc.
|
overrideprivatevirtual |
Build sub-matrices for minimum search from input-track properties.
Implements KFitBase.
Definition at line 286 of file MassVertexFitKFit.cc.
|
overrideprivatevirtual |
Build an output error matrix.
Implements KFitBase.
Definition at line 330 of file MassVertexFitKFit.cc.
|
overridevirtual |
Set a correlation matrix.
Not intended for end user's use.
c | (7x7) correlation matrix |
Reimplemented from KFitBase.
Definition at line 77 of file MassVertexFitKFit.cc.
enum KFitError::ECode setInitialVertex | ( | const B2Vector3D & | v | ) |
Set an initial vertex point for the mass-vertex constraint fit.
v | initial vertex point |
Definition at line 45 of file MassVertexFitKFit.cc.
enum KFitError::ECode setInitialVertex | ( | const HepPoint3D & | v | ) |
Set an initial vertex point for the mass-vertex constraint fit.
v | initial vertex point |
Definition at line 39 of file MassVertexFitKFit.cc.
enum KFitError::ECode setInvariantMass | ( | const double | m | ) |
Set an invariant mass for the mass-vertex constraint fit.
m | invariant mass |
Definition at line 53 of file MassVertexFitKFit.cc.
|
inherited |
Change a magnetic field from the default value KFitConst::kDefaultMagneticField.
mf | magnetic field to set |
Definition at line 93 of file KFitBase.cc.
|
overridevirtual |
Indicate no correlation between tracks.
Not intended for end user's use.
Reimplemented from KFitBase.
Definition at line 83 of file MassVertexFitKFit.cc.
enum KFitError::ECode unfixMass | ( | void | ) |
Tell the object to unfix the last added track property at the invariant mass.
Not intended for end user's use.
Definition at line 69 of file MassVertexFitKFit.cc.
enum KFitError::ECode updateMother | ( | Particle * | mother | ) |
Update mother particle.
[in] | mother | Mother particle. |
Definition at line 566 of file MassVertexFitKFit.cc.
|
private |
array of vertex error matrices after the fit.
Definition at line 126 of file MassVertexFitKFit.h.
|
private |
Vertex position after the fit.
Definition at line 122 of file MassVertexFitKFit.h.
|
private |
Vertex error matrix after the fit.
Definition at line 124 of file MassVertexFitKFit.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p136 for definition.
Definition at line 257 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p136 for definition.
Definition at line 259 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 261 of file KFitBase.h.
|
protectedinherited |
Container of input correlation matrices.
Definition at line 251 of file KFitBase.h.
|
private |
Vertex position before the fit.
Definition at line 119 of file MassVertexFitKFit.h.
|
protectedinherited |
chi-square of the fit.
Definition at line 297 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 291 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 266 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 268 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 279 of file KFitBase.h.
|
protectedinherited |
Error code.
Definition at line 243 of file KFitBase.h.
|
protectedinherited |
Flag whether a correlation among tracks exists.
Definition at line 306 of file KFitBase.h.
|
protectedinherited |
Flag to indicate if the fit is performed and succeeded.
Definition at line 245 of file KFitBase.h.
|
protectedinherited |
Flag whether the iteration count exceeds the limit.
Definition at line 308 of file KFitBase.h.
|
private |
Invariant mass.
Definition at line 129 of file MassVertexFitKFit.h.
|
private |
Array of flags whether the track property is fixed at the mass.
Definition at line 131 of file MassVertexFitKFit.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 276 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p138 for definition.
Definition at line 283 of file KFitBase.h.
|
protectedinherited |
Magnetic field.
Definition at line 311 of file KFitBase.h.
|
protectedinherited |
NDF of the fit.
Definition at line 295 of file KFitBase.h.
|
protectedinherited |
Number needed tracks to perform fit.
Definition at line 303 of file KFitBase.h.
|
protectedinherited |
Container of charges and masses.
Definition at line 263 of file KFitBase.h.
|
protectedinherited |
Number of tracks.
Definition at line 301 of file KFitBase.h.
|
protectedinherited |
Container of input tracks.
Definition at line 249 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 285 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 287 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p137 for definition.
Definition at line 255 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p138 for definition.
Definition at line 274 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p138 for definition.
Definition at line 271 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p138 for definition.
Definition at line 289 of file KFitBase.h.
|
protectedinherited |
See J.Tanaka Ph.D (2001) p138 for definition.
Definition at line 281 of file KFitBase.h.