11 #include <analysis/VertexFitting/TreeFitter/RecoComposite.h>
12 #include <analysis/VertexFitting/TreeFitter/FitParams.h>
14 #include <TMatrixFSym.h>
16 namespace TreeFitter {
19 :
ParticleBase(particle, mother), m_params(), m_hasEnergy(true)
26 :
ParticleBase(particle, mother, &config), m_params(), m_hasEnergy(true), m_massconstraint(massConstraint)
45 return ErrCode(ErrCode::Status::success) ;
54 m_params = Eigen::Matrix<double, 7, 1>::Zero(7, 1);
64 m_covariance = Eigen::Matrix < double, -1, -1, 0, 7, 7 >::Zero(7, 7);
67 for (
int row = 0; row < 4; ++row) {
68 for (
int col = 0; col <= row; ++col) {
73 for (
int row = 0; row < 3; ++row) {
74 for (
int col = 0; col <= row; ++col) {
89 for (
int row = 0; row < 3; ++row) {
90 p.getH()(row, posindex + row) = -1;
93 for (
int row = 0; row < 4; ++row) {
94 p.getH()(3 + row, momindex + row) = -1;
97 p.getV().triangularView<Eigen::Lower>() =
m_covariance.triangularView<Eigen::Lower>();
99 return ErrCode(ErrCode::Status::success) ;
106 case Constraint::mass:
109 case Constraint::composite:
112 case Constraint::geometric:
Class to store reconstructed particles.
float getEnergy() const
Returns total energy.
TVector3 getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
TVector3 getMomentum() const
Returns momentum vector.
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
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...
ErrCode projectRecoComposite(const FitParams &fitparams, Projection &p) const
project this particle constraint
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
virtual int posIndex() const override
get position index in statevectof x,y,z,tau,px,py,pz
RecoComposite(Belle2::Particle *bc, const ParticleBase *mother)
constructor