11#include <analysis/VertexFitting/TreeFitter/Composite.h>
12#include <analysis/VertexFitting/TreeFitter/FitParams.h>
13#include <analysis/VertexFitting/TreeFitter/Projection.h>
15#include <TMatrixFSym.h>
16#include <Math/Vector3D.h>
41 return ErrCode(ErrCode::Status::success) ;
50 m_params = Eigen::Matrix<double, 7, 1>::Zero(7, 1);
60 m_covariance = Eigen::Matrix < double, -1, -1, 0, 7, 7 >::Zero(7, 7);
63 for (
int row = 0; row < 4; ++row) {
64 for (
int col = 0; col <= row; ++col) {
69 for (
int row = 0; row < 3; ++row) {
70 for (
int col = 0; col <= row; ++col) {
85 for (
int row = 0; row < 3; ++row) {
86 p.getH()(row, posindex + row) = -1;
89 for (
int row = 0; row < 4; ++row) {
90 p.getH()(3 + row, momindex + row) = -1;
93 p.getV().triangularView<Eigen::Lower>() =
m_covariance.triangularView<Eigen::Lower>();
95 return ErrCode(ErrCode::Status::success) ;
102 case Constraint::mass:
105 case Constraint::composite:
108 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
bool m_massconstraint
flag
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 type
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
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.
ParticleBase(Belle2::Particle *particle, const ParticleBase *mother, const ConstraintConfiguration *config=nullptr)
default constructor
virtual ErrCode projectGeoConstraint(const FitParams &, Projection &) const
project geometrical constraint
const ParticleBase * mother() const
getMother() / hasMother()
class to store the projected residuals and the corresponding jacobian as well as the covariance matri...