Belle II Software development
MassPointingVertexFitKFit.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <analysis/VertexFitting/KFit/KFitConst.h>
12#include <analysis/VertexFitting/KFit/KFitError.h>
13#include <analysis/VertexFitting/KFit/KFitBase.h>
14
15namespace Belle2 {
21 namespace analysis {
22
31 public:
36
37
38 public:
48 enum KFitError::ECode setInvariantMass(const double m);
58 enum KFitError::ECode fixMass(void);
63 enum KFitError::ECode unfixMass(void);
64 enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix& m) override;
65 enum KFitError::ECode setZeroCorrelation(void) override;
66
71 const HepPoint3D getVertex(const int flag = KFitConst::kAfterFit) const;
75 const CLHEP::HepSymMatrix getVertexError(void) const;
79 double getInvariantMass(void) const;
80 double getCHIsq(void) const override;
85 const CLHEP::HepMatrix getTrackVertexError(const int id) const;
86 double getTrackCHIsq(const int id) const override;
87 const CLHEP::HepMatrix getCorrelation(const int id1, const int id2,
88 const int flag = KFitConst::kAfterFit) const override;
89
90
91 public:
95 enum KFitError::ECode doFit(void);
96
101
102
103 private:
104 enum KFitError::ECode prepareInputMatrix(void) override;
105 enum KFitError::ECode prepareInputSubMatrix(void) override;
106 enum KFitError::ECode prepareCorrelation(void) override;
107 enum KFitError::ECode prepareOutputMatrix(void) override;
108 enum KFitError::ECode makeCoreMatrix(void) override;
109 enum KFitError::ECode calculateNDF(void) override;
110
111
112 private:
118 CLHEP::HepSymMatrix m_AfterVertexError;
120 std::vector<CLHEP::HepMatrix> m_AfterTrackVertexError;
126 std::vector<int> m_IsFixMass;
127 };
128
129 } // namespace analysis
130
132} // namespace Belle2
Class to store reconstructed particles.
Definition: Particle.h:75
KFitBase is a base class for kinematical fitters.
Definition: KFitBase.h:37
ECode
ECode is a error code enumerate.
Definition: KFitError.h:34
MassPointingVertexFitKFit is a derived class from KFitBase It performs a kinematical fit with three c...
enum KFitError::ECode setZeroCorrelation(void) override
Indicate no correlation between tracks.
enum KFitError::ECode prepareInputMatrix(void) override
Build grand matrices for minimum search from input-track properties.
enum KFitError::ECode calculateNDF(void) override
Calculate an NDF of the fit.
enum KFitError::ECode setInitialVertex(const HepPoint3D &v)
Set an initial vertex point for the mass-vertex-pointing constraint fit.
double getCHIsq(void) const override
Get a chi-square of the fit.
std::vector< int > m_IsFixMass
Array of flags whether the track property is fixed at the mass.
enum KFitError::ECode updateMother(Particle *mother)
Update mother particle.
const CLHEP::HepSymMatrix getVertexError(void) const
Get a fitted vertex error matrix.
enum KFitError::ECode unfixMass(void)
Tell the object to unfix the last added track property at the invariant mass.
enum KFitError::ECode prepareInputSubMatrix(void) override
Build sub-matrices for minimum search from input-track properties.
~MassPointingVertexFitKFit(void)
Destruct the object.
HepPoint3D m_ProductionVertex
Production vertex position.
enum KFitError::ECode doFit(void)
Perform a mass-vertex-pointing constraint fit.
enum KFitError::ECode setInvariantMass(const double m)
Set an invariant mass for the mass-vertex-pointing constraint fit.
enum KFitError::ECode makeCoreMatrix(void) override
Build matrices using the kinematical constraint.
enum KFitError::ECode prepareCorrelation(void) override
Build a grand correlation matrix from input-track properties.
HepPoint3D m_AfterVertex
Vertex position after the fit.
enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix &m) override
Set a correlation matrix.
std::vector< CLHEP::HepMatrix > m_AfterTrackVertexError
array of vertex error matrices after the fit.
const CLHEP::HepMatrix getCorrelation(const int id1, const int id2, const int flag=KFitConst::kAfterFit) const override
Get a correlation matrix between two tracks.
double getTrackCHIsq(const int id) const override
Get a chi-square of the track.
enum KFitError::ECode setProductionVertex(const HepPoint3D &v)
Set the production vertex of the particle.
const HepPoint3D getVertex(const int flag=KFitConst::kAfterFit) const
Get a vertex position.
CLHEP::HepSymMatrix m_AfterVertexError
Vertex error matrix after the fit.
enum KFitError::ECode prepareOutputMatrix(void) override
Build an output error matrix.
MassPointingVertexFitKFit(void)
Construct an object with no argument.
const CLHEP::HepMatrix getTrackVertexError(const int id) const
Get a vertex error matrix of the track.
HepPoint3D m_BeforeVertex
Vertex position before the fit.
enum KFitError::ECode fixMass(void)
Tell the object to fix the last added track property at the invariant mass.
double getInvariantMass(void) const
Get an invariant mass.
Abstract base class for different kinds of events.
static const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.
Definition: KFitConst.h:37