Belle II Software  release-08-01-10
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 
15 namespace 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;
86  const CLHEP::HepMatrix getTrackVertexError(const int id) const;
87  double getTrackCHIsq(const int id) const override;
88  const CLHEP::HepMatrix getCorrelation(const int id1, const int id2,
89  const int flag = KFitConst::kAfterFit) const override;
90 
91 
92  public:
96  enum KFitError::ECode doFit(void);
97 
101  enum KFitError::ECode updateMother(Particle* mother);
102 
103 
104  private:
105  enum KFitError::ECode prepareInputMatrix(void) override;
106  enum KFitError::ECode prepareInputSubMatrix(void) override;
107  enum KFitError::ECode prepareCorrelation(void) override;
108  enum KFitError::ECode prepareOutputMatrix(void) override;
109  enum KFitError::ECode makeCoreMatrix(void) override;
110  enum KFitError::ECode calculateNDF(void) override;
111 
112 
113  private:
119  CLHEP::HepSymMatrix m_AfterVertexError;
121  std::vector<CLHEP::HepMatrix> m_AfterTrackVertexError;
127  std::vector<int> m_IsFixMass;
128  };
129 
130  } // namespace analysis
131 
133 } // 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