 |
Belle II Software
release-05-01-25
|
12 #include <analysis/VertexFitting/TreeFitter/RecoComposite.h>
13 #include <analysis/VertexFitting/TreeFitter/FitParams.h>
15 #include <TMatrixFSym.h>
17 namespace TreeFitter {
20 : ParticleBase(particle, mother), m_params(), m_hasEnergy(true)
39 return ErrCode(ErrCode::Status::success) ;
48 m_params = Eigen::Matrix<double, 7, 1>::Zero(7, 1);
58 m_covariance = Eigen::Matrix < double, -1, -1, 0, 7, 7 >::Zero(7, 7);
61 for (
int row = 0; row < 4; ++row) {
62 for (
int col = 0; col <= row; ++col) {
67 for (
int row = 0; row < 3; ++row) {
68 for (
int col = 0; col <= row; ++col) {
79 p.getResiduals().segment(0, 3) =
m_params.segment(0, 3) - fitparams.getStateVector().segment(posindex, 3);
81 p.getResiduals().segment(3, 4) =
m_params.segment(3, 4) - fitparams.getStateVector().segment(momindex, 4);
83 for (
int row = 0; row < 3; ++row) {
84 p.getH()(row, posindex + row) = -1;
87 for (
int row = 0; row < 4; ++row) {
88 p.getH()(3 + row, momindex + row) = -1;
91 p.getV().triangularView<Eigen::Lower>() =
m_covariance.triangularView<Eigen::Lower>();
93 return ErrCode(ErrCode::Status::success) ;
100 case Constraint::composite:
103 case Constraint::geometric:
virtual int type() const override
get ype
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const
project constraint.
TVector3 getVertex() const
Returns vertex position (POCA for charged, IP for neutral FS particles)
virtual int momIndex() const override
get momentum index in statevector
ErrCode projectRecoComposite(const FitParams &fitparams, Projection &p) const
project this particle constraint
abstract errorocode be aware that the default is succes
virtual ErrCode initMotherlessParticle(FitParams &fitparams) override
init particle in case it has no mother
virtual ErrCode initParticleWithMother(FitParams &fitparams) override
init particle in case it has a mother
Eigen::Matrix< double, -1, -1, 0, 7, 7 > m_covariance
only lower triangle filled!
Class to store and manage fitparams (statevector)
Eigen::Matrix< double, 7, 1 > m_params
column vector to store the measurement
virtual int posIndex() const override
get position index in statevectof x,y,z,tau,px,py,pz
Eigen::Matrix< double, -1, 1, 0, MAX_MATRIX_SIZE, 1 > & getStateVector()
getter for the fit parameters/statevector
ErrCode initTau(FitParams &par) const
initialises tau as a length
float getEnergy() const
Returns total energy.
Type
type of constraints the order of these constraints is important: it is the order in which they are ap...
TMatrixFSym getMomentumVertexErrorMatrix() const
Returns 7x7 error matrix.
virtual ErrCode projectGeoConstraint(const FitParams &, Projection &) const
project geometrical constraint
void updateParams()
update chaed params
TVector3 getMomentum() const
Returns momentum vector.
Class to store reconstructed particles.
RecoComposite(Belle2::Particle *bc, const ParticleBase *mother)
constructor
Belle2::Particle * particle() const
get basf2 particle
virtual ErrCode projectConstraint(Constraint::Type, const FitParams &, Projection &) const override
project this constraint