Belle II Software  release-08-01-10
MakeMotherKFit.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * External Contributor: J. Tanaka *
5  * *
6  * See git log for contributors and copyright holders. *
7  * This file is licensed under LGPL-3.0, see LICENSE.md. *
8  **************************************************************************/
9 
10 #pragma once
11 
12 #include <vector>
13 
14 #include <CLHEP/Matrix/Matrix.h>
15 #include <CLHEP/Matrix/SymMatrix.h>
16 #include <CLHEP/Vector/ThreeVector.h>
17 #include <CLHEP/Vector/LorentzVector.h>
18 #include <CLHEP/Geometry/Point3D.h>
19 
20 #include <analysis/VertexFitting/KFit/KFitConst.h>
21 #include <analysis/VertexFitting/KFit/KFitError.h>
22 #include <analysis/VertexFitting/KFit/KFitTrack.h>
23 
24 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
26 #endif
27 
28 
29 namespace Belle2 {
35  namespace analysis {
36 
41  public:
43  MakeMotherKFit(void);
46 
51  enum KFitError::ECode addTrack(const KFitTrack& kp);
61  enum KFitError::ECode addTrack(const CLHEP::HepLorentzVector& p, const HepPoint3D& x, const CLHEP::HepSymMatrix& e,
62  const double q, const int flag = KFitConst::kAfterFit);
67  enum KFitError::ECode setMagneticField(const double mf);
72  enum KFitError::ECode setVertex(const HepPoint3D& v);
77  enum KFitError::ECode setVertexError(const CLHEP::HepSymMatrix& e);
82  enum KFitError::ECode setTrackVertexError(const CLHEP::HepMatrix& e);
91  enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix& e);
100  enum KFitError::ECode setFlagAtDecayPoint(const bool flag);
105  enum KFitError::ECode setFlagBeforeAfter(const int flag);
106 
110  enum KFitError::ECode getErrorCode(void) const;
114  const KFitTrack getMother(void) const;
118  const CLHEP::HepLorentzVector getMotherMomentum(void) const;
122  const HepPoint3D getMotherPosition(void) const;
126  const CLHEP::HepSymMatrix getMotherError(void) const;
127 
131  enum KFitError::ECode doMake(void);
132 
133  private:
137  void calculateError(CLHEP::HepSymMatrix* Ec) const;
141  void calculateDELMDELC(CLHEP::HepMatrix* e) const;
142 
143 
144  private:
147 
158 
163 
164 
166  std::vector<KFitTrack> m_Tracks;
168  std::vector<CLHEP::HepMatrix> m_TrackVertexError;
170  std::vector<CLHEP::HepMatrix> m_Correlation;
171 
172 
174  CLHEP::Hep3Vector m_Vertex;
176  CLHEP::HepSymMatrix m_VertexError;
177 
178 
180  double m_Charge;
183  };
184 
185  } // namespace analysis
186 
188 } // namespace Belle2
ECode
ECode is a error code enumerate.
Definition: KFitError.h:34
KFitTrack is a container of the track information (Lorentz vector, position, and error matrix),...
Definition: KFitTrack.h:38
MakeMotherKFit is a class to build mother particle from kinematically fitted daughters.
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 const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.
Definition: KFitConst.h:37