10#include <analysis/VertexFitting/TreeFitter/Origin.h>
11#include <analysis/VertexFitting/TreeFitter/ConstraintConfiguration.h>
12#include <analysis/VertexFitting/TreeFitter/FitParams.h>
13#include <analysis/VertexFitting/TreeFitter/Projection.h>
14#include <analysis/dataobjects/Particle.h>
15#include <framework/logging/Logger.h>
17#include <Math/Vector3D.h>
30 m_covariance(config.m_originDimension, config.m_originDimension),
40 return ErrCode(ErrCode::Status::success);
50 status |= daughter->initMotherlessParticle(fitparams);
51 status |= daughter->initParticleWithMother(fitparams);
61 const ROOT::Math::XYZVector& vertexVector =
m_beamSpot->getIPPosition();
62 const TMatrixDSym& covVertex =
m_beamSpot->getCovVertex();
75 const ROOT::Math::XYZVector& vertexVector =
m_beamSpot->getIPPosition();
76 const TMatrixDSym& covVertex =
m_beamSpot->getCovVertex();
86 B2FATAL(
"Incorrect dimension of customOriginVertex or customOriginCovariance. customOriginVertex dim = "
89 B2WARNING(
"An element of customOriginCovariance diagonal is smaller than 0.");
90 return ErrCode(ErrCode::Status::badsetup);
107 B2FATAL(
"The Origin is nether beamspot nor custom. This is ether a configuration error or no beam parameters were found to build the beam spot.");
110 return ErrCode(ErrCode::Status::success);
121 status |= daughter->initCovariance(fitpar);
135 p.getH()(row, posindex + row) = -1;
137 for (
int col = 0; col <= row; ++col) {
142 return ErrCode(ErrCode::Status::success);
149 case Constraint::origin:
161 daughter->addToConstraintList(list, depth - 1);
Class to store reconstructed particles.
constraint configuration class
class to manage the order of constraints and their filtering
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
abstract errorocode be aware that the default is success
Class to store and manage fitparams (statevector)
Eigen::Matrix< double, -1, 1, 0, MAX_MATRIX_SIZE, 1 > & getStateVector()
getter for the fit parameters/statevector
Eigen::Matrix< double, -1, -1, 0, MAX_MATRIX_SIZE, MAX_MATRIX_SIZE > & getCovariance()
getter for the states covariance
ErrCode projectOriginConstraint(const FitParams &fitpar, Projection &) const
the actual constraint projection
const int m_constraintDimension
dimension of the constraint
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 3, 3 > m_covariance
covariance of the origin dont know size but I know the max size
const std::vector< double > m_customOriginVertex
vertex coordinates
virtual ErrCode initCovariance(FitParams &fitpar) const override
init covariance matrix of the constraint
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const override
the abstract projection
ErrCode initOrigin()
init the origin "particle"
virtual int type() const override
get particle type
const std::vector< double > m_customOriginCovariance
vertex covariance
Eigen::Matrix< double, Eigen::Dynamic, 1, Eigen::ColMajor, 3, 1 > m_posVec
vertex position of the origin
Origin(Belle2::Particle *particle, const ConstraintConfiguration &config, const bool forceFitAll)
Constructor.
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle, used if it has a mother
virtual void addToConstraintList(constraintlist &list, int depth) const override
adds the origin as a particle to the constraint list
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle, used if it has no mother
virtual int posIndex() const override
vertex position index in the statevector
const bool m_isBeamSpot
is this the beam constraint?
Belle2::DBObjPtr< Belle2::BeamSpot > m_beamSpot
the parameters are initialize elsewhere this is just a pointer to that
const int m_inflationFactorCovZ
inflated the covariance matrix in z by this number
virtual ParticleBase * addDaughter(Belle2::Particle *, const ConstraintConfiguration &config, bool forceFitAll=false)
add daughter
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const
project constraint.
ParticleBase(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config=nullptr)
default constructor
std::vector< ParticleBase * > m_daughters
daughter container
std::vector< Constraint > constraintlist
alias
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...