Belle II Software  release-05-01-25
MakeMotherKFit.h
1 /**************************************************************************
2  * Copyright(C) 1997 - J. Tanaka *
3  * *
4  * Author: J. Tanaka *
5  * Contributor: J. Tanaka and *
6  * conversion to Belle II structure by T. Higuchi *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vector>
14 
15 #include <CLHEP/Matrix/Matrix.h>
16 #include <CLHEP/Matrix/SymMatrix.h>
17 #include <CLHEP/Vector/ThreeVector.h>
18 #include <CLHEP/Vector/LorentzVector.h>
19 #include <CLHEP/Geometry/Point3D.h>
20 
21 #include <analysis/VertexFitting/KFit/KFitConst.h>
22 #include <analysis/VertexFitting/KFit/KFitError.h>
23 #include <analysis/VertexFitting/KFit/KFitTrack.h>
24 
25 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
27 #endif
28 
29 
30 namespace Belle2 {
36  namespace analysis {
37 
42  public:
44  MakeMotherKFit(void);
46  ~MakeMotherKFit(void);
47 
52  enum KFitError::ECode addTrack(const KFitTrack& kp);
62  enum KFitError::ECode addTrack(const CLHEP::HepLorentzVector& p, const HepPoint3D& x, const CLHEP::HepSymMatrix& e,
63  const double q, const int flag = KFitConst::kAfterFit);
68  enum KFitError::ECode setMagneticField(const double mf);
73  enum KFitError::ECode setVertex(const HepPoint3D& v);
78  enum KFitError::ECode setVertexError(const CLHEP::HepSymMatrix& e);
83  enum KFitError::ECode setTrackVertexError(const CLHEP::HepMatrix& e);
92  enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix& e);
101  enum KFitError::ECode setFlagAtDecayPoint(const bool flag);
106  enum KFitError::ECode setFlagBeforeAfter(const int flag);
107 
111  enum KFitError::ECode getErrorCode(void) const;
115  const KFitTrack getMother(void) const;
119  const CLHEP::HepLorentzVector getMotherMomentum(void) const;
123  const HepPoint3D getMotherPosition(void) const;
127  const CLHEP::HepSymMatrix getMotherError(void) const;
128 
132  enum KFitError::ECode doMake(void);
133 
134  private:
138  void calculateError(CLHEP::HepSymMatrix* Ec) const;
142  void calculateDELMDELC(CLHEP::HepMatrix* e) const;
143 
144 
145  private:
148 
159 
164 
165 
167  std::vector<KFitTrack> m_Tracks;
169  std::vector<CLHEP::HepMatrix> m_TrackVertexError;
171  std::vector<CLHEP::HepMatrix> m_Correlation;
172 
173 
175  CLHEP::Hep3Vector m_Vertex;
177  CLHEP::HepSymMatrix m_VertexError;
178 
179 
181  double m_Charge;
184  };
185 
186  } // namespace analysis
187 
189 } // namespace Belle2
Belle2::analysis::MakeMotherKFit::m_FlagAtDecayPoint
bool m_FlagAtDecayPoint
Flag controlled by setFlagAtDecayPoint().
Definition: MakeMotherKFit.h:150
Belle2::analysis::MakeMotherKFit::getMother
const KFitTrack getMother(void) const
Get a track object of the mother particle.
Definition: MakeMotherKFit.cc:164
Belle2::analysis::MakeMotherKFit::setTrackZeroVertexError
enum KFitError::ECode setTrackZeroVertexError(void)
Indicate no vertex uncertainty in the child particle in the addTrack'ed order.
Definition: MakeMotherKFit.cc:111
Belle2::analysis::MakeMotherKFit::m_FlagTrackVertexError
bool m_FlagTrackVertexError
Flag to indicate if the vertex error matrix of the child particle is preset.
Definition: MakeMotherKFit.h:158
Belle2::analysis::MakeMotherKFit::m_Tracks
std::vector< KFitTrack > m_Tracks
Array of track objects of the child particles.
Definition: MakeMotherKFit.h:167
Belle2::analysis::MakeMotherKFit::m_Vertex
CLHEP::Hep3Vector m_Vertex
Vertex position of the mother particle.
Definition: MakeMotherKFit.h:175
Belle2::analysis::MakeMotherKFit::m_FlagCorrelation
bool m_FlagCorrelation
Flag to indicate if the correlation matrix among the child particles is preset.
Definition: MakeMotherKFit.h:156
Belle2::analysis::MakeMotherKFit::setTrackVertexError
enum KFitError::ECode setTrackVertexError(const CLHEP::HepMatrix &e)
Set a vertex error matrix of the child particle in the addTrack'ed order.
Definition: MakeMotherKFit.cc:95
Belle2::analysis::MakeMotherKFit::setVertex
enum KFitError::ECode setVertex(const HepPoint3D &v)
Set a vertex position of the mother particle.
Definition: MakeMotherKFit.cc:71
Belle2::analysis::MakeMotherKFit::MakeMotherKFit
MakeMotherKFit(void)
Construct an object with no argument.
Definition: MakeMotherKFit.cc:20
Belle2::analysis::MakeMotherKFit::m_Mother
KFitTrack m_Mother
Track object of the mother particle.
Definition: MakeMotherKFit.h:183
Belle2::analysis::MakeMotherKFit::m_MagneticField
double m_MagneticField
Magnetic field.
Definition: MakeMotherKFit.h:161
Belle2::analysis::MakeMotherKFit::getErrorCode
enum KFitError::ECode getErrorCode(void) const
Get a code of the last error.
Definition: MakeMotherKFit.cc:159
Belle2::analysis::MakeMotherKFit::getMotherError
const CLHEP::HepSymMatrix getMotherError(void) const
Get an error matrix of the mother particle.
Definition: MakeMotherKFit.cc:185
Belle2::analysis::MakeMotherKFit::m_TrackVertexError
std::vector< CLHEP::HepMatrix > m_TrackVertexError
Array of vertex error matrices of the child particles.
Definition: MakeMotherKFit.h:169
Belle2::analysis::MakeMotherKFit::m_Correlation
std::vector< CLHEP::HepMatrix > m_Correlation
Array of correlation matrices among the child particles.
Definition: MakeMotherKFit.h:171
Belle2::analysis::MakeMotherKFit
MakeMotherKFit is a class to build mother particle from kinematically fitted daughters.
Definition: MakeMotherKFit.h:41
Belle2::analysis::MakeMotherKFit::getMotherMomentum
const CLHEP::HepLorentzVector getMotherMomentum(void) const
Get a Lorentz vector of the mother particle.
Definition: MakeMotherKFit.cc:171
Belle2::analysis::MakeMotherKFit::setFlagAtDecayPoint
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.
Definition: MakeMotherKFit.cc:143
Belle2::analysis::KFitConst::kAfterFit
static const int kAfterFit
Input parameter to specify after-fit when setting/getting a track attribute.
Definition: KFitConst.h:45
Belle2::analysis::MakeMotherKFit::m_VertexError
CLHEP::HepSymMatrix m_VertexError
Vertex error matrix of the mother particle.
Definition: MakeMotherKFit.h:177
Belle2::analysis::MakeMotherKFit::calculateDELMDELC
void calculateDELMDELC(CLHEP::HepMatrix *e) const
Make delMdelC to calculate error matrix of the mother particle.
Definition: MakeMotherKFit.cc:307
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::analysis::MakeMotherKFit::m_TrackCount
int m_TrackCount
Number of tracks.
Definition: MakeMotherKFit.h:163
Belle2::analysis::MakeMotherKFit::m_Charge
double m_Charge
Charge of the mother particle.
Definition: MakeMotherKFit.h:181
Belle2::analysis::MakeMotherKFit::setMagneticField
enum KFitError::ECode setMagneticField(const double mf)
Change a magnetic field from the default value KFitConst::kDefaultMagneticField.
Definition: MakeMotherKFit.cc:63
Belle2::analysis::MakeMotherKFit::~MakeMotherKFit
~MakeMotherKFit(void)
Destruct the object.
Belle2::analysis::KFitTrack
KFitTrack is a container of the track information (Lorentz vector, position, and error matrix),...
Definition: KFitTrack.h:39
Belle2::analysis::MakeMotherKFit::m_FlagBeforeAfter
int m_FlagBeforeAfter
Flag controlled by setFlagBeforeAfter().
Definition: MakeMotherKFit.h:152
Belle2::analysis::MakeMotherKFit::setCorrelation
enum KFitError::ECode setCorrelation(const CLHEP::HepMatrix &e)
Set a correlation matrix.
Definition: MakeMotherKFit.cc:119
Belle2::analysis::MakeMotherKFit::setVertexError
enum KFitError::ECode setVertexError(const CLHEP::HepSymMatrix &e)
Set a vertex error matrix of the mother particle.
Definition: MakeMotherKFit.cc:79
Belle2::analysis::MakeMotherKFit::getMotherPosition
const HepPoint3D getMotherPosition(void) const
Get a position of the mother particle.
Definition: MakeMotherKFit.cc:178
Belle2::analysis::MakeMotherKFit::addTrack
enum KFitError::ECode addTrack(const KFitTrack &kp)
Add a track to the make-mother object.
Definition: MakeMotherKFit.cc:40
Belle2::analysis::KFitError::ECode
ECode
ECode is a error code enumerate.
Definition: KFitError.h:43
Belle2::analysis::MakeMotherKFit::doMake
enum KFitError::ECode doMake(void)
Perform a reconstruction of mother particle.
Definition: MakeMotherKFit.cc:192
HepGeom::Point3D< double >
Belle2::analysis::MakeMotherKFit::setFlagBeforeAfter
enum KFitError::ECode setFlagBeforeAfter(const int flag)
Set a flag to control computational parameters for the mother particle property before or after the f...
Definition: MakeMotherKFit.cc:151
Belle2::analysis::MakeMotherKFit::m_FlagVertexError
bool m_FlagVertexError
Flag to indicate if the vertex error matrix of the mother particle is preset.
Definition: MakeMotherKFit.h:154
Belle2::analysis::MakeMotherKFit::m_ErrorCode
enum KFitError::ECode m_ErrorCode
Error code.
Definition: MakeMotherKFit.h:147
Belle2::analysis::MakeMotherKFit::setZeroCorrelation
enum KFitError::ECode setZeroCorrelation(void)
Indicate no correlation between tracks.
Definition: MakeMotherKFit.cc:135
Belle2::analysis::MakeMotherKFit::calculateError
void calculateError(CLHEP::HepSymMatrix *Ec) const
Make a matrix to calculate error matrix of the mother particle.
Definition: MakeMotherKFit.cc:255