11#include <analysis/VertexFitting/TreeFitter/Composite.h>
12#include <analysis/VertexFitting/TreeFitter/FitParams.h>
14#include <TMatrixFSym.h>
15#include <Math/Vector3D.h>
21 :
ParticleBase(particle, mother, &config), m_params(), m_hasEnergy(true), m_massconstraint(massConstraint)
40 return ErrCode(ErrCode::Status::success) ;
49 m_params = Eigen::Matrix<double, 7, 1>::Zero(7, 1);
59 m_covariance = Eigen::Matrix < double, -1, -1, 0, 7, 7 >::Zero(7, 7);
62 for (
int row = 0; row < 4; ++row) {
63 for (
int col = 0; col <= row; ++col) {
68 for (
int row = 0; row < 3; ++row) {
69 for (
int col = 0; col <= row; ++col) {
84 for (
int row = 0; row < 3; ++row) {
85 p.getH()(row, posindex + row) = -1;
88 for (
int row = 0; row < 4; ++row) {
89 p.getH()(3 + row, momindex + row) = -1;
92 p.getV().triangularView<Eigen::Lower>() =
m_covariance.triangularView<Eigen::Lower>();
94 return ErrCode(ErrCode::Status::success) ;
101 case Constraint::mass:
104 case Constraint::composite:
107 case Constraint::geometric:
Class to store reconstructed particles.
double getEnergy() const
Returns total energy.
ROOT::Math::XYZVector getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
ROOT::Math::XYZVector getMomentum() const
Returns momentum vector.
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
Composite(Belle2::Particle *bc, const ParticleBase *mother, const ConstraintConfiguration &config, bool massconstraint=false)
constructor
void updateParams()
update changed params
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const override
project this constraint
Eigen::Matrix< double, 7, 1 > m_params
column vector to store the measurement
virtual int momIndex() const override
get momentum index in statevector
Eigen::Matrix< double, -1, -1, 0, 7, 7 > m_covariance
only lower triangle filled!
virtual int type() const override
get ype
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle in case it has no mother
ErrCode projectComposite(const FitParams &fitparams, Projection &p) const
project this particle constraint
virtual int posIndex() const override
get position index in statevectof x,y,z,tau,px,py,pz
constraint configuration class
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
base class for all particles
Belle2::Particle * particle() const
get basf2 particle
ErrCode initTau(FitParams &par) const
initialises tau as a length
virtual ErrCode projectMassConstraint(const FitParams &, Projection &) const
project mass constraint abstract
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const
project constraint.
virtual ErrCode projectGeoConstraint(const FitParams &, Projection &) const
project geometrical constraint
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...